Forget Me Not :  eLDERmon  Charts

 

 

Link to other posts
Forget Me Not : eLDERmon Intro
Forget Me Not :  eLDERmon  Electrical
Forget Me Not :  eLDERmon  Outlets
Forget Me Not : eLDERmon Planning
Forget Me Not : eLDERmon Parts 1
Forget Me Not :  eLDERmon  Sponsor Parts
Forget Me Not : eLDERmon Hardware Hacking
Forget Me Not : eLDERmon GNUplot
Forget Me Not: eLDERmon Protocol
Forget Me Not : eLDERmon Hardware Hacking #2
Forget Me Not : eLDERmon Hardware Hacking #3
Forget Me Not : eLDERmon Tim

 

This week has been hetic because of other tasks, not related to this challenge.

 

So in the few hours I had available, I concentrated on some tidying tasks and looking at the charting functions.

 

Bedroom Sensor

This was giving me grief, so I bit the bullet and reprogrammed it.

 

I was certain it was an STM330, but on closer inspection its actually an STM310.

Maybe I had programmed it incorrectly, maybe I picked up a sensor I hadn't programmed, but whatever it's now working and recording a temperature.

 

 

Now I have it working, I need to try adding a lux sensor.

 

 

Like ravi_butani I was struggling to sort out a 0.5" pitch (1.27mm) connector, but have finally resolved this, and found these.

Capture.PNG

 

Thanks to element14's fast delivery it will be next day (well except its the weekend), so Monday is the next working day.




Charts

For my purpose, instant status isn't required, so I have been looking at options using trends or charts.

I'm trialing something at the moment, which does everything I want.


I'm still hesitant regarding it, as openHAB has crashed twice, BUT I can't say if this is the cause or not.


Full_Day.png  Spikes.png

                              The Outside unit (on the windowsill inside) is getting struck by sunlight ... hence the peaks


While openHAB has charting ability, you are stuck with whatever you initially setup in the sitemap.

The first chart shows all the temperatures, and the nice part is if you place the mouse over the line, it highlights and gives time and data values.


    multiple_plot.png                

This plot includes the Humidity, which is useful, but the lines joining is distracting, so a fixed chart may be a pain.


Zoom.png

The ability to zoom into any part is VERY useful, and is a simple matter of dragging the mouse across the area you want.


This charting option allows much greater flexibility.




Movement Sensors

My proposal was to include movement sensors, to track movement trends, and ensure Granny is not just staying in the Bedroom or Living room.


The problem was how to display it in a meaningful manner that was relative to the other information.


PantryDoor.png


My first attempt was to take the change, allocate it to a Number item with a value of 10 (so it appeared higher in the charts) or 0.

This worked but as the result above showed, the chart smooths it out and simply plots between the values.



After some head scratching and many cups of coffee later, I decided to modify the rule and update the value before changing it to the new value.


rule "update Movement Graph"
when
  Item Pantry_Door changed or
  Time cron "0 0 0 * * ?" or
  System started
  then if (Pantry_Door.state == OPEN)postUpdate(Pantry_Door_Graph,0)
       if (Pantry_Door.state == OPEN)postUpdate(Pantry_Door_Graph,10)
       if (Pantry_Door.state == CLOSED)postUpdate(Pantry_Door_Graph,10)
       if (Pantry_Door.state == CLOSED)postUpdate(Pantry_Door_Graph,0)

end



It's a solution that works but could be tidied up.


PantryDoor2.png

          This certainly makes it obvious when the Pantry Door is open


I'll apply the same trick with the Movement sensors.


So while its not complete, I can see that the ability to add and subtract from the graph is very useful, and will show what I want.

More importantly it allows flexibility.



Stability

Following the unexpected crash, I decided to give the whole Raspberry Pi a reboot.

This should clear out any lingering memory leaks, as its been started and stopped and pushed and pulled many times over the last few weeks.


In the meantime I'm trying to NOT do any changes so I can check on the stability.


I have some sensors to put together, so NOT being able to touch it, is a good way to force me into the workshop and fire up the soldering iron.



Mark