2021-01-02, 12:49 PM
(2017-11-20, 07:53 PM)PaddyB Wrote:(2017-11-20, 07:38 PM)jim321 Wrote: how are you getting mqtt to publish i have a bmp280 on there.
what protocol and where do you supply the topic?
Have a look in here -
https://www.letscontrolit.com/wiki/index.php/LCDDisplay
So for the 3rd line in the screen in the photo I send msg.payload = "LCD,3,1,Wps=24K Wdr=55A" to MQTT topic /Esp1/cmd
https://www.letscontrolit.com/wiki/index..._Reference
With the Esp MQTT set to subscribe to /%sysname%/# (this boards sys name is Esp1)
So for your barometer you would b=need to strip out the value and insert it into msg.payload.
For example , for testing I have a function node creating random numbers -
Code:var random = Math.floor((Math.random() * 100) + 1);
var random2 = Math.floor((Math.random() * 360) + 1);
msg.payload = "LCD,1,1,SOG=" + random + "Kts COG=" + random2 + "M " ;
return msg;
Works great, need to think a bit about power, would be nice to have a power point in the cockpit and down below but also batteries so you could move it around without switching off.
Ahh Paddy! Still strugeling with this one. I can get the MQTT part worked out, but I am having problems getting the MQTT data transfered to the LCD. Do you remember how you did it?
Best regards
Runar