Energy Monitor - How to setup periodic KW/h notifications?

I have installed the whole house energy meter and can read via login the KW/h. But instead logging into my account I like to setup that at 2 times a day the KW/h usage is send by email. The notification tab for the meter allows only 'notification by high or low watt usage" and not a periodic sending of the KW/h readings. Can this be done by a code? Any help is very appreciated. I am trying to setup a system for vacation rentals where guests have to pay for their power usage without the need of the property manager to drive out and read the meters.

First of all, please install and setup the SMTP Notification plugin. Then, create a scheduled scene, and insert the following code in the luup section :

local powerDeviceId = <your device id>
local smtpDeviceId = <your smtp device id>

local kwatts = luup.variable_get("urn:micasaverde-com:serviceId:EnergyMetering1", "KWH", powerDeviceId)
luup.call_action("urn:upnp-org:serviceId:SmtpNotification1", "SendEmail", { Recipient_Name="Rental #42", Recipient_eMail="rental@mybusiness.com", Subject= "Energy from Rental #42", Message="Power Meter="..kwatts }, smtpDeviceId)
return true

This code can be improved to loop over all your energy meter (to save scenes). Left as an exercise :wink:
:wink:

I see the same request was posted on the Power Management / Energy Monitor board:

[url=http://forum.micasaverde.com/index.php/topic,14681.0.html]http://forum.micasaverde.com/index.php/topic,14681.0.html[/url]

Makes it a bit difficult to gather a coherent view of the responses…

…don’t know if there’s a way to consolidate?