We have moved at community.getvera.com

Author Topic: Battery Low notifications  (Read 40725 times)

Offline pgrover516

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1013
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #60 on: May 02, 2011, 06:52:43 pm »
I'm aware of the voltage differences involved but have had equal reliability with either type (alkaline or NiMH), the shelf life of Nimh batteries varies greatly from the older types to the newest which have much improved self discharge characteristics, and far superior cold weather performace (to alkalines) which I need as I am monitoring cold areas, in any case the battery readings of my sensors worked just the same with alkalines, "a little flaky" as pointed out by another, I love the work you've done here, just saying some of my sensors dont give useful reports
« Last Edit: May 02, 2011, 06:54:22 pm by pgrover516 »
V1,V2,V3,VLite,Express Controls HSM-100,Intermatic HA20C, HA04C,HA02C,HA09, Leviton VRP15-1LW, VRS15-1LX,Home Manageables HM-TS001,Schlage FE599, Schlage BE369, Cooper RF9500, Aeon Labs Minimote, Schlage TZEMT400AB32MAA+more

Offline FlyBoyBob

  • Full Member
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #61 on: May 02, 2011, 07:13:08 pm »
... just saying some of my sensors dont give useful reports
I appreciate the feedback and the report on using rechargeable batteries with these devices.

I would highly recommend though that anyone using anything other than Duracell batteries give them a try for at least a few days before looking for any other reasons for faulty operation. I have used both Energizer and store-branded batteries and also had trouble with these sensors. And there seems to be a period of time after putting in new or different batteries for them to "adjust", I'm not sure if it's the HSM100's themselves of the Vera, but sometimes good batteries and *time* fixes problems in these devices.

Thanks again for the feedback!
bob

Offline CMRancho

  • Hero Member
  • *****
  • Posts: 1008
  • Karma: +1/-0
Re: Battery Low notifications
« Reply #62 on: May 02, 2011, 08:32:34 pm »
I switched over from Duracells to Eneloop rechargeables six or eight months ago. I use them in locks and 3-in-1s. The Eneloops give me far better reliability and far longer life than the Duracells ever did.
« Last Edit: May 02, 2011, 08:36:29 pm by CMRancho »
Vera123beta; Schlage, Kwikset, TZEMT400; Linksys cams, Smarteye cams, HSM100; Aeon, Everspring, Cooper, Leviton, Intermatic, FortrezZ, Global Caché, USB-UIRT, Somfy, etc.

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: Battery Low notifications
« Reply #63 on: May 03, 2011, 07:46:56 am »
Intrepid:

You are missing code to exit if there is no message to send:
Code: [Select]
if (room=="") then
  return false
end
Place it just before the line that builds "local message_out". It will exit if the variable "room" is never filled in with text.

I put the code in as a single line myself but made it 3 lines here to make it clear to non-programmers. I probably dropped that out of my code examples because it is "between" the two jobs that they do - I will go back to my original posts again and see if I can put it in a logical place.

Thanks for pointing that out!
bob


Thanks, that seems to work.  Just curious, since I have 5 devices being tested in one scene, what will happen if more than one device is below the test limit?  I assume if will only format and send one message per run?  The first one?  then when that one is 'fixed' (batteries replaced), the next failing one would be reported?


Offline FlyBoyBob

  • Full Member
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #64 on: May 03, 2011, 08:25:52 am »
...what will happen if more than one device is below the test limit?  I assume if will only format and send one message per run?  The first one?  then when that one is 'fixed' (batteries replaced), the next failing one would be reported?
Actually since there is only one set of variables "room" and "level_to_report" they will be overwritten any time a level tests low, so it would be the last one that you get a report from.

I avoided getting fancy so the code would be minimal, but making separate variable sets, and testing each one, and adding end-of-line characters, and testing if none are set... would report all devices. But can you see why I tried not to complicate it?  :o

I would recommend you place the most important devices last in the code, like a door lock for instance, so it gets reported first.

Hope that helps,
bob

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: Battery Low notifications
« Reply #65 on: May 03, 2011, 10:07:25 pm »
is there a way to print the status message to the browser screen?

Offline Ap15e

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1998
  • Karma: +12/-0
