I used to have this LUA script working on the stable version, but not anymore on the beta so trying to migrate it to dzVents. Below is my poor mans attempt so far:
Code: Select all
--[[
updateEnergy
]] --
return {
on = {
--devices = { 'House Energy'} ,
timer = { 'every 1 minutes' }, -- timer or device to trigger the script. Can be both or one of them
},
execute = function(domoticz, device, trigger)
local d1_sensor = 'House Energy'
local d2_sensor = 'Oil meter (A)'
local d1_values = otherdevices_svalues[d1_sensor]
local d2_values = otherdevices_svalues[d2_sensor]
local power,energy = d1_values:match("([^,]+);([^,]+)")
local datastring = "d1," .. tostring(energy) ..";d2," .. tostring(d2_values)
print (datastring)
local myUrl= 'customuserurl' .. datastring
domoticz.openURL(myUrl)
end
}