Hey,
i just have build me a rain gauge by this tutorial:
https://www.mysensors.org/build/rain
i see in the terminal that it work - but, how dit i become the variables to my Pimatic?
thanks
MySensors Rain Gauge
Hey,
i just have build me a rain gauge by this tutorial:
https://www.mysensors.org/build/rain
i see in the terminal that it work - but, how dit i become the variables to my Pimatic?
thanks
This is the example config for a device with nodeid 51.
{
"attributes": [
{
"name": "RainRate",
"nodeid": 51,
"sensorid": 3,
"sensortype": 7,
"type": "integer",
"booleanlabels": [
"true",
"false"
],
"unit": "tips/h",
"label": "Rate"
},
{
"name": "Rain",
"nodeid": 51,
"sensorid": 3,
"sensortype": 6,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"unit": "mm",
"label": "Total",
"acronym": "Total"
},
{
"name": "Tripped",
"nodeid": 51,
"sensorid": 4,
"sensortype": 16,
"type": "boolean",
"booleanlabels": [
"true",
"false"
]
}
],
"xAttributeOptions": [],
"id": "raingauge",
"name": "RainGauge",
"class": "MySensorsMulti"
}
Sensor types you will find at https://www.mysensors.org/download/serial_api_20#set,-req
The example sketch uses configuration parameters which are retrieved b request from gateway. As far as I know this is not supported yet by pimatic.
https://forum.pimatic.org/topic/494/mysensors-data-request
But alternatively you cannot live with the default settings in the sketch, modify the sketch or send the config variables with a send command from pimatic. The latter you can do e.g. with VariableInputDevice devices and a rule. Not safe but a suitable workaround.
send custom \"V_VAR1\" nodeid: \"51\" sensorid: \"3\" cmdcode: \"$rain-window.input\"
send custom \"V_VAR2\" nodeid: \"51\" sensorid: \"3\" cmdcode: \"$rain-sensorthreshold.input\"
I forgot the rain history for the last 5 days. Here a more complete device definition:
{
"attributes": [
{
"name": "Rain",
"nodeid": 51,
"sensorid": 3,
"sensortype": 6,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"unit": "mm",
"label": "Total",
"acronym": "Total"
},
{
"name": "Day 1",
"nodeid": 51,
"sensortype": 24,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"acronym": "d1",
"unit": "mm",
"label": "Day 1",
"sensorid": 3
},
{
"name": "Day 2",
"nodeid": 51,
"sensorid": 3,
"sensortype": 25,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"acronym": "d2",
"unit": "mm",
"label": "Day 2"
},
{
"name": "Day 3",
"nodeid": 51,
"sensorid": 3,
"sensortype": 26,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"acronym": "d3",
"unit": "mm",
"label": "Day 3"
},
{
"name": "Day 4",
"nodeid": 51,
"sensorid": 3,
"sensortype": 27,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"acronym": "d4",
"unit": "mm",
"label": "Day 4"
},
{
"name": "Day 5",
"nodeid": 51,
"sensorid": 3,
"sensortype": 28,
"type": "float",
"booleanlabels": [
"true",
"false"
],
"acronym": "d5",
"unit": "mm",
"label": "Day 5"
},
{
"name": "RainRate",
"nodeid": 51,
"sensorid": 3,
"sensortype": 7,
"type": "integer",
"booleanlabels": [
"true",
"false"
],
"unit": "tips/h",
"label": "Rate"
},
{
"name": "Tripped",
"nodeid": 51,
"sensorid": 4,
"sensortype": 16,
"type": "boolean",
"booleanlabels": [
"true",
"false"
]
}
],
"xAttributeOptions": [],
"id": "raingauge",
"name": "RainGauge",
"class": "MySensorsMulti"
}
Thank you very much
i will inform you when my setup is ready