Page 1 of 1

how to read INA219 in domoticz

Posted: Monday 09 September 2019 5:37
by dany1794
hey, does anyone know how to pass data from espeasy to domoticz for INA219.
Readings in espeasy are ok I have tried in various ways to add them in domoticz but nothing shows

Re: how to read INA219 in domoticz

Posted: Thursday 16 April 2020 13:11
by misterleffe
Made it this way.

For Voltage, is just to choose Volt sensor in Domoticz Hardware tab for Virtual sensors. Be aware to chose the correct IDx, as always! :D
In the same way I made 2 Custom sensors, to be used for Amperé & Power.
When Voltmeter is done and working, you can see the values in Domoticz Log

Read Ampere and Power, I used a dZvent script as follows. I made the script [with some help :lol:] in Domoticz Setup tab. Save and activate, when ready!
................................................................................................................
return {
on = {
timer = {
'every 2 minutes'
}
},
execute = function(dz, dev)
dev = dz.devices("Spänning drift")
temp = dz.utils.stringSplit(dev.sValue,";")
dz.devices('Strömförbrukning drift').updateCustomSensor(temp[2])
dz.devices('Effektförbrukning drift').updateCustomSensor(temp[3])
end
}

..............................................................................................................

"Spänning drift" = Name of the virtual Volt sensor. You choose the name, but it MUST be the same as in Domoticz!
"Strömförbrukning drift" = Name of the custom sensor for Amperé [can be any name, but it MUST be the same as in Domoticz]
"Effektförbrukning drift" = Name of the custom sensor for Power [can be any name, but it MUST be the same as in Domoticz]