Esp8266 - esp easy - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: General discussion (https://forum.openmarine.net/forumdisplay.php?fid=2) +--- Thread: Esp8266 - esp easy (/showthread.php?tid=844) |
RE: Esp8266 - esp easy - BartStevens - 2020-01-07 (2020-01-07, 03:12 PM)abarrow Wrote: You can probably eliminate MQTT and NodeRed by using the Generic UDP option on ESPEasy. It would need some testing, but I think you could probably just create a template that is a properly formatted SignalK JSON message, insert the variables (temperature, for example) and have your SignalK server listen on that UDP port. Abarrow, As I'm a newbie, formatting a JSON message is (still) bit to difficult ... ;( Bart RE: Esp8266 - esp easy - leif_klasson@hotmail.com - 2020-01-13 Hi, after some googling and testing, it was quite easy to EspEasy to send UDp message to SignalK directly. So I don't use MQTT or Nodered in this. See attached images. EspEasy: - Setup a controller for UDP >> SignalK server - Setup a device In my example with temperature, I have Celsius + 273.15 =Kelvin, that SignalK is using. Json template is: {"updates": [{"source": "%sysname%","values":[ {"path":"environment.inside.mainCabin.%valname%","value": %value% }]}]} Or as pretty print: {"updates": [ { "source": "%sysname%", "values": [ { "path":"environment.inside.mainCabin.%valname%","value": %value% } ] } ] } %sysname is the name of EspEasy. %valname is the name of the device value sent, "temperature" as example. %value is the actual value from the device. A better way could be to setup PATH in device, now I need to create several UDP controllers. {"updates": [{"source": "%sysname%","values":[ {"path":"%valname%","value": %value% }]}]} and in the device set as example "temperature" to "environment.inside.mainCabin.temperature" instead. PATH must match something good in SignalK, avoid to create your own path if possible. SIGNALK server: In Signalk admin web page, make sure you ONE UDP receiver on same port as EspEasy. Volia! ready! RE: Esp8266 - esp easy - BartStevens - 2020-01-14 Leif, How cool! Thanks. But as you know by now, I'm a newbie (eager to learn), so here is questions: I do not know where to do the JSON trick. Which application do I use, or is it in SignalK? You also talk about a better way to setup PATH in the device, do you mean the ESP? Then you write: ... {"updates": [{"source": "%sysname%","values":[ {"path":"%valname%","value": %value% }]}]} and in the device set as example "temperature" to "environment.inside.mainCabin.temperature" instead. PATH must match something good in SignalK, avoid to create your own path if possible. What do you mean (or where can I read about PATH? One more: which regards to the UDP port where SignalK is listening. How many ESP can you link to that port? Or is it one port per ESP? Was there a specific reason why you didn't want to use NodeRed and MQTT? Hope you can help me. Best Bart RE: Esp8266 - esp easy - Ranur - 2020-01-16 (2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Found it Paddy! This was the one - you were right! :-D RE: Esp8266 - esp easy - BartStevens - 2020-01-16 (2020-01-16, 04:55 PM)Ranur Wrote:(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Guys, I need help ... once I create a link between ESP and SignalK, how do I get the link to Node Red? Do I need to code? Pls help. Bart RE: Esp8266 - esp easy - PaddyB - 2020-01-16 (2020-01-16, 04:57 PM)BartStevens Wrote:(2020-01-16, 04:55 PM)Ranur Wrote:(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. RE: Esp8266 - esp easy - BartStevens - 2020-01-16 (2020-01-16, 06:01 PM)PaddyB Wrote:(2020-01-16, 04:57 PM)BartStevens Wrote:(2020-01-16, 04:55 PM)Ranur Wrote:(2017-11-20, 05:33 PM)PaddyB Wrote: Now this is very cool Will look for the "Signalk -Subscribe", do not see it yet Pls have a look at what I have now. I do not see anything coming in from Signalk ... RE: Esp8266 - esp easy - PaddyB - 2020-01-16 (2020-01-16, 06:06 PM)BartStevens Wrote: That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. Are you using the node-red signalk app? RE: Esp8266 - esp easy - BartStevens - 2020-01-16 (2020-01-16, 06:13 PM)PaddyB Wrote:(2020-01-16, 06:06 PM)BartStevens Wrote: That particular screen was getting data from MQTT, so a little node red needed - using the node-red signalk app you can have a sigK node outputting over mqtt quite easy. Yeap ... See what I'm looking at right now RE: Esp8266 - esp easy - PaddyB - 2020-01-16 (2020-01-16, 06:14 PM)BartStevens Wrote: Yeap ... SigK nodes should be in there already... |