Intermittent sensor readings and graphs
Posted: Wednesday 20 March 2019 15:51
Hi forum,
I want to use domoticz for saving and plotting data from a bluetooth sensor that would only work for some hours during the day.
I created a virtual sensor and I'm pushing data using python and API/JSON calls. I can see the last seen values properly. However, the graphs are continuously plotting data even if the sensor is not connected. For instance, it's using the last seen value so I can see a flat line during the non-working times. Since it would affect the average and analytics, I was wondering if it is way for managing this.
EDIT: I'm trying to find any kind of hack. For example:
Giving a wrong value as a 'foo' string with:
However, it updates the value to 0, and keeps getting the value every 5 minutes. For example:
Since I failed with that attempt, my next step was to disable the sensor. I figured out the way to disable the dummy hardware. It works, as no data is pushed to the database, however the graphs are not accesible if the hardware is disabled.
Any help or advice is very welcome.
Thanks.
I want to use domoticz for saving and plotting data from a bluetooth sensor that would only work for some hours during the day.
I created a virtual sensor and I'm pushing data using python and API/JSON calls. I can see the last seen values properly. However, the graphs are continuously plotting data even if the sensor is not connected. For instance, it's using the last seen value so I can see a flat line during the non-working times. Since it would affect the average and analytics, I was wondering if it is way for managing this.
EDIT: I'm trying to find any kind of hack. For example:
Giving a wrong value as a 'foo' string with:
Code: Select all
http://<IP>:<PORT>/json.htm?type=command¶m=udevice&idx=2&nvalue=foo&svalue=foo
Code: Select all
2019-03-20 14:15:00 100
2019-03-20 14:30:00 86
2019-03-20 14:35:00 85
2019-03-20 14:40:00 85
2019-03-20 14:45:00 85
2019-03-20 14:50:00 85
2019-03-20 14:55:00 85
2019-03-20 15:00:00 85
2019-03-20 15:05:00 85
2019-03-20 18:55:00 82
2019-03-20 19:00:00 85
2019-03-20 19:05:00 74
2019-03-20 19:10:00 76
2019-03-20 19:15:00 76
2019-03-20 19:20:00 76
2019-03-20 19:25:00 76
2019-03-20 19:30:00 76
2019-03-20 19:35:00 76
2019-03-20 19:40:00 76
2019-03-20 19:45:00 76
2019-03-20 19:50:00 76
2019-03-20 20:20:00 0
2019-03-20 20:25:00 0
2019-03-20 20:30:00 0
Any help or advice is very welcome.
Thanks.