I have a P1 homewizard energy meter in a vacation house and would like to extract the energy consumption in the domoticz system that I use at home.
I can access the data on my pc via the web on the link https:hwenergy.app
Has anyone experience how to fetch the energy consumption data from that website and integrate it in virtual sessors in domoticz.
Can this be accomplished with an dzvents script?
Homewizard P1 Energy Meter through hwenergy.app
Moderator: leecollings
-
- Posts: 661
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Homewizard P1 Energy Meter through hwenergy.app
According to the homewizard website you need a Energy+ subscription in order to be able to export your data (for example to csv) from their website/app.
I am using their device API links to import data into domoticz directly, but I have the devices on my local wifi network.
Probably, as an alternative, if you could make your remote network accessible by vpn you could also import the data into domoticz, as if the devices are on your local network, bypassing the storage and app of homewizard.
I am using their device API links to import data into domoticz directly, but I have the devices on my local wifi network.
Probably, as an alternative, if you could make your remote network accessible by vpn you could also import the data into domoticz, as if the devices are on your local network, bypassing the storage and app of homewizard.
-
- Posts: 7
- Joined: Sunday 22 November 2020 20:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Homewizard P1 Energy Meter through hwenergy.app
thanks Willem
A VPN setup will be too difficult for me.
I noticed when I use a certain hyperlink in the browser as is (without the + subscription) I do get a JSON response.
Hyperlink:
https://hwenergy.app/totals?home=XXXXXX ... /Amsterdam
Response:
{"arrow":"arrowImport","style":"color: rgb(113, 17, 230);","costs":"€0.00","value":"2.2","unit":"kWh"}
I was wondering if adding a HTTPS poller to the hardware in combination with a LUA script could work. I'm too inexperienced to code up a working LUA script.
Would this be feasible and if so has anyone suggestions for such a LUA script.
A VPN setup will be too difficult for me.
I noticed when I use a certain hyperlink in the browser as is (without the + subscription) I do get a JSON response.
Hyperlink:
https://hwenergy.app/totals?home=XXXXXX ... /Amsterdam
Response:
{"arrow":"arrowImport","style":"color: rgb(113, 17, 230);","costs":"€0.00","value":"2.2","unit":"kWh"}
I was wondering if adding a HTTPS poller to the hardware in combination with a LUA script could work. I'm too inexperienced to code up a working LUA script.
Would this be feasible and if so has anyone suggestions for such a LUA script.
-
- Posts: 661
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Homewizard P1 Energy Meter through hwenergy.app
This is what their standard API data for a kWh meter looks like:
{"wifi_ssid":"Ziggoxxxxxx","wifi_strength":100,"total_power_import_t1_kwh":2.262,"total_power_export_t1_kwh":1450.781,"active_power_w":-28.444,"active_power_l1_w":-28.444}
and this is the script stored in the lua_parsers folder to get that data imported into domoticz, with a http poller setup.
So with some adaptation you should be able to use the data you are showing, the format is similar.
{"wifi_ssid":"Ziggoxxxxxx","wifi_strength":100,"total_power_import_t1_kwh":2.262,"total_power_export_t1_kwh":1450.781,"active_power_w":-28.444,"active_power_l1_w":-28.444}
and this is the script stored in the lua_parsers folder to get that data imported into domoticz, with a http poller setup.
So with some adaptation you should be able to use the data you are showing, the format is similar.
Code: Select all
------ BEGIN ------
-- Read API values
s = request['content'];
--
-- kWhmeter solar panels
--
-- return value
local a = domoticz_applyJsonPath(s,'.total_power_export_t1_kwh')
-- active current return
local b = domoticz_applyJsonPath(s,'.active_power_w')
local c = domoticz_applyJsonPath(s,'active_power_l1_w')
--
local idkWh = 3
domoticz_updateDevice(idkWh,'',-1*b ..";".. a*1000 )
------ END ------
-
- Posts: 7
- Joined: Sunday 22 November 2020 20:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Homewizard P1 Energy Meter through hwenergy.app
thanks,
unfortunately I do get an error from the HTTPS poller that no data is returned.
I guess it could be a security issue which prohibits this.
Nevetheless thanks for your suggestion.
unfortunately I do get an error from the HTTPS poller that no data is returned.
I guess it could be a security issue which prohibits this.
Nevetheless thanks for your suggestion.
Who is online
Users browsing this forum: No registered users and 1 guest