Add HomeWizard WiFi watermeter in Domoticz
Moderators: leecollings, remb0
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Whoops !
In Setup >> Settings >> Meters/Counters I had 1000000 for Water. Probably because I have been experimenting in the past with a Wemos D1 Mini board and a sensor.... The divider was 0, now I have this and I think it's right:
In Setup >> Settings >> Meters/Counters I had 1000000 for Water. Probably because I have been experimenting in the past with a Wemos D1 Mini board and a sensor.... The divider was 0, now I have this and I think it's right:
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Hello @mvveelen,
In this case, I also understand your 1,000.000
I think these values look much more realistic.
Regards
In this case, I also understand your 1,000.000
I think these values look much more realistic.
Regards
Last edited by FireWizard on Monday 14 August 2023 16:45, edited 1 time in total.
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Thanks, I’ll monitor the values the next few days.
Edit: it's OK like this. The values are not very exact though.
Edit: it's OK like this. The values are not very exact though.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
-
- Posts: 4
- Joined: Sunday 16 December 2018 17:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
I've edited my post to include the code brackets,
My - updated and now working - script is listed below.
*******
Manual JSON request from a browser:
{"wifi_ssid":"XXX","wifi_strength":32,"total_liter_m3":0.087,"active_liter_lpm":0,"total_liter_offset_m3":0}
Domoticz versie: 2023.1
HTTP Poller: GET
Content type: application/json
URL: http://192.168.X.Y/api/v1/data
Command: water.lua
Directory: /home/pi/domoticz/scripts/lua_parsers
4 -rw-r--r-- 1 root root 843 May 14 15:30 water.lua
My - updated and now working - script is listed below.
*******
Manual JSON request from a browser:
{"wifi_ssid":"XXX","wifi_strength":32,"total_liter_m3":0.087,"active_liter_lpm":0,"total_liter_offset_m3":0}
Domoticz versie: 2023.1
HTTP Poller: GET
Content type: application/json
URL: http://192.168.X.Y/api/v1/data
Command: water.lua
Directory: /home/pi/domoticz/scripts/lua_parsers
4 -rw-r--r-- 1 root root 843 May 14 15:30 water.lua
Code: Select all
-- Read API values
s = request['content'];
PRINT_MODE = true --true false -- when true print all used values
print('Water script')
local info = debug.getinfo(1,'S');
if PRINT_MODE == true then
print (' ')
print('*** Start van ' .. info.source .. ' script')
print ('Json response: ' .. s)
end
--
-- Watermeter
--
local idWater = 46
local a = domoticz_applyJsonPath(s,'.active_liter_lpm')
domoticz_updateDevice(idWater,'',a)
if PRINT_MODE == true then
print('Waterverbruik: ' .. a)
end
local idWaterTotaal = 45
local b = domoticz_applyJsonPath(s,'.total_liter_m3')
domoticz_updateDevice(idWaterTotaal,'',b)
if PRINT_MODE == true then
print('Totaal water verbruikt: ' .. b)
end
if PRINT_MODE == true then
print('*** Einde van ' .. info.source .. ' script')
print (' ')
Last edited by diekli on Sunday 14 May 2023 23:47, edited 1 time in total.
- mvveelen
- Posts: 678
- Joined: Friday 31 October 2014 10:22
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Hoorn, The Netherlands
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Hi, please use the 'code' brackets when you post code and also try to use English here.
Do you use other LUA scripts that work? In other words, is LUA activated in Domoticz?
Do you receive errors or no messages at all?
My code:
My devices:
Haven't changed the rights of the file water.lua by the way, so what you have should be OK.
Do you use other LUA scripts that work? In other words, is LUA activated in Domoticz?
Do you receive errors or no messages at all?
My code:
Code: Select all
-- Read API values
s = request['content'];
--
-- Watermeter
--
local idWater = 2099
local a = domoticz_applyJsonPath(s,'.active_liter_lpm')
domoticz_updateDevice(idWater,'',a*1)
local idWaterTotaal = 2100
local b = domoticz_applyJsonPath(s,'.total_liter_m3')
domoticz_updateDevice(idWaterTotaal,'',b*1000)
local idWaterVerbruik = 2101
local c = domoticz_applyJsonPath(s,'.total_liter_m3')
domoticz_updateDevice(idWaterVerbruik,'',c*1000)
Haven't changed the rights of the file water.lua by the way, so what you have should be OK.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
-
- Posts: 4
- Joined: Sunday 16 December 2018 17:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Hi,
Apologies for not using the right brackets !
The solution: the following line was a comment, I guess that prevented the main part of the code from running.
Correct line below.
Thank you for responding.
Apologies for not using the right brackets !
The solution: the following line was a comment, I guess that prevented the main part of the code from running.
Correct line below.
Code: Select all
local info = debug.getinfo(1,'S');
-
- Posts: 24
- Joined: Friday 13 January 2017 9:24
- Target OS: Windows
- Domoticz version: 3.8153
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
I have written a Python plugin for the watermeter. Check the HomeWizard Wi-Fi Watermeter on Github.
- heggink
- Posts: 972
- Joined: Tuesday 08 September 2015 21:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 12451
- Location: NL
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Just got the device and installed the plugin. World really nicely! Thx!!
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Yes the mentioned P1 & Watermeter plugin are working excellent
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Add HomeWizard WiFi watermeter in Domoticz
Is it possible to use this HomeWizard watermeter if I do not have anything else from HomeWizard I do not have a subscription with them. I am interested to set up this watermeter in combination with domoticz
- sincze
- Posts: 1299
- Joined: Monday 02 June 2014 22:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.4
- Location: Netherlands / Breda Area
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Yes, I have only their (P1 and Watermeter) devices.
You only need their APP to set it up but that is basically it.
Then you can cut Internet connection for the device and use it locally.
Pass2php
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
LAN: RFLink, P1, OTGW, MySensors
USB: RFXCom, ZWave, Sonoff 3
MQTT: ZIgbee2MQTT,
ZWAVE: Zwave-JS-UI
WIFI: Mi-light, Tasmota, Xiaomi Shelly
Solar: Omnik, PVOutput
Video: Kodi, Harmony HUB, Chromecast
Sensors: You name it I got 1.
Re: Add HomeWizard WiFi watermeter in Domoticz
Thanks for the answer. So you don't need to have the P1 meter with it? Only you need the app during the initial setup, afterwards you don't need it anymore... That is great..
Re: Add HomeWizard WiFi watermeter in Domoticz
I don't get It.. I don't see the Meter offset in my widget? Any Idea? I have added a Custom sensor with m3 as label. It is a General / Custom Sensor. The device updates OK; but I cannot set the offset on the device because the value is not the same as in the Homewizard app..?FireWizard wrote: ↑Friday 30 December 2022 15:06 Hello @Hesmink
Go to your Watermeter widget and click "Edit".
Screenshot_WaterUsage_Widget.png
The "Configuration" screen will open and insert the desired value.
Screenshot_WaterUsage_Widget_Config.png
Insert the desired "Meter Offset" and click "Update".
Regards
- waltervl
- Posts: 5148
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
The offset value is available on the counter device.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Goodevening @CronoS,
If you had read the thread from the beginning, you would have found the following line in a post of @Hesmink (30 december 2022).
Use a counter and configure it as water.
Regards
If you had read the thread from the beginning, you would have found the following line in a post of @Hesmink (30 december 2022).
So the "Custom"sensor is the wrong choice.Got it. As per OP, I used the custom sensor, and you cannot add the offset there. I now updated it to a counter of type water. Issue solved, thanks.
Use a counter and configure it as water.
Regards
Re: Add HomeWizard WiFi watermeter in Domoticz
Sorry; my mistake. I only have red the first page hahaha.. I even didn't saw that there was already a plugin now. Installed it and seems to work OK.. Thanks!FireWizard wrote: ↑Tuesday 03 October 2023 18:24 Goodevening @CronoS,
If you had read the thread from the beginning, you would have found the following line in a post of @Hesmink (30 december 2022).
So the "Custom"sensor is the wrong choice.Got it. As per OP, I used the custom sensor, and you cannot add the offset there. I now updated it to a counter of type water. Issue solved, thanks.
Use a counter and configure it as water.
Regards
Re: Add HomeWizard WiFi watermeter in Domoticz
Hi Eraser,Eraser wrote: ↑Saturday 03 June 2023 15:15 I have written a Python plugin for the watermeter. Check the HomeWizard Wi-Fi Watermeter on Github.
This is great, my usage is only shown rounded to 10's
So 100 liters, of 320 etc. Never 44 liter or 182.
Could this be due to settings?
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Hi,
Change the setting for "Water" to 1000 instead of 100.
Regards
YesCould this be due to settings?
Change the setting for "Water" to 1000 instead of 100.
Regards
Re: Add HomeWizard WiFi watermeter in Domoticz
Thanks FireWizard,
Would that mean my data so far should be deleted.
As it's now showing 50 liters today where the original was 500~
Family of 4 all showered today and the washer machine ran several times today.
So 500 is about right.
Would that mean my data so far should be deleted.
As it's now showing 50 liters today where the original was 500~
Family of 4 all showered today and the washer machine ran several times today.
So 500 is about right.
- FireWizard
- Posts: 1745
- Joined: Tuesday 25 December 2018 12:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Voorthuizen (NL)
- Contact:
Re: Add HomeWizard WiFi watermeter in Domoticz
Hi @bvdf0251,
Technically it is not necessary to delete existing data, as long as you realise that the data so far is incorrect. This data should not be used for any comparison..
To avoid mistakes, I would recommend to delete the data and start from scratch.
Do not forget to insert a correct off-set.
Regards
Technically it is not necessary to delete existing data, as long as you realise that the data so far is incorrect. This data should not be used for any comparison..
To avoid mistakes, I would recommend to delete the data and start from scratch.
Do not forget to insert a correct off-set.
Regards
Last edited by FireWizard on Saturday 04 May 2024 14:01, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 1 guest