Battery status e-mail

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Battery status e-mail

Post by djo28 »

Hi,

I have searched the option but haven't found it.
I'd like to know if there is a way to stop Domotiga from sending the baterry status every night at midnight.

If it could only send the mail when battery is empty on one of the sensors. I don't need to know that the batteries are ok every morning when I wake up.

Maybe I just have s*** in the eyes and don't see the option :D

Thanks in advance.
wwolkers
Member
Member
Posts: 273
Joined: Tue Sep 23, 2008 10:10 am
Location: Netherlands
Contact:

Re: Battery status e-mail

Post by wwolkers »

should also have an option to email if the battery status is older than 24hrs then.
Else you might still miss some stuff :)
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Battery status e-mail

Post by RDNZL »

It's hardcoded and hidden in the EventLoop.module :oops:

Code: Select all

    ' mail list of devices with low battery
    ' and fetch random quote for this day
    IF Main.bNew_Day THEN
      Devices.MailBatteryStatus()
      Main.GlobalVar["Tagline"] = Main.Random_Text("remarks_tags")
    END IF
I have to create configurable event actions for things like this, same for doorbell, postal mail sensor, planttalk etc...
Will see what I can do shortly..
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Battery status e-mail

Post by RDNZL »

Ok, removed the code.
You can now use an condition action for this, and select type of report.
Just create an event with a time trigger when to report and attach a condition like the example in the screenshot below.
More build-in condition actions like this will follow soon...
MailBatteryStatus Condition.png
MailBatteryStatus Condition.png (38.32 KiB) Viewed 10022 times
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

Hi,

Thanks, that's one quick answer ! :D

I updated to version 0.1.197 but can't see the "Status" option under "Action" in the condition window.

Regards
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Battery status e-mail

Post by RDNZL »

Not all code changes are reflected in the binarie files on svn.
(DomotiGa.gambas and DomotiGaServer.gambas)
You can recompile them yourself when you load the project in Gambas IDE.

I have updated the binaries now, so you can just download and run them.
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

Hi,

Works perfectly now, many thanks to you.

Regards
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

I think I talked too quickly ...
When I tested I had one device with its battery empty so I did get an email but this week-end I changed the battery and now it still sends an email saying no devices matches condition battery empty.

Please DomotiGa, that's fine but in this case don't send an email :twisted:

Did I do something wrong ?
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

Any idea that could help ?
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Battery status e-mail

Post by RDNZL »

If any device is found with a battery status of empty it's added to the msg body, so having an empty msg is strange.

Can you post the mail you got, so I can check which pattern it matches.
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

Sorry for the delay in the answer, haven't been notified for your reply.

Here's the mail I get :

Code: Select all

No Devices found with Battery status that matches selection 'empty'

--
Powered by DomotiGa V0.1.197
Regards
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: Battery status e-mail

Post by RDNZL »

This is fixed in revision 633 http://domotiga.nl/changeset/633.
Regards, Ron.
djo28
Starting Member
Starting Member
Posts: 12
Joined: Wed Jan 12, 2011 5:11 pm

Re: Battery status e-mail

Post by djo28 »

Hello,

Seems to work fine now, many thanks to you.

Regards.
Post Reply

Return to “DomotiGa Forum”