We have moved at community.getvera.com

Author Topic: Free graphs for your temp/power sensors  (Read 2532 times)

Offline tomtcom

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1050
  • Karma: +27/-31
Re: Free graphs for your temp/power sensors
« Reply #60 on: March 24, 2019, 07:18:49 pm »
Another question for clarification please.

I have the HG Timer in startup lua for 600. I know as everyone does vera luup engine reloads more than it ever should. Does luup reload not cause the HG Timer to restart?

I ask because after 22 hours my graphs didn't update until I did a vera reboot and then it all kicked in.

If startup lua doesn't run until a reboot then we'll have to build something around it otherwise logging will be constantly missed.

What's your opinion?

Offline ipstas

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Free graphs for your temp/power sensors
« Reply #61 on: March 24, 2019, 07:53:23 pm »
yeah, that's bugging me too.
Lua doesn't have any useable interval function. So the only way to make it updating is to call delay function from HGTimer function which will call HGTimer again after the delay. If for any reason delay is screwed up HGTimer will not be called again until lua startup or reboot or user manually run in Lua test window
Code: [Select]
monitcode = require("Moniton")
monitcode.HGTimer(600)

Like Uroboros and sometimes Uroboros has missed its own tail.

I am not sure what would be the best way to go around that, fow now I think I can do push notifications in a browser to let user know feeds are stalled.

Also, I have just updated Moniton.lua, made it a bit more robust, you can try that one