This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Signal K MQTT Node Red
#4
you cant publish from the actions tab..

   
i don't see any action to publish mqtt.
in fact i don't think op can publish mqtt at all you need to do it in node-red


 you can only have one "ws"web socket so delete any others and change user pass in the ...mqtt ..NODE...select the pencil choose localhost 1883 and in security your user and pass  to be same as openplotters mqtt
here 
Code:
[{"id":"bc03edcb.cacb7","type":"websocket in","z":"aceda197.5265b","name":"ws","server":"f3d9cf91.f4f67","client":"","x":90,"y":160,"wires":[["e5da9f1.2a8806"]]},{"id":"e5da9f1.2a8806","type":"jsonpath","z":"aceda197.5265b","expression":"$.updates..values[*]","split":false,"name":"Signal K delta values","x":263,"y":160.99999523162842,"wires":[["42cab5e3.61144c"]]},{"id":"42cab5e3.61144c","type":"function","z":"aceda197.5265b","name":"merge values","func":"var paths={};\nvar arrayLength = msg.payload.length;\nfor (var i = 0; i < arrayLength; i++) {\n    paths[msg.payload[i].path]=msg.payload[i].value;\n}\nmsg.payload = paths;\nreturn msg;","outputs":1,"noerr":0,"x":460,"y":160,"wires":[["3fe12873.1cbcd8"]]},{"id":"3fe12873.1cbcd8","type":"function","z":"aceda197.5265b","name":"compass","func":"var signalk_key=\"navigation.gnss.satellites\";\n\nif(msg.payload.hasOwnProperty(signalk_key)){\n    msg.payload=msg.payload[signalk_key];\n    return msg;\n    \n\n}","outputs":"1","noerr":0,"x":620,"y":160,"wires":[["7e5ba565.1a0fec"]]},{"id":"7e5ba565.1a0fec","type":"mqtt out","z":"aceda197.5265b","name":"","topic":"satellites","qos":"","retain":"","broker":"dcdf2343.034d1","x":760,"y":160,"wires":[]},{"id":"f3d9cf91.f4f67","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"dcdf2343.034d1","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
[*]
now subscribe in op's mqtt TAB.


mqtt is just publish and subscribe....EZ.

[*]    
Reply


Messages In This Thread
Signal K MQTT Node Red - by wkmhv - 2018-06-08, 04:57 PM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-08, 05:15 PM
RE: Signal K MQTT Node Red - by wkmhv - 2018-06-09, 09:36 AM
RE: Signal K MQTT Node Red - by PaddyB - 2018-06-09, 12:06 PM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-09, 10:50 AM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-09, 03:15 PM
RE: Signal K MQTT Node Red - by wkmhv - 2018-06-09, 04:59 PM
RE: Signal K MQTT Node Red - by JeroenAdam - 2018-06-09, 06:05 PM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-17, 02:53 PM
RE: Signal K MQTT Node Red - by PaddyB - 2018-06-09, 06:53 PM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-09, 06:54 PM
RE: Signal K MQTT Node Red - by wkmhv - 2018-06-10, 08:06 PM
RE: Signal K MQTT Node Red - by PaddyB - 2018-06-10, 10:27 PM
RE: Signal K MQTT Node Red - by wkmhv - 2018-06-10, 11:28 PM
RE: Signal K MQTT Node Red - by wkmhv - 2018-06-11, 09:00 PM
RE: Signal K MQTT Node Red - by jim321 - 2018-06-11, 09:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)