Intermittent sensor readings and graphs

Moderator: leecollings

Post Reply
blablabla
Posts: 1
Joined: Wednesday 20 March 2019 15:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Intermittent sensor readings and graphs

Post by blablabla »

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:

Code: Select all

http://<IP>:<PORT>/json.htm?type=command&param=udevice&idx=2&nvalue=foo&svalue=foo
However, it updates the value to 0, and keeps getting the value every 5 minutes. For example:

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
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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest