@bfromdruten;
i have on the verelite only one usb which is now used for the meterkast reading
at the moment i recieve the following email
== Meterstanden van Tue Jun 26 11:23:10 2012, gas = 0, kwh1 = 0, kwh2 = 0 ==
so i get no data from the meterkast
i took the id device from the powermeter (s) but it does not work
which id i have to take
rgds
== quote ==
local smtp = require(“socket.smtp”)
local SMTP_SERVER = "xxx.xxx.xx"
local SMTP_PORT = "25"
local USER_SENDING = "<xxxx.xxx@xxxxx.xxx>"
local USER_RECEIVING = "<xxxxxxxxx@xxxxx.xxl>"
local METER_DEV_ID = 27
local METER1_DEV_ID = 34
local METER2_DEV_ID = 35
local gas= luup.variable_get(“urn:brutgrink-com:serviceId:dutchSmartMeter”, “gas”, METER_DEV_ID ) or “0”
local kwh1= luup.variable_get(“urn:micasaverde-com:serviceId:EnergyMetering1”, “kwh”, METER1_DEV_ID ) or “0”
local kwh2= luup.variable_get(" urn:micasaverde-com:serviceId:EnergyMetering1 ", “kwh”, METER2_DEV_ID ) or “0”
local from = USER_SENDING
local rcpt = {USER_RECEIVING}
local mesgt = {
headers = {
to = USER_RECEIVING,
subject = "Meterstanden van " .. os.date("%c")
},
body = "Meterstanden van " .. os.date("%c") .. ", gas = " .. gas .. ", kwh1 = " .. kwh1 .. ", kwh2 = " .. kwh2
}
local r, e = smtp.send{
from = from,
rcpt = rcpt,
source = smtp.message(mesgt),
server = SMTP_SERVER,
port = SMTP_PORT,
}
if (e) then
luup.log("Yikes " .. e)
end