UDP from ESP8266 to MegunoLink Pro

Share your projects using MegunoLink Pro here!
Post Reply
jgrina
Posts: 8
Joined: Mon Aug 18, 2014 5:38 am

Fri Feb 05, 2016 4:53 am

I'm in the midst of developing a temperature monitor on the ESP8266 (ESP-12E) and using UDP to send data to a TimePlot on MegunoLink. The ESP8266 is a fussy chip and I have three that don't work any more. The one that I'm working with now is an ESP-12E with a breadboard adapter. I have a Dallas DS18B20 (with 3 meter cable and breadboard pins) talking to the ESP8266. Every 10 secs it sends a UDP packet to the Megunolink Pro. So far, I'm just reading the received packets with the MegunoLink Monitor panel. The IP address and UDP port of the ESP8266 are fixed (192.168.1.228:2880) so that i can send a start packet to the ESP82 from the MegunoLink.

The ESP8266 initiates with a "!Start" message from the MegunoLink Monitor panel. I will replace the Monitor with a button on the Interface panel after I get the ESP8266 program stable. I has been a few days of experimenting to get this far. I also send a "!Stop" message from the MegunoLink Monitor when I want to stop the packets from the ESP8266.

I'll post a further update if the MegunoLink and the ESP8266 remain stable over night. Up until about 2 hours ago, I could only maintain stable communication for a half hour or so. Lots of crashes on the ESP8266, including a "panic" message streaming out of the ESP into the serial monitor on the Arduino IDE.

If the two are still communicating in the morning, I'll begin a TimePlot and an Interface panel with Start and Stop buttons. One interesting unresolved question is "why do I have to send two start messages before two way communication begins". The start messages need to be about 2 secs apart.

If you are interested, post something.

Jim
philr
Posts: 298
Joined: Mon May 26, 2014 10:58 am

Tue Feb 16, 2016 3:08 am

Hi Jim, care to share an update on progress to the forum? Sounded like it was working well in your last email.

Cheers
Phil
Joe
Posts: 16
Joined: Wed Jun 22, 2016 8:18 am

Thu Jul 14, 2016 7:20 am

Hi Jim,
I would be very interested in your method communicating with MLP and ESP8266.
What's the current state of your project?

Joe
jgrina
Posts: 8
Joined: Mon Aug 18, 2014 5:38 am

Wed Jul 20, 2016 3:26 pm

Joe,

I have three ESP8266 remote nodes working, two very reliable and one does drop out occasionally. The occasional dropout is an Adafruit Huzzah Feather and I think the deep sleep mode conflicts with the automatic switch to upload mode used by the Feather. A couple of times a week, the Feather locks up and only recovers if I power it off and on.

One node is out doors, powered by a four cell 18650 lithium battery. It runs for about 10 days on a charge, reporting temperature once every two minutes. I should change the time, now that it is working reliably, to something like 10 minutes, and see what happens to battery life.

I have been working on other projects for awhile, just letting the tree nodes talk to MLP and occasionally I check the activity. MLP has both a current status panel for each node, and a graph panel that shows the data for all three nodes for about the last 12 hours. I have only implemented temperature monitoring, but that could be expanded to a lot of other things (motion detection, turn on remote lights, etc.).

The current code is a bit of a mess, but I could take a few days to clean it up. What kind of application are you interested in?

Jim
Joe
Posts: 16
Joined: Wed Jun 22, 2016 8:18 am

Wed Jul 20, 2016 6:51 pm

Hi Jim, I'm working on a self moving machine that takes measurements with sensors. I read the data with an arduino mega because of the different serial ports. I just want to send the measurements from my device via wifi to my laptop where I want to show and store the data with MLP.
I'm a total beginner in programming so maybe you could help me out with some code that I can start with?
For the first I just need to send the measurements from arduino with an esp8266 shield to MLP. For wifi connection I use a mobile router, where laptop and esp8266 are connected.
I would be glad if you could give me some help.

Joe
Paul
Posts: 17
Joined: Wed Jun 10, 2015 10:35 pm

Sun Jul 09, 2017 10:24 am

Hi all,

We've had quite a bit of interest in sending data from the ESP8266. We added a little example in the UDP docs that does just that. Check it out here: http://www.megunolink.com/documentation ... nnections/

Have fun
Paul.
Post Reply