2018-03-16, 01:40 PM
2018-03-16, 01:57 PM
(2018-03-16, 01:40 PM)all1p Wrote: [ -> ]hello, is it possible to create an action with warning for a drop in pressure over time. Example, drop of 1 hpa per hour. Thank you.
Well it's possible with the help of node-red. You would have to log the data to a file or database or cache them.
There are many tutorials out there on node-red. You can do so much with it that it's really worth to get into it.
2018-03-16, 02:11 PM
(2018-03-16, 01:57 PM)shark24 Wrote: [ -> ]Well it's possible with the help of node-red. You would have to log the data to a file or database or cache them.
There are many tutorials out there on node-red. You can do so much with it that it's really worth to get into it.
Node red could certainly do it, I record pressure into a database so checking for a drop over time wouldn't be that tricky once you have the rest sorted out.
What about a change of nearly 3hPa in 3 minutes? This is a close shave with a tornado a few weeks ago in Portugal
2018-03-16, 02:22 PM
3 hPa in 3 min that's scary
I was thinking of using a global variable to store the data of the last 4 hours or so. I guess that would be an easy approach for beginners.
I was thinking of using a global variable to store the data of the last 4 hours or so. I guess that would be an easy approach for beginners.
2018-03-16, 02:48 PM
(2018-03-16, 02:22 PM)shark24 Wrote: [ -> ]3 hPa in 3 min that's scary
I was thinking of using a global variable to store the data of the last 4 hours or so. I guess that would be an easy approach for beginners.
Good idea - here's an easy way to store signalk values into global variables, well some sensor signalk anyway. >
Plug the output into a MQTT out and you can see all the data on the web as well
Code:
[
{
"id": "72db7bb3.6de9e4",
"type": "websocket in",
"z": "3f30ea31.da3756",
"name": "SignalK input",
"server": "fc1b2b62.0b63a8",
"client": "",
"x": 169,
"y": 809,
"wires": [
[
"fd8f5723.077e38"
]
]
},
{
"id": "fd8f5723.077e38",
"type": "function",
"z": "3f30ea31.da3756",
"name": "Create global variable",
"func": "obj=msg.payload.updates[0].values[0].path;\nvalue=msg.payload.updates[0].values[0].value;\nglobal.set(obj, value);\n\nmsg.payload = value;\nmsg.topic = obj;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 308,
"y": 902,
"wires": [
[
"6e82c403.2d258c",
"ec14fb6b.9c39e8"
]
]
},
{
"id": "6e82c403.2d258c",
"type": "debug",
"z": "3f30ea31.da3756",
"name": "",
"active": false,
"console": "false",
"complete": "true",
"x": 547,
"y": 915,
"wires": []
},
{
"id": "ec14fb6b.9c39e8",
"type": "mqtt out",
"z": "3f30ea31.da3756",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "d07a7e43.825c9",
"x": 597,
"y": 848,
"wires": []
},
{
"id": "fc1b2b62.0b63a8",
"type": "websocket-listener",
"z": "",
"path": "ws://localhost:3000/signalk/v1/stream",
"wholemsg": "false"
},
{
"id": "d07a7e43.825c9",
"type": "mqtt-broker",
"z": "",
"broker": "m10.cloudmqtt.com",
"port": "16098",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"willTopic": "",
"willQos": "0",
"willPayload": "",
"birthTopic": "press",
"birthQos": "0",
"birthPayload": "test birth"
}
]
2018-03-16, 04:15 PM
(2018-03-16, 02:48 PM)PaddyB Wrote: [ -> ](2018-03-16, 02:22 PM)shark24 Wrote: [ -> ]3 hPa en 3 min c'est effrayant
Je pensais utiliser une variable globale pour stocker les données des 4 dernières heures. Je suppose que ce serait une approche facile pour les débutants.
Bonne idée - voici un moyen facile de stocker des valeurs de signal dans des variables globales, ainsi qu'un signal de capteur de toute façon. >
Branchez la sortie dans un MQTT et vous pouvez voir toutes les données sur le web ainsi
Code:[
{
"id": "72db7bb3.6de9e4",
"type": "websocket in",
"z": "3f30ea31.da3756",
"name": "SignalK input",
"server": "fc1b2b62.0b63a8",
"client": "",
"x": 169,
"y": 809,
"wires": [
[
"fd8f5723.077e38"
]
]
},
{
"id": "fd8f5723.077e38",
"type": "function",
"z": "3f30ea31.da3756",
"name": "Create global variable",
"func": "obj=msg.payload.updates[0].values[0].path;\nvalue=msg.payload.updates[0].values[0].value;\nglobal.set(obj, value);\n\nmsg.payload = value;\nmsg.topic = obj;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 308,
"y": 902,
"wires": [
[
"6e82c403.2d258c",
"ec14fb6b.9c39e8"
]
]
},
{
"id": "6e82c403.2d258c",
"type": "debug",
"z": "3f30ea31.da3756",
"name": "",
"active": false,
"console": "false",
"complete": "true",
"x": 547,
"y": 915,
"wires": []
},
{
"id": "ec14fb6b.9c39e8",
"type": "mqtt out",
"z": "3f30ea31.da3756",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "d07a7e43.825c9",
"x": 597,
"y": 848,
"wires": []
},
{
"id": "fc1b2b62.0b63a8",
"type": "websocket-listener",
"z": "",
"path": "ws://localhost:3000/signalk/v1/stream",
"wholemsg": "false"
},
{
"id": "d07a7e43.825c9",
"type": "mqtt-broker",
"z": "",
"broker": "m10.cloudmqtt.com",
"port": "16098",
"clientid": "",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": true,
"willTopic": "",
"willQos": "0",
"willPayload": "",
"birthTopic": "press",
"birthQos": "0",
"birthPayload": "test birth"
}
]
Merci pour vos réponses. Je soupçonnais que la solution était l'utilisation du nœud rouge. Je ne comprends rien aux programmes :-) Je vais d'abord chercher des tutoriels en français pour commencer.