Thanks for the previous support on the z-wave issue!
Now I'm hoping for some help on my Homewizard hardware.
Last week my sd card got corrupted so i did a fresh install and restored a recent backup.
Previously I was on OS Bullseye (RAPI 3b) and Domoticz 2025.1. After restoring I'm on Bookworm and 2025.2 (and still on RAPI 3b).
I have a homewizard P1 plug and a watermeter wich I had previously up and running with a LUA script.
Attached is a screenshot of my HW P1 under hardware. It's the same as before the crash, I don't think there's something wrong with it.
Previously I made a LUA script with a txt editor somewhere on my RAPI, don't know anymore where but after the fresh install it's gone.
I've read that a LUA script also can be under settings --> more options --> events so I made a LUA script there called P1; is this correct or what do i need to change?
I'm hoping this works this way so it is part of future backups.
Furthermore I found a script on this forum. I recycled it and changed the IDX to the IDX of my hardware and the device names to their name under devices, but nothing is happening with te meters nor is there happening anything under the settings --> devices.
Is the code under here correct?
Thx!
Code: Select all
{------ BEGIN ------
-- Read API values
s = request['content'];
--
-- HW Gas
--
local idGas = 15954
local a = domoticz_applyJsonPath(s,'.total_gas_m3')
domoticz_updateDevice(idGas,'',a*1000)
--
-- HW Elektra 2
--
-- Dal import value
local b = domoticz_applyJsonPath(s,'.total_power_import_t1_kwh')
-- Piek import value
local c = domoticz_applyJsonPath(s,'.total_power_import_t2_kwh')
-- Dal return value
local d = domoticz_applyJsonPath(s,'.total_power_export_t1_kwh')
-- Piek return value
local e = domoticz_applyJsonPath(s,'.total_power_export_t2_kwh')
-- Active Watt Usage
local f = domoticz_applyJsonPath(s,'.active_power_w')
local g = domoticz_applyJsonPath(s,'active_power_l1_w')
local h = domoticz_applyJsonPath(s,'active_power_l2_w')
local i = domoticz_applyJsonPath(s,'active_power_l3_w')
--
local idEnergy = 15956
domoticz_updateDevice(idEnergy,'',b*1000 ..";"..c*1000 ..";"..d..";"..e..";"..f..";"..'0')
------ END ------}
-- loop through all the changed variables
for variableName,variableValue in pairs(uservariablechanged) do
print ("Variable based event fired on '"..variableName.."', value '"..tostring(variableValue).."'");
-- if (variableName=='myVariable') then
-- if variableValue == 1 then
-- commandArray['a device name'] = "On"
-- commandArray['another device name'] = "Off AFTER 10"
-- commandArray['Variable:myVariable'] = 'new value'
-- end
-- end
end