Recording a Devices state change to csv file for MatPlotLib

Posted on
Fri Sep 06, 2019 6:15 am
Busta999 offline
User avatar
Posts: 589
Joined: Mar 30, 2016
Location: Wales UK

Recording a Devices state change to csv file for MatPlotLib

I am revisiting an idea........

Can't remember if I have raised it before.

Is there a way to record a Device state change to a CSV that MatPlotLib could read to create a graph?

The things I am looking at are :-

Motion Sensors - On/Off
Heating - On/Off
Hot Water On/Off

The Hot Water is fairly easy, it tends to be one for over an hour when it comes on and as such would be picked up by a 15 minute sampling cycle.

The Motion Sensors and Heating tend to be on for shorter periods, Motion Sensors for a couple of minutes, the Heating for 5 minutes to tweak rooms to temp.

Any ideas or just ramp up a MatPlotLib cycle to every minute?

Posted on
Sun Sep 08, 2019 3:01 pm
Busta999 offline
User avatar
Posts: 589
Joined: Mar 30, 2016
Location: Wales UK

Re: Recording a Devices state change to csv file for MatPlot

Had a play around with MatPlotlib and made this.

Chart - 1Min - Motion.png
Chart - 1Min - Motion.png (30.3 KiB) Viewed 101 times


Shows activity in 8 monitored places around the house.

Some of it is the dogs wandering around, but will help in confirming assumptions I made on when and where to heat the house to 20C and where not to.

Had fun doing this :-)

Posted on
Sun Sep 08, 2019 3:31 pm
DaveL17 offline
User avatar
Posts: 4915
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Recording a Devices state change to csv file for MatPlot

That's great. Nice job!

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest