Recommended Posts

Right, been having a play with my ESP2866.  Managed to screw it up a few times, but have also managed to get it working again.

Now because it does not have much memory, nor does it have a real RTC, just some fake one, and I do not have a Linux box apart from my RPis, so usually working from my Windows 10 machine.  Now this is fine for getting into it with PUTTY, or WEBRPL, but not much use for anything else.

Now I have an old router or 3 kicking about.

So I thought I could make up a simple wireless network for my home monitoring.

My thinking is that if I set up the router, plug in a RPi that has an RTC on it via an ethernet port, then set up the ESPs to connect to the wireless side of the router.

If I can bridge between the RPi and the router so that everything is connected, I can use the RPi to send out commands to the ESPs and grad the data I want, then timestamp it and save it all to a network disk.

Does that sound feasible?

Something like this:

 

Monitoring Network.jpg

Share this post


Link to post
Share on other sites

Looks like a suitably rich picture of the system you are trying to describe, is it important to timestamp every reading or every round robin poll. (How often will you poll the sensors?)

Share this post


Link to post
Share on other sites

Probably every 6 minutes, except the energy monitor which is every 6 seconds (captures the kettle that way).

I have had a look at a few webpages about bridging, but none seem to make sense.

But I have got an RPi set up to connect to my neighbours wireless and to my old router via an Ethernet cable.

Can ping things from my PC happily.  192.168.1.100 is the Ethernet, 192.168.1.30 is the Wireless.

My old router is on 192.168.1.2 on the Ethernet and 192.168.1.1 on the Wireless.

That is as far as I have got so far.

What next?

 

C:\Users\SteamyTea>ping 191.168.1.100

Pinging 191.168.1.100 with 32 bytes of data:
Reply from 191.168.1.100: bytes=32 time=305ms TTL=50
Reply from 191.168.1.100: bytes=32 time=275ms TTL=50
Reply from 191.168.1.100: bytes=32 time=280ms TTL=50
Reply from 191.168.1.100: bytes=32 time=280ms TTL=50

Ping statistics for 191.168.1.100:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 275ms, Maximum = 305ms, Average = 285ms

C:\Users\SteamyTea>ping 191.168.0.30

Pinging 191.168.0.30 with 32 bytes of data:
Reply from 191.168.0.30: bytes=32 time=350ms TTL=50
Reply from 191.168.0.30: bytes=32 time=313ms TTL=50
Reply from 191.168.0.30: bytes=32 time=574ms TTL=50
Reply from 191.168.0.30: bytes=32 time=538ms TTL=50

Ping statistics for 191.168.0.30:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 313ms, Maximum = 574ms, Average = 443ms

 

Share this post


Link to post
Share on other sites
Posted (edited)

Just powered up my ESP2866 and I can ping that from the PC, but not the with WedRPL for some reason (changed the IP to the ESP's one 192.168.1.101).

Can ping it from the RPi as well.

So that is all good.

 

Just need to join it all together now so I can send a Bash command to the ESP2866 to send some data to the netdisk which is sitting on 192.168.1.3 and I can get to from the RPi, but not my PC for some reason.

 

 

Edited by SteamyTea

Share this post


Link to post
Share on other sites
1 hour ago, SteamyTea said:

Bash command

What bash command will you use? Can you not get the ESP to expose its registers (memory) to interrogation by the RPi which can then write the net disk with the time stamp. Maybe you could pipe it, is that something the EPS supports. You could encode each EPS so even if the DHCP resets their IP address you still know which sensor it is.

Share this post


Link to post
Share on other sites

Not sure of the internal structure of the EPS, I did read it when you chatted with Terry but can't recall it clearly. If it is creating a file you might use > :  to pipe it over.

Share this post


Link to post
Share on other sites

Nick, google ESP8266 Tasmota or Sonoff Tasmota. Sonoff use the ESP8266 as their standard controller and this in an Open Source apps platform designed to run of the sonoff kit and RYO ESP boards.  There are also anther couple of Open sources apps tiers based on MQTT.  Just run an MQTT broker and NodeRED on your RPi and let MQTT do the connection magic.  They support a range of OW, and I2C devices.

 

Or use MicroPython or NodeMCU Lua if you aren't comfortable with the raw Arduino support. Lot's of options if you are willing to learn. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this