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
Weather change alert with Node-red
#1
Have the air pressure data shown in the dashboard but would like to implement in addition to showing the Barograph an amber or red warning based on the speed pressure change:
eg AMBER : meaning wind expectancy of bft 6-7
more than 1,3 hPa increase per 1 hr or >4hPa increase in 3 hrs 
or > 1hPa decrease per 1 hr or > 3hPa decrease in 3 hrs 

and RED : meaning wind expectancy of 8-12 bft
> 2hPa increase per hr or > 6hPa increase in 3 hrs
or > 2hPa decrease per 1 hr or > 6hPa decrease in 3 hrs

This seem to be reasonable values for European coast from what I discovered in the web.

Has anyone already implemented something similar in node-red or can advise how to do it

This is what I currently have:

[{"id":"e5c38364.12994","type":"websocket in","z":"f471eda8.b7901","name":"","server":"e4c90bec.5fa188","client":"","x":134.25,"y":39,"wires":[["451e867a.4de5e8"]]},{"id":"2516898a.615516","type":"file","z":"f471eda8.b7901","name":"Chart dump","filename":"/home/pi/.ds-charts/pressure.dump","appendNewline":true,"createDir":true,"overwriteFile":"true","x":756.7500114440918,"y":189.2500057220459,"wires":[]},{"id":"1ac22cae.ef1e53","type":"ui_chart","z":"f471eda8.b7901","name":"","group":"8dd292.ec172d7","order":1,"width":"0","height":"0","label":"Surface Pressure (hPa)","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"","ymin":"","ymax":"","removeOlder":"72","removeOlderPoints":"","removeOlderUnit":"3600","cutout":"","colors":["#ffff00","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"x":654.0000114440918,"y":150.00000381469727,"wires":[["2516898a.615516"],[]]},{"id":"2731bba2.40ab64","type":"function","z":"f471eda8.b7901","name":"Convert to hPa","func":"msg.payload = msg.payload /100 ;\nmsg.payload = msg.payload.toFixed(2);\nreturn msg;","outputs":1,"noerr":0,"x":460.75,"y":151.0000114440918,"wires":[["1ac22cae.ef1e53","301e5b12.5b5234"]]},{"id":"3b896c8.024a794","type":"json","z":"f471eda8.b7901","name":"","x":538.5000190734863,"y":192.2500057220459,"wires":[["1ac22cae.ef1e53"]]},{"id":"710d185d.82de18","type":"file in","z":"f471eda8.b7901","name":"Chart dump pres","filename":"/home/pi/.ds-charts/pressure.dump","format":"utf8","x":393.2500457763672,"y":196.00002479553223,"wires":[["3b896c8.024a794"]]},{"id":"57473e88.b056f","type":"inject","z":"f471eda8.b7901","name":"Startup Pressure","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"x":209.00000762939453,"y":196.75001335144043,"wires":[["710d185d.82de18"]]},{"id":"12298bf.d0d1974","type":"delay","z":"f471eda8.b7901","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":274.75000762939453,"y":151.25,"wires":[["2731bba2.40ab64"]]},{"id":"a468cc97.41c4d","type":"jsonpath","z":"f471eda8.b7901","expression":"$.updates..values[?(@.path==\"environment.outside.pressure\")]..value","split":true,"name":"environment.outside.pressure","x":295.00000762939453,"y":105.25000381469727,"wires":[["12298bf.d0d1974"]]},{"id":"451e867a.4de5e8","type":"json","z":"f471eda8.b7901","name":"","x":55,"y":105.00000476837158,"wires":[["a468cc97.41c4d","e184c036.78eb4","5bb3cb31.bb1084","d5830fd3.f2b27"]]},{"id":"e4c90bec.5fa188","type":"websocket-listener","z":"","path":"ws://localhost:3000/signalk/v1/stream","wholemsg":"false"},{"id":"8dd292.ec172d7","type":"ui_group","z":"","name":"Pressure","tab":"b2f9c8f1.cf11b8","order":1,"disp":false,"width":"6"},{"id":"b2f9c8f1.cf11b8","type":"ui_tab","z":"","name":"Environment","icon":"dashboard"}]

Thanks for sharing any enhancements!
Reply


Messages In This Thread
Weather change alert with Node-red - by SkipperEarly - 2017-05-15, 11:14 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)