joostnl wrote:Can someone write me a step guide to install, Isrcounter.
My script for water is working only i want to make it more accurate
It was a bit hidden I have to agree

viewtopic.php?f=32&t=3151&start=60#p112272
Moderator: leecollings
joostnl wrote:Can someone write me a step guide to install, Isrcounter.
My script for water is working only i want to make it more accurate
Did you connect directly to EspEasy or also used a resistor (pull down).heggink wrote:I attached the tcrt through espeasy to domoticz. I experience a weird consistenr ~6% higher reading in domoticz than the real consumption. Consistent enough to make me wonder if it's really the reflection meter edge that could cause it. Any thoughts?
H
I changed the code in red. This function is designed for it. When using a test and production environment you don't need to update the IP address.commandArray = {}
print('> Monitoring water consumption')
-- Water usage
-- Retrieve value from water meter device:
sWaterUsage = otherdevices_svalues['Water']
-- To have a better readable format, divide number by 1000:
sWaterUsagePrint = tonumber(sWaterUsage / 1000);
-- calculation is done with the unmodified water value
sWaterUsage = tonumber(sWaterUsage);
print(">> Utilities: Water usage until now is " .. sWaterUsagePrint .. " ");
if (devicechanged['GPIO_WATER'] == 'Close')
then
sWaterUsageTot = (sWaterUsage + 1)
print(">> Utilities: Water usage is now " .. sWaterUsageTot .. " ");
commandArray['UpdateDevice'] = '164|0|'..sWaterUsageTot..''
end
return commandArray
Users browsing this forum: No registered users and 1 guest