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
How to zero my dashboard gauges ?
#2
thanks i added it to my alarm text to watch the gps, the gpio node is on an arduino nano firmata with a gas sensor(MQ2)"propane locker" 5v.

Code:
[{"id":"a43b1311.ae3ac","type":"mqtt out","z":"217cab7.d842f54","name":"gas","topic":"gas","qos":"","retain":"","broker":"e2091c1e.39653","x":1170,"y":1040,"wires":[]},{"id":"c9f79230.06153","type":"ui_text","z":"217cab7.d842f54","group":"a787e42.6da3e18","order":1,"width":0,"height":0,"name":"","label":" ALARM","format":"{{msg.payload}}","layout":"col-center","x":1200,"y":1000,"wires":[]},{"id":"222d7763.b4da98","type":"function","z":"217cab7.d842f54","name":"","func":"var alarm= msg.payload;\nvar gas=\"GAS ALARM\";\nvar ok=\"OK\";\n\nif (alarm===1)msg.payload=ok;\nif (alarm===0)msg.payload=gas;\n\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":1080,"wires":[["a43b1311.ae3ac","c9f79230.06153"]]},{"id":"b5f2d3c4.285ec","type":"function","z":"217cab7.d842f54","name":"float","func":"var signalk_key=\"sensors.float\";\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":630,"y":1000,"wires":[["d35d0580.5778c8"]]},{"id":"d35d0580.5778c8","type":"function","z":"217cab7.d842f54","name":"","func":"var water=msg.payload;\nvar alarm=\"BILDGE ALARM\"\nvar ok=\"OK\"\nvar res=\"RESET\"\n\nif (water===1)msg.payload=alarm;\nif (water===0)msg.payload=ok;\nif (water===\"res\")msg.payload=res;\n\nreturn msg;","outputs":1,"noerr":0,"x":930,"y":1000,"wires":[["c9f79230.06153"]]},{"id":"abd93f25.27af7","type":"function","z":"217cab7.d842f54","name":"pir","func":"var signalk_key=\"sensors.pir\";\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":630,"y":1040,"wires":[["c5039fe0.2e3da"]]},{"id":"c5039fe0.2e3da","type":"function","z":"217cab7.d842f54","name":"","func":"var pir=msg.payload;\nvar piralarm=\"INTRUDER ALARM\";\nvar ok=\"OK\";\nif (pir===1)msg.payload=piralarm;\nif (pir===0)msg.payload=ok;\n\nreturn msg;","outputs":1,"noerr":0,"x":810,"y":1040,"wires":[["c9f79230.06153"]]},{"id":"6b0360f.096f1a","type":"gpio in","z":"217cab7.d842f54","name":"","state":"INPUT","samplingInterval":"300","pin":"2","board":"7fcc44b3.6219bc","x":630,"y":1080,"wires":[["222d7763.b4da98"]]},{"id":"8227003b.4d125","type":"trigger","z":"217cab7.d842f54","op1":"0","op2":"no GPS data","op1type":"num","op2type":"str","duration":"10","extend":true,"units":"s","reset":"","bytopic":"all","name":"gps cog","x":980,"y":940,"wires":[["c9f79230.06153","d35d0580.5778c8"]]},{"id":"c2bd1950.6981b8","type":"ui_button","z":"217cab7.d842f54","name":"","group":"aee4e765.355228","order":1,"width":0,"height":0,"label":"RESET","color":"","bgcolor":"","icon":"","payload":"res","payloadType":"str","topic":"","x":640,"y":960,"wires":[["a9703da2.5563f"]]},{"id":"a9703da2.5563f","type":"trigger","z":"217cab7.d842f54","op1":"res","op2":"0","op1type":"str","op2type":"num","duration":"10","extend":true,"units":"s","reset":"","bytopic":"all","name":"","x":790,"y":960,"wires":[["d35d0580.5778c8"]]},{"id":"e2091c1e.39653","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""},{"id":"a787e42.6da3e18","type":"ui_group","z":"","name":"NAV 1","tab":"61ee283e.414488","order":1,"disp":false,"width":"4"},{"id":"7fcc44b3.6219bc","type":"nodebot","z":"","name":"","username":"","password":"","boardType":"firmata","serialportName":"/dev/ttyUSB0","connectionType":"local","mqttServer":"","pubTopic":"","subTopic":"","tcpHost":"","tcpPort":"","sparkId":"","sparkToken":"","beanId":"","impId":"","uuid":"","token":"","sendUuid":""},{"id":"aee4e765.355228","type":"ui_group","z":"","name":"NAV 2","tab":"61ee283e.414488","order":2,"disp":false,"width":"4"},{"id":"61ee283e.414488","type":"ui_tab","z":"","name":"Engine","icon":"dashboard","order":1}]
Reply


Messages In This Thread
How to zero my dashboard gauges ? - by affinite - 2018-03-31, 10:03 PM
RE: How to zero my dashboard gauges ? - by jim321 - 2018-04-03, 06:49 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)