MQTT data manipulation - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3) +--- Thread: MQTT data manipulation (/showthread.php?tid=1802) |
RE: MQTT data manipulation - PaddyB - 2019-05-14 (2019-05-13, 07:53 PM)KKempeneers Wrote: Hi, Think the unit comes from the signalk key, the diagnostic display just shows whatever is coming in, text or a number > RE: MQTT data manipulation - KKempeneers - 2019-05-14 (2019-05-14, 05:52 AM)tkurki Wrote:Quote:Should i send it to port 3000 or to 10110 ? Hi again ... I wrote a quick python program to give me simulated data and send it over UDP to my openplotter RPI, the Pi receives the data at the selected port (nc -lu). But the data does not show up in SK diagnostic. If i send simulated data from within SK node server it does show up. And I can use that data from within KIP. Long story short ... I must be doing something wrong with the JSON datastructure delta message ... I'll do further fiddling tonight. Koen. RE: MQTT data manipulation - PaddyB - 2019-05-14 (2019-05-14, 10:20 AM)KKempeneers Wrote: Hi again ... Sounds like maybe signalk hasn't a connection set to that udp port? I get "pi@openplotter:~ $ nc -lu 55561 nc: Address already in use" with signalk listening on that port . RE: MQTT data manipulation - KKempeneers - 2019-05-14 Hi all, The eagle has landed ... being an EE engineer I should have cached that the server wasn't listening. When I came home today the first thing I did was to change the port to one that was allready defined, I took 55558 (OPnotifications) and the magic happened. . Also the topic now shows up in KIP ... Thanks a lot guys. I would however still would like to know;
RE: MQTT data manipulation - leif_klasson@hotmail.com - 2019-05-24 (2019-05-14, 05:42 PM)KKempeneers Wrote: Hi all,Hi, I can send you an example of UDP package I have sent from EspEasy to Openplotter via UDP. In the delta message, you also need to set source simply. And no, you only need to send delta as far as I have seen. See also manual for SignalK, go down to delta: http://signalk.org/specification/1.0.0/doc/data_model.html Example from manual (for vessel, use vessel.self instead): Code: { /Leif RE: MQTT data manipulation - KKempeneers - 2019-05-25 Hi Leif, Thank you for your example ... I read your reply yesterday and planned to answer it late last night. I wanted to check if I was right first. I omitted the context and timestamp in my delta message. The remainder is about the same as yours. However, some thoughts on the "source". What is the meaning of the source entries? I remember I entered my date of birth at a moment ... are those entries picked up by KPlex in any way? Koen. RE: MQTT data manipulation - PaddyB - 2019-05-25 (2019-05-25, 08:47 AM)KKempeneers Wrote: Hi Leif, This works for me being sent using UDP from an ESP32 to port 55561 which is set in signalk server as id - OPwifi. Code: {"updates":[{"values":[{"path":"environment.outside.pressure","value":101595.4}],"Source":"ESP32"}]} When it gets sent out again from Signalk the source gets changed to OPwifi and a timestamp added. Code: "environment":{ RE: MQTT data manipulation - KKempeneers - 2019-05-26 Thanks Paddy. Very useful information that is! Fair winds, Koen (That is "the cow" in Danish, but "brave" in Dutch) RE: MQTT data manipulation - PaddyB - 2019-05-26 This is handy address to have bookmarked as well, displays the last sigK message to go out, hit refresh for latest > http://10.10.10.1:3000/signalk/v1/api/ Then copy and paste here to make it look pretty > https://jsonformatter.curiousconcept.com/ RE: MQTT data manipulation - leif_klasson@hotmail.com - 2019-05-27 (2019-05-26, 07:23 PM)PaddyB Wrote: This is handy address to have bookmarked as well, displays the last sigK message to go out, hit refresh for latest > Or, simply use Firefox as web browser, it has built in support json and xml: Also, good tool for NMEA read and Send from PC, look at Actisense: https://www.actisense.com/product/nmea-reader-and-ebl-reader/ /Leif |