2018-06-11, 09:00 PM
Have add a gauge to dashboard. It shows the number of satellites.
But it not be automatically updated.
But it not be automatically updated.
Code:
[{"id":"97745b0c.a0fb78","type":"function","z":"134ba20d.9b210e","name":"Create global variable","func":"// \n\n if (typeof msg.payload.updates !== 'undefined') {\n \n obj=msg.payload.updates[0].values[0].path;\n value=msg.payload.updates[0].values[0].value;\n global.set(obj, value);\n msg.payload = value;\n msg.topic = obj;\n \n \n \n return [ null, msg ];\n } \n","outputs":"2","noerr":0,"x":420,"y":300,"wires":[[],["9d107bdf.8fa438"]]},{"id":"46d9e442.a985dc","type":"json","z":"134ba20d.9b210e","name":"","property":"payload","action":"","pretty":false,"x":230,"y":300,"wires":[["97745b0c.a0fb78","81aff82.2034b08"]]},{"id":"9d107bdf.8fa438","type":"debug","z":"134ba20d.9b210e","name":"","active":false,"console":"false","complete":"true","x":630,"y":280,"wires":[]},{"id":"68e6dde2.9e8074","type":"websocket in","z":"134ba20d.9b210e","name":"SignalK input","server":"ed5f58f5.7d8488","client":"","x":90,"y":300,"wires":[["46d9e442.a985dc"]]},{"id":"81aff82.2034b08","type":"link out","z":"134ba20d.9b210e","name":"To database","links":[],"x":355,"y":340,"wires":[]},{"id":"f87e4c6.823d4b","type":"debug","z":"134ba20d.9b210e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":350,"y":440,"wires":[]},{"id":"e8dc1ab6.cc1b18","type":"inject","z":"134ba20d.9b210e","name":"","topic":"","payload":"navigation.gnss.satellites","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":440,"wires":[["f87e4c6.823d4b","9a578fbe.d9724"]]},{"id":"9a578fbe.d9724","type":"ui_gauge","z":"134ba20d.9b210e","name":"","group":"10dc1020.ca684","order":0,"width":0,"height":0,"gtype":"gage","title":"Satellites","label":"","format":"{{value}}","min":0,"max":"12","colors":["#b50031","#3ae600","#0c5528"],"seg1":"3","seg2":"9","x":350,"y":500,"wires":[]},{"id":"97b386ed.756ab8","type":"inject","z":"134ba20d.9b210e","name":"","topic":"","payload":"navigation.speedOverGround","payloadType":"global","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":90,"y":560,"wires":[["1dc3efa2.d0f31","74d015dc.688c7c"]]},{"id":"1dc3efa2.d0f31","type":"ui_gauge","z":"134ba20d.9b210e","name":"","group":"10dc1020.ca684","order":0,"width":0,"height":0,"gtype":"gage","title":"SOG","label":"knots","format":"{{value | number:2}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":350,"y":560,"wires":[]},{"id":"74d015dc.688c7c","type":"debug","z":"134ba20d.9b210e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":360,"y":620,"wires":[]},{"id":"ed5f58f5.7d8488","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"10dc1020.ca684","type":"ui_group","z":"","name":"GPS","tab":"9c0ac6d3.738ab8","disp":true,"width":"6","collapse":false},{"id":"9c0ac6d3.738ab8","type":"ui_tab","z":"","name":"Home","icon":"dashboard"}]