[ANSWERED]: newbie question - battery notify, heating sync..

Posted on
Mon Sep 15, 2014 5:15 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

[ANSWERED]: newbie question - battery notify, heating sync..

Switching from fibaro HC2 to Indigo6.

So far, indigo is extremely more reliable and functional. Really impressed.

Quite a few basic questions

1) Easiest way to provide "low battery" notifications?

I.e. some trigger event for all battery-powered devices.
I'm not seeing how to do that right now, obviously I'm missing something :) It's basic functionality which should be exists.

Now it is possible to configure only per-device (triggers).

May be the good idea to add some virtual device model like "All battery-powered"?

2) How to sync thermostats? I.e. I've got (each room) wall thermostats HRT4-ZW and Danfoss Valves.

On HC2, I synced them with lua code (temperature changed manually on the wall thermostat will be pushed to Danfoss valve).

With Indigo, I thought it will be really easy to do that with triggers / variables, but there is no way to "setpoint" thermostat from a variable in the current version of the software.
Is it possible to add this feature? Will be useful.

Right now, the only way is Python / AppleScript?

3) Is it possible to ask to add "and / or" device logic to triggers? I.e. "if this motion sensor or this motion sensor triggers".. Right now, all triggers are "per a single device", which is forcing us to duplicate triggers (not so convenient in case of some changes to make)

I understand that it is possible (quite easily) to do that with variables, but still it is more complicated...

Posted on
Mon Sep 15, 2014 7:11 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Some newbie question - battery notification, heating syn

1) Much more comprehensive battery level tracking is definitely on the feature request list. For now it requires a trigger per battery operated device.

2) To sync a device setpoint to a variable value you will need python code like:
Code: Select all
setpoint = indigo.variables[1234].getValue(float)   # where 1234 is ID of your sync setpoint variable
dev = indigo.devices[5678]                          # where 5678 is the ID of one of your thermostat devices
indigo.thermostat.setCoolSetpoint(dev, setpoint)    # or setHeatSetpoint()

3) Indigo doesn't have multiple trigger logic (per trigger), but there are a couple of approaches you can take, each does require multiple Triggers though:

   1. put the actions into an Action Group so that each individual trigger shares the same actions (so editing the Action Group will edit the actions executed by all triggers)

   2. have all of your triggers bump/increment an Indigo variable value you create ("motionSenseCount"), and then have the real logic inside an additional Trigger that fires when the Variable value "motionSenseCount" has any change.

Image

Posted on
Mon Sep 15, 2014 7:46 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: [ANSWERED]: newbie question - battery notify, heating sy

Matt,

Thank you very much. So impressed by the support.

Please consider (IMHO) a bit more advanced battery notification feature as quite important... For example, I've got 30+ battery powered devices in my network.

Not so easy to create trigger per device :)

But not a critical flaw for sure.

Posted on
Mon Sep 15, 2014 8:18 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: [ANSWERED]: newbie question - battery notify, heating sy

Yeah, it is definitely pretty high on my personal wish list.

Note you can duplicate Triggers though, so it probably won't take too long to create a bunch of them (duplicate, edit device in trigger, rinse and repeat).

Image

Posted on
Mon Sep 15, 2014 8:29 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: [ANSWERED]: newbie question - battery notify, heating sy

Yes, sure. Already doing that. Right now :)

BTW temperature syncing works brilliant.
So happy with Indigo...

Posted on
Mon Oct 13, 2014 3:26 pm
strudel offline
Posts: 13
Joined: Oct 02, 2014

Re: [ANSWERED]: newbie question - battery notify, heating sy

FWIW - I completely agree on the prioritization of this feature request. I currently have a number of batteries, wifi signals, rf signals, heartbeats and last updated health checks that Imonitor.

I was in the same situation and here is what I did to get myself some meaning notifications.

There are three main components to monitoring the health of my devices.
Device Trigger - I created a trigger for each health condition I want to monitor that when triggered, writes to a variable called "HealthAlert". The trigger writes something meaningful about the alert. Something like "Battery low on weather station" or "Last update from Netatmo has exceeded 2 hours"
Variable Trigger - I created another trigger that watches the value of the variable "HealthAlert". When it sees that this variable has been updated to something other than blank, it triggers an action called Health Alert Announcement.
Health Announcement Action - When executed, this action notifies me of the contents of the "HealthAlert" variable giving me a contextual alert such as "Battery low on weather station" rather than a generic announcement. It then waits 30 seconds and then resets the value of "HealthAlert" to blank.