Re: Battery Low notifications
« Reply #66 on: May 04, 2011, 04:02:16 am »
AFAIK, only a Luup plugin can display text on Vera's GUI. It wouldn't be too hard to implement using my minimal WAI plugin (http://forum.micasaverde.com/index.php?topic=6441.0) as a base.

Offline Intrepid

  • Hero Member
  • *****
  • Posts: 536
  • Karma: +4/-0
Re: Battery Low notifications
« Reply #67 on: May 04, 2011, 10:18:11 am »
If I'm reading correctly, the smtptogo service is only free for 7 days.  Am I missing something?

Offline FlyBoyBob

  • Full Member
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #68 on: May 04, 2011, 01:21:08 pm »
If I'm reading correctly, the smtptogo service is only free for 7 days.  Am I missing something?
"There's no such thing as a free lunch" ... or free SMTP service either!

I got many notices from smtptogo after about 2 weeks - all wanting me to sign up and pay money. I use my own smtp server and was only suggesting smtptogo as a valuable test site for anyone to see if they could get notifications working.

As I had mentioned early in this thread I had hoped someone would post a "free" webmail service (ie yahoo or hotmail or aol etc) that provides authentication compatible with the smtp code in the Vera, or that the Vera guys would improve the smtp code to work with better protected servers like gmail.

I also hope to win the lottery and be a millionaire...  ;D

Any/all postings on smtp server access appreciated here, I've already got my own which I pay $$ monthly for = sorry, not sharing  :P  (BTW I pay a LOT more/month than smtptogo charges, but I have websites)

It sure would be nice if MCV provided accounts on their smtp server for us wouldn't it?

bob

Offline ballroller

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #69 on: May 04, 2011, 01:27:45 pm »
If you Google "free smtp" there are a number of services. I don't know if they're compatible with Vera, but at least there are some possibilities.

Offline FlyBoyBob

  • Full Member
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #70 on: May 04, 2011, 01:34:09 pm »
If you Google "free smtp" there are a number of services. I don't know if they're compatible with Vera, but at least there are some possibilities.
That's how I found smtptogo.com.

Most articles in that google pon-deficate about the evils of having open smtp servers, and spammers.

If you find something better post it here please!

Thanks for the anticipated help,
bob

Offline ballroller

  • Sr. Member
  • ****
  • Posts: 286
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #71 on: May 04, 2011, 01:55:36 pm »
I just signed up with jangosmtp using a mailinator email address, and it went smoothly. I have not tested it yet, though. They allow 200 emails/month. From their site:

SMTP Relay

    Relay your transactional emails through relay.jangosmtp.net. You can authenticate by IP Address or by SMTP Username/Password (SMTP AUTH).
    Our SMTP server analyzes your email, disassembles it, adds in open and click tracking mechanisms, and adds in DomainKeys/DKIM signatures.
    Our SMTP server then re-assembles your email and passes it to a high performance SMTP server for sending to your recipient.
    Login to your account to view statistics on emails sent, opens, and clicks. You can also view SMTP log files.

edit: corrected to 200 emails/month, not day
« Last Edit: May 04, 2011, 04:32:14 pm by ballroller »

Offline harphaulingdad

  • Sr. Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #72 on: May 11, 2011, 10:04:42 pm »
Thanks for posting all this info! I tried the code out in a scene, using my back door open/close sensor as the device I want to check the battery level of. I get this error. Any help you can give me would be appreciated.

08   05/11/11 22:01:21.654   Scene::RunScene running 12 Back Door Sensor Battery Low <0x2c0c>
01   05/11/11 22:01:21.655   GetLuaInterface can't find device type: 3/0x8c4498 str: 4 <0x2c0c>
01   05/11/11 22:01:21.656   luup_variable_get interface 0x8c4cb0 args 3 <0x2c0c>


Offline FlyBoyBob

  • Full Member
  • ***
  • Posts: 163
  • Karma: +0/-0
Re: Battery Low notifications
« Reply #73 on: May 12, 2011, 08:19:20 am »
Hi Newbie harphaulingdad,

Most likely the serviceID for your device is different from all of the battery devices I have so....

The only way I know to get your serviceID (unless someone smarter than me posts something else to help you) is the method I describe in my post:
http://forum.micasaverde.com/index.php?topic=5982.msg35708#msg35708

With the XML file you can find your device and the BatteryLevel "service" and "variable" names.

I also have a Windows-based program that will automate fetching the info for you and allow you to test the names directly. Read:
http://forum.micasaverde.com/index.php?topic=5870.0

When you get your info just substitute it into the lines:
Code: [Select]
local serviceId  = "urn:micasaverde-com:serviceId:HaDevice1"
local variableId = "BatteryLevel"

Hope that helps!
bob
« Last Edit: May 12, 2011, 08:24:06 am by FlyBoyBob »

Offline oTi@

  • Community Beta
  • Master Member
  • ******
  • Posts: 4041
  • Karma: +32/-6
  • UI what ?!
Re: Battery Low notifications
« Reply #74 on: May 12, 2011, 08:38:38 am »
The only way I know to get your serviceID [...]
For variables (luup.variable_get / luup.variable_set):
Go into the Advanced tab of the device. The variables are listed at the bottom. Hover over the name and you'll see the serviceId.

For actions (luup.call_action):
I have a scratch scene. Go to the Advanced tab of the scene. Add the device you're interested in and you'll get a drop-down of the actions supported, grouped by serviceId.
« Last Edit: May 12, 2011, 08:47:47 am by oTi@ »
Dezwaved at the moment...