myhouse-project / myHouse

Home monitoring and automation suite with interactive Slack bot
GNU General Public License v3.0
2 stars 0 forks source link

heartbeat elapsed time #297

Closed user2684 closed 5 years ago

user2684 commented 7 years ago

Reported by: core-c

Hi all, First of all: Great work user2684. Your myHouse is a powerful controller.. (y) a fine product.

I just added a check to see if my sensornode is offline or not, and basically copied your example. What i've noticed, is that something like this:

  "modules": [
      "rules": [
          "definitions": {
              "minutes_since": "mysensors:network:heartbeat_sensornode,-1,-1,elapsed"

makes minutes_since evaluate to "4 minutes" (for example), including the English text "minutes". I've added an extra language for all the texts in myHouse, but i still always use english. :) What if i choose the other language? BTW. All works well.. myHouse even swallows "minutes_since > threshold".

user2684 commented 7 years ago

Original comment by: user2684

Hey there! I did my best to avoid any hard-coded text but this got out of my radar :-/ Waiting for the next release would be probably too long (https://sourceforge.net/p/my-house/tickets/223/), I'd recommend to just open the alerter.py file and on line 245 replace "minutes" with whatever you need to show up and restart the service. I know, not ideal but quicker and effective :)

user2684 commented 7 years ago

Original comment by: core-c

:) no problem at all.. I never looked into your source-code.. not yet.. ,because there is just so much more to explore. And it is really something hardly worth mentioning (all works well, the rule has no problem executing at all). Thanks for your quick reply.