Posted on
Fri Dec 12, 2014 4:09 pm
Redrocker offline
Posts: 81
Joined: Jan 20, 2010

Re: [ANSWERED]: newbie question - battery notify, heating sy

Bump

~Mark
Indigo 2021.2

Posted on
Fri Dec 12, 2014 5:18 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: [ANSWERED]: newbie question - battery notify, heating sy

What exactly are you bumping :?:

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Dec 12, 2014 10:14 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]: newbie question - battery notify, heating sy

Here's a very simple script that can be used in a schedule (once per day is probably more than plenty) that should catch all battery-operated devices. It requires you to set up Indigo's email capabilities to work properly, but could be revised to set a variable value or whatever instead. Change the two first lines to taste.

Code: Select all
targetLevel = 10
emailAddress = "me@me.com"

for dev in indigo.devices.itervalues():
   if dev.batteryLevel:
      if dev.batteryLevel < targetLevel:
         emailBody = (u'%s battery level: %s' % (dev.name, dev.batteryLevel))
         indigo.server.sendEmailTo(emailAddress, subject="Indigo Low Battery Alert", body=emailBody)

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

[My Plugins] - [My Forums]

Posted on
Sun Nov 13, 2016 11:14 am
Bollar offline
Posts: 528
Joined: Aug 11, 2013

Re: [ANSWERED]: newbie question - battery notify, heating sy

DaveL17 wrote:
Here's a very simple script that can be used in a schedule (once per day is probably more than plenty) that should catch all battery-operated devices. It requires you to set up Indigo's email capabilities to work properly, but could be revised to set a variable value or whatever instead. Change the two first lines to taste.

Code: Select all
targetLevel = 10
emailAddress = "me@me.com"

for dev in indigo.devices.itervalues():
   if dev.batteryLevel:
      if dev.batteryLevel < targetLevel:
         emailBody = (u'%s battery level: %s' % (dev.name, dev.batteryLevel))
         indigo.server.sendEmailTo(emailAddress, subject="Indigo Low Battery Alert", body=emailBody)

Thanks for this - incredibly simple and fixed the problem I have with not knowing if devices have gone offline due to low battery. (Thought that feature was going to be in I7. Oops)

Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts

Posted on
Sun Nov 13, 2016 12:59 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]: newbie question - battery notify, heating sy

Haven't seen that for a while. Glad you found it helpful.

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

[My Plugins] - [My Forums]

Posted on
Sat Feb 09, 2019 8:58 pm
Dual offline
Posts: 257
Joined: Feb 05, 2019

Re: [ANSWERED]: newbie question - battery notify, heating sy

Thanks for the code. I am new to Indigo (3 days and counting). And I have never used Python until today. However, I have already modified your code and scheduled it to send one email with the state of all batteries (i.e. even if 100%). Indigo rocks! And Python ... thanks to google I can figure it out.

Posted on
Sun Feb 10, 2019 5:26 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]: newbie question - battery notify, heating sy

Glad you found it helpful. I didn't know Python when I came over to Indigo from Vera (I never did take the time to learn Lua.) A couple of resources I found very helpful were Google's own training videos and MIT's Open Courseware Python course.

https://www.youtube.com/watch?v=tKTZoB2Vjuk&list=PLC8825D0450647509
https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-0001-introduction-to-computer-science-and-programming-in-python-fall-2016/

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

[My Plugins] - [My Forums]

Posted on
Sun Jun 23, 2019 10:07 am
captcurrent offline
Posts: 440
Joined: Nov 28, 2005

Re: [ANSWERED]: newbie question - battery notify, heating sy

This is exactly what I want

But as usual. I just don't seem to get it

To test I added an action group with the following script
Code: Select all
targetLevel = 100
emailAddress = "reallyme@somewhere.com"

for dev in indigo.devices.itervalues():
   if dev.batteryLevel:
      if dev.batteryLevel < targetLevel:
         emailBody = (u'%s battery level: %s' % (dev.name, dev.batteryLevel))
         indigo.server.sendEmailTo(emailAddress, subject="Indigo Low Battery Alert", body=emailBody)




I added a schedule. and figured with 100 thresh hold I would get a good start position
Log says its is running my no email or errors in log

It has to be something simple I am not doing . Thoughts or suggestions?

Posted on
Sun Jun 23, 2019 11:03 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]: newbie question - battery notify, heating sy

I ran your script manually and it worked for me.

Are you able to receive emails from Indigo for other things?

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

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest