Autor Thema: Plotting rarely changing readings  (Gelesen 346 mal)

Offline spaceboy

  • New Member
  • *
  • Beiträge: 9
Plotting rarely changing readings
« am: 06 Februar 2017, 23:59:18 »
Hi all,
I'm trying to figure out how to plot a mostly constant reading that is changing very rarely, for example a desired temperature set on a dial. To avoid creating event on every update, I have the event-on-change-reading attribute set. But when the last update is out of plot zoom scope, the reading is missing. What I would like to achieve is either:
- make the plot look back for the latest value before its start to know where to begin
- force creating reading update events for example every hour
- anything else that you might suggest

Thanks for any help!

Petr

Offline Benni

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1630
  • FHEMinist
Antw:Plotting rarely changing readings
« Antwort #1 am: 07 Februar 2017, 05:30:32 »
Hallo Petr,

Take a look at addlog you can call it via at (maybe  every hour) to manually add a log point.

But take care! There can be side effects using this. As addlog itself makes use of the  trigger command notify, watchdogs or DOIF listening to the same readings may be executed.

Another possibility would be to use a logProxy-device. As I currently do not use it I can not describe in detail how to achieve what you want. As I understand, the extend attribute might be helpful.

Benni.
FHEM (FL 9.9) (configDB+DbLog) auf Debian Wheezy.
Jede Menge HM mit 2x HMUART (WeMos+esp-link) über VCCU.
UniRoll an CUL868. Sebury F2-2 RFID über ESPEasy
Module: 98_rssFeed und 98_QRCode

Offline chapelhill

  • New Member
  • *
  • Beiträge: 32
Antw:Plotting rarely changing readings
« Antwort #2 am: 07 Februar 2017, 23:39:25 »
There might well be other better ways but if you log using database instead of text file the it is a relatively simple script to add in a reading at say 5 minutes past midnight at the last known reading value in time and have that script called once per day at say 5am.
I need to convert my logs to db so it is too early to say how easy it is as a log file can contsin different types of data so each log file possibly requires the script to have some tweaks.
We would need to confirm that FHEM does not see these inserts for triggers or dimilar as has been mentioned.

 

decade-submarginal