sailoog / openplotter

Obsolete project. New one and active: https://github.com/openplotter
http://www.sailoog.com/openplotter
GNU General Public License v2.0
153 stars 53 forks source link

Tempertature sensor & SignalK #141

Closed tiziana31 closed 7 years ago

tiziana31 commented 7 years ago

I would like to display the values of some temperature sensors (1w) via Signalk on a Web page. Inspector shows $OSXD.... records. But my understanding of the SignalK sources is that the NMEA sentences $OSXD.... are not decoded. Is it true?

dmdelorme commented 7 years ago

look at this in node-red some changes needed. This is my flow for a 1w temp sensor. In OP I attached the sensor to water.temp as i watch this value in Opencpn Gage as water.temp.

[{"id":"f0df3e73.89cd5","type":"websocket in","z":"8b246946.dd5278","name":"openplotter","server":"","client":"","x":230,"y":40,"wires":[["8a497da0.47b9c8"]]},{"id":"8a497da0.47b9c8","type":"json","z":"8b246946.dd5278","name":"","x":270,"y":300,"wires":[["5e8df2d7.5ec6ac"]]},{"id":"5e8df2d7.5ec6ac","type":"jsonpath","z":"8b246946.dd5278","expression":"$.updates..values[?(@.path==\"environment.water.temperature\")]..value","split":true,"name":"outside temp","x":450,"y":520,"wires":[["819e48cc.8a322"]]},{"id":"819e48cc.8a322","type":"function","z":"8b246946.dd5278","name":"KelvintC2","func":"msg.payload=((msg.payload - 273.15).toFixed(1));\nreturn msg;","outputs":"1","noerr":0,"x":660,"y":520,"wires":[["af290c29.012268","e97d792a.369508"]]},{"id":"af290c29.012268","type":"ui_text","z":"8b246946.dd5278","group":"ce804676.cbb9e","order":2,"width":"4","height":"1","name":"","label":"outside temp","format":"{{msg.payload}}C","layout":"row-left","x":810,"y":520,"wires":[]},{"id":"e97d792a.369508","type":"freeboard","z":"8b246946.dd5278","name":"outSidetemp","x":970,"y":520,"wires":[]},{"id":"ce804676.cbb9e","type":"ui_group","z":"","name":"Weather","tab":"4c2b5852.80dfe","order":1,"disp":true,"width":"16"},{"id":"4c2b5852.80dfe","type":"ui_tab","z":"","name":"Weather","icon":"dashboard","order":1}]