@bfromdruten;
i got it now working
== result of out punt ==
Meterstanden van Tue Jun 26 13:54:04 2012, gas = 268.509, kwh1 = 416.009, kwh2 = 379.405
on weekly bases i enter the data in to ECOHOME and see the results
thanks for the assistance
about the datamine will be next puzzle
the luup is now as follows;
== quote ==
local smtp = require("socket.smtp")
local SMTP_SERVER = "xxx.xxx.xxl" -- < local server
local SMTP_PORT = "25"
local USER_SENDING = "<
veralite@xxx.xxx>" --< from
local USER_RECEIVING = "<xxx@xxxxxxl>" -- < to
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