Hi,
Is there way to run a script on a new sensor value before it is stored in the value database?
I think it is possible as I once wrote a script that ate all my sensor values...
What I want to do:
1. a sensor value comes in.
2. I want to do some checking (eg. the water temp of my fish pond can´t be 2000C. Yes, I do get such values...)
3. ignore bad values.
Maybe an (optional) value range for each sensor might be a good idea.
Tom
test sensor values before storing in database
Moderators: leecollings, remb0
-
- Posts: 29
- Joined: Wednesday 17 May 2017 0:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Belgium - Ghent
- Contact:
test sensor values before storing in database
Raspberry Pi 3B v1.3 - 16GB SDcard - Raspbian Bullseye
Aeotec Z-Stick Gen5 (ZW090) -> Z-Wave JS UI -> mosquitto
RFXCOM RFXtrx433E
Unifi controller -> Domoticz-Unifi-Presence plugin
Nest thermostat
SAJ solar convertor
Smart Gateway Gas/water meter
Aeotec Z-Stick Gen5 (ZW090) -> Z-Wave JS UI -> mosquitto
RFXCOM RFXtrx433E
Unifi controller -> Domoticz-Unifi-Presence plugin
Nest thermostat
SAJ solar convertor
Smart Gateway Gas/water meter
- waltervl
- Posts: 5846
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: test sensor values before storing in database
The hardware gateway (integration or python plugin) should manage this.
There is no possibility to script this.
If you have a Dummy device created you probably using an external script that fills the dummy device. So that script can do the validation first.
There is no possibility to script this.
If you have a Dummy device created you probably using an external script that fills the dummy device. So that script can do the validation first.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 29
- Joined: Wednesday 17 May 2017 0:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.6
- Location: Belgium - Ghent
- Contact:
Re: test sensor values before storing in database
I don´t think the hardware gateway 'can' solve this problem.
It can´t know how I'm using a sensor. For example, I have a RF sensor in my freezer which should never display 30C. Air temp sensors should display 30C.
Besides that I have temp sensor coming from an RFXCom and from Z-wave. Different hardware, same issue...
Each sensor already has a correction factor that can be set.
If you would add a value range option there, it would solve the problem...
It can´t know how I'm using a sensor. For example, I have a RF sensor in my freezer which should never display 30C. Air temp sensors should display 30C.
Besides that I have temp sensor coming from an RFXCom and from Z-wave. Different hardware, same issue...
Each sensor already has a correction factor that can be set.
If you would add a value range option there, it would solve the problem...
Raspberry Pi 3B v1.3 - 16GB SDcard - Raspbian Bullseye
Aeotec Z-Stick Gen5 (ZW090) -> Z-Wave JS UI -> mosquitto
RFXCOM RFXtrx433E
Unifi controller -> Domoticz-Unifi-Presence plugin
Nest thermostat
SAJ solar convertor
Smart Gateway Gas/water meter
Aeotec Z-Stick Gen5 (ZW090) -> Z-Wave JS UI -> mosquitto
RFXCOM RFXtrx433E
Unifi controller -> Domoticz-Unifi-Presence plugin
Nest thermostat
SAJ solar convertor
Smart Gateway Gas/water meter
- waltervl
- Posts: 5846
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: test sensor values before storing in database
I think there is something else wrong if you have this many incorrect values coming from your sensors.
I do not use RF nor Zwave, only use Zigbee but I never have discrepancies in reported values.
I know Zwave has some checks for incorrect energy readings. But that is still arranged in the hardware gateway as indicated before.
I do not use RF nor Zwave, only use Zigbee but I never have discrepancies in reported values.
I know Zwave has some checks for incorrect energy readings. But that is still arranged in the hardware gateway as indicated before.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest