[APP][Pro] Homewizard 🧙‍♂️

Control your HomeWizard products (not the Link or Smart Switch.)

Stable: v3.8.22
Test/beta: v3.8.22


Nederlands forum topic hier, maar meeste info zal in dit engelse gedeelte te vinden zijn omdat dit al langer loopt.
[APP][Pro][NL] Homewizard 🧙‍♂️


HOMEWIZARD ENERGY PRODUCTS NOTES

Wifi P1 dongle support is only working when dongle has firmware 2.09! Please check firmware before you try to add it. This firmware support mDNS (auto discovery) hence easier to add. It is the same technique used as ChromeCast (Google). So if you face issues with your wifi network and struggle with the devices not found you can check you wifi vendor support pages on ChromeCast issues as it the same discovery method. Wait for the dongle to get this firmware from the cloud before you try to add it.

kwh1 & kwh3 (SDM230 & SDM630), energy sockets and the watermeter (~August 2022) before you try to add them you MUST enable Local API in your Homewizard Energy app. This is disabled by default and will not allow a discovery to work (mDNS method).

Make sure your wifi devices are getting a reserved ip address in your DHCP scope of your Wifi / Router dhcp.

PLUGIN BATTERY
If you want to control your Plugin Battery via Homey you have to add the P1 as a APIv2 device.
You can have it next to your existing P1api1 and disable the Homey Energy include to avoid double energy tracking. Or you remove the old one but do note that historical data for this P1 will be lost.

Steps:

  1. Add P1 as APIv2 (during the pairing process you have to press the P1 button on the device so be sure you near your P1 within 30 sec.

  2. Then you can add/pair your Plugin Battery (it is not really an order if battery is first or last, it is just key that the P1 is added as APIv2).

  3. After this you can add a flow and control the mode of the Plugin Battery via the P1apiv2.

TROUBLESHOOT TIPS FOR P1, KWH, WATERMETER AND SOCKETS:

  • Make sure Homey is in the same (wifi network)
  • Make sure devices are not on a Guest wifi SSID or AP client isolation is turned on (must be off!)
  • Make sure multicast is enabled on all your access points and routers
  • Reboot homey (mDNS discovery might be stuck)
  • Reboot your wifi accesspoints/routers (unifi / ubiquiti common issues)
  • Power cycle your device P1, KWH, watermeter or socket(s)
  • Verify “LOCAL API” is on in Homewizard Energy app for the device(s)
  • Watermeter does not work when on battery only (must be usb powered to enable LOCAL API mode)
  • Install mDNS discovery app on your iphone/android and check for _hwenergy._tcp and see you can see your devices there.
  • Toggle the LOCAL API in the official HomeWizard Energy app and restart the HW app on Homey to discover again

Or

Pihole and Adguard users:
For those users that have Homewizard device issues (! Icon) or devices that wont move to available is a tip related to Pihole and/or Adguard.
Multicast DNS isnt handled properly via these DNS sinkholes. You should install AVAHI service on your Pihole and/or Adguard linux server that picks up these queries and resolves these queries locally.

TIPS

  • For Homewizard Energy devices my suggestion is reserve static ip’s in the dhcp server scope of your router (when possible). Some routers and dhcpserver keep cycle their dhcp scope.

  • More advanced tip(and those who are knowledgeable enough to implement): separate your IoT devices from your local LAN. Most of these IoT devices are cheap China tech and not known to proper firmware updates. When you separate these you need mdns repeater/proxy/relay on your router. But only if you know how to do it as its very complex to implement and requires a high level of network understanding (vlans & firewall rules).


HOMEWIZARD (legacy, yeah the old appliance)

small

Upon first deployment you need add the HomeWizard unit first,
then you can add the related/connected components
from HomeWizard to your Homey (ie. Heatlink, Energylink etc.

Get your local Homewizard IP address and local password (not the Homewizard Online account!)

If trying to add this in the Homey GUI and get a quick flash of this screen and blank after, please use the webinterface of Homey GUI https://my.homey.app.

Homey does not support Heatlink and Energylink directly without the Homewizard unit.
Homewizard have protected their 868mhz communication with Energylink and Heatlink so you still need the Homewizard unit to make this work.

Supports: Energylink, Heatlink, Windmeter, Rainmeter, Temperature sensors, Smoke & Motion sensors
Does not support: Light bulbs & Power sockets (use KlikAanKlikUit or Smartwares app to control these).
Note on Motion sensor: There is a 10 seconds delay (use KlikAanKlikUit or Smartwares app if you need direct response).

Relevant sources and links
Project master source: GitHub - jtebbens/com.homewizard: Homewizard app for Homey
Beta channel: https://github.com/jtebbens/com.homewizard/tree/beta
Test install from app store: https://homey.app/nl-nl/app/com.homewizard/HomeWizard/test/

ONLY SENT DIAGNOSTIC REPORTS WHEN I ASK FOR IT

Developers: Jeroen Tebbens, Jeroen Bos, Nick Bockmeulen, Freddie Welvering, Emile

7 Likes

Change log

v3.8.22

  • Finetune energy_v2 updates primary values are updated instant, other lesser values once every 10s
  • Additional watchdog code to reconnect energy_v2 and plugin_battery upon firmware up/downgrades
  • Websocket finetuning (energy_v2 and plugin battery)
  • Centralized fetch queue for all fetch calls to spread all queries
  • Removed interval check in onPoll loop
  • Restore custom polling sockets (got removed by accident rollback)

v3.8.18

  • Bugfix: Failed to recreate agent: TypeError: Assignment to constant variable (energy)
  • async/await update on several drivers

v3.8.16

  • Updated APIv2 to add more text upon fetch failed
  • Websocket based battery mode settings added (both condition and action)
  • Websocket heartbeat (30s) to keep battery mode updated (workaround as battery mode is the only realtime update when it changes)
  • P1 & EnergySocket driver (apiv1) http agent tuning (ETIMEOUT and ECONNRESET)

v3.8.13

  • Extra error handling (updateCapability) based on received crashreports
  • Bugfix: ReferenceError: err is not defined (energy-socket)

v3.8.11

  • Rollback energy dongle code from earlier version v3.7.0
  • Strange SD630 problem on older Homey’s
  • Extra verbose logging in urls to expose mDNS problems for older Homeys (url)

v3.8.8

  • After attempting conditional fetch, roll back to node-fetch until 12.9.x releases (Homey Pro 2016 - 2019)
  • Bugfix: SDM230-p1mode - error during initialization

v3.8.4

  • Conditional require (node-fetch) it will try to use native fetch with a fallback to take the node-fetch module instead
  • Moved Websocket functions to include to clean up P1 and plugin_battery code

v3.7.9

  • Extra check upon websocket creation to avoid crashes
  • Plugin battery catch all error (unhandled exception)
  • Additional checking and error handling on bad wifi connections (websocket based)
  • Fetch was not defined for fetchWithTimeout function
  • Missed net_frequency update, also made it 3 decimals
  • Capability update fix (avoid removal check)

v3.7.1

  • Trigger card for battery SoC Drift (triggers on expected vs actual State-of-charge)
  • Trigger card for battery error (based on energy returned to grid while battery group should be charging)
  • Trigger card for battery netfrequency out of range
  • Icon update for various capabilities
  • Battery group details added to P1apiv2. (Charging state)
  • Realtime data for P1 (apiv2) via Websocket
  • Realtime data for Plugin Battery via Websocket
  • Bugfixes/crashes on P1 (apiv2) - no gas data on first poll / ignore
  • Websocket reconnect code for covering wifi disconnect & terminate issues
  • Plugin Battery group fix (tracking combined set of batteries) - bugfix / Refenece error
  • Netfrequency capability added for Plugin Battery
  • Homewizard Legacy - code rollback (pairing problems after improvements)
  • P1 (apiv2) - Added checkbox setting to fallback to polling if websocket is to heavy for Homey device

v3.6.77

  • Custom polling-interval option made for Homewizard Legacy unit (default 20s, when adjusted restart app to active it)
    To adjust setting check the main unit advanced settings
  • Energy sockets with poor wifi connection will have 3 attempts now
  • Fallback url for P1 mode SDM230 / SDM630

v3.6.75

  • More try/catch code to avoid any crashes on Homewizard Legacy main unit getStatus fail (Device not found)
  • Fine tune “estimated kwh” plugin battery calculation based on user feedback
  • Code fixes: unhandledRejections CloudOn/Off for sockets and P1
  • Thermometer (Homewizard Legacy) - full code refractoring
  • Homewizard Legacy doesnt support keep-alive, changed back to normal fetch / retry
  • Finetune code keepAlive for other devices 10s
  • Bugfix: number_of_phases setting incorrectly updated
  • Added verbose mDNS discovery results for troubleshooting

v3.6.71

  • Finetuning polling and capability during init phase of various drivers
  • Bugfix SDM230 solar capability error
  • Added estimate kwh measurement for plugin battery
  • Homewizard Legacy getStatus error handling (device unreachable problem / crash)

v3.6.67

  • Enforcing interval clears on various devices when interval is reset
  • try_authorize handler bugfix (interval / timeout) app crash logs

v3.6.66

  • Fall back url setting upon initial poll for P1, sockets, kwh’s, watermeter. (older Homey Pro;s 2016/2019 seems to struggle with mDNS updates)
  • Removed retry code for Homewizard legacy devices (changed to keeping http agent session open / keepAlive)
  • Battery Group data removed from P1 after a fetch fail (bugfix)
  • Increased timeouts (authorize / pairing APIv2)
  • Language adjustment P1 warning (overload EN/NL)

NOTE: First time running this version will fail as the url setting is empty so it should improve onwards.

v3.6.63

  • SDM230 (p1 mode added)
  • P1apiv2 - added daily usage kwh (resets at nightime) (does not cater for directly consumed solar-used energy as this does not pass the smart meter at all)
  • Adjustment for P1 to look at Amp datapoints to detect 3-Phased devices in Norway
  • HTTP - keepalive agent added to P1, sockets, APIv2 devices
  • KeepAlive timeout increased from default 1000ms
  • AbortController code added for APiv2
  • Wifi quality capability added (-48dBm is not always clear to users if it is good or bad)
  • Bugfix: P1, missed setAvailable(). Code didn’t recover from a failed P1 connection and kept P1 offline

v3.6.58

  • Bugfix that was caused by experimental firmware Homey 12.5.2RC3 and slider capability that could not be removed
  • Added energy flags for sockets so they can trace imported/exported energy in Homey Energy Dashboard (Home Batteries connected via sockets)
  • Code cleanup
  • Added some fine tuning to spread the API call’s to the P1

v3.6.50

  • Added phase monitoring
  • Adjust settings to align with your energy grid
  • Bugfix for sliders when gridconnection has 3 phases
  • Actual gas meter measurement added (5min poll pending on smartmeter)
  • P1apiv1 - Code refactored (clean up repetive lines)
  • Extra plugin battery trigger cards (state change, time to full, time to empty)
  • Removed sliders from Homeycompose

v3.6.40

  • Cloud connection setting made available for P1, Sockets, Watermeter, SDM230, SDM630
  • Bugfix Offset watermeter (Cannot read properties of undefined - reading ‘offset_water’)

v.3.6.37

  • Bug fix daily tracking Energy usage (only imported from net) (wasnt working for gas-less households)
  • Bug fix daily tracking gas usage

v3.6.34

  • P1(apiv2) gas meter bugfixes
  • P1(apiv2) aggregated total usage added (support for PowerByTheHour app)
  • Custom polling for Watermeter, SDM230, SDM630 and SDM630-p1 mode, Default 10s, adjust in advanced settings
  • Action cards plugin battery - P1apiv2 device is required (P1 firmware version 6.0201 or higher)
  • Wifi metric (dBm) added for P1(apiv2) and Plugin Battery
  • Custom Polling interval added for Plugin Battery
  • Daily usage imported power and gas (P1apiv1) - User request
  • Plugin Battery: added time_to_empty and time_to_full (minutes)

v3.6.6

  • Reverted interval back 10s as this has an increased load on some wifi networks and (older) homeys (Early2019). So only the HomeyPro2023 have P1 and kwh meters with a 1s interval.

v3.6.5

  • Reverted socket interval back 10s as this has an increased load on some wifi networks and (older) homeys
  • Adjusted P1 polling for slower Homey Early2019 models

v3.6.3

  • Homey Energy - Polling interval for all Energy devices (P1, kwh, sockets etc.) lowered to 1s (was 10s)

v3.6.2

  • Homey Energy dashhboard: Energylink meter_gas capability added
  • Text fix in Plugin Battery driver
  • APIv2 timer timeout problem

v3.6.0

  • Massive code rework (credits to DCSBL for time and effort)
    Warning note: code has been tested but could potentially break devices so please be careful and if case o
Summary

This text will be hidden

1 Like

The power sensor from homewizard adds up to the total usage in homey energy. But the watcher should be the overall power usage. And all the other devices a slice of that. Now I have more usage then the watcher says.

For example

650 should be the bottom value. (Total usage)

I don’t even see Energie (HomeWizard)

Hi all, Homewizard app is not compatible yet with Homey 3.0. It was just released (final) and I have it installed today myself so I can start development/update on the Homewizard app to make it work properly with Homey 3.0.

Thanks for the quick reply! If you need any info let me know. I will wait until the next release

Thanks!

Beta release (pending) Energylink is now detected as overall measure (Smart Meter/Slimme Meter).
To use this you have to pair your Energylink again.

:+1:

Ok beta version is approved so you guys can play with it.

Thanks! The p1 energy is added to the energy measured in the zones so the total energy is not correct.

Please explain. Don’t understand.

After I log out and in (app) everything looks fine.

Ok

After a wile the Engerylink values won’t update anymore. Resetting the app does not resolve the problem.

That problem is related to your Homewizard wifi connectivity. I have no problems with the beta app myself (still running and getting Energylink data). Another one could be Homewizard and Energylink distance. Not sure how your units are placed and configured but it sounds like you have to check it first.

Mmm strange, never noticed that problem before…

I noticed the same thing (before the beta version), but like Jeroen said it’s a Homewizard issue.
What i did , i connect Homewizard to a KAKU switch and connect the switch to Homey.
At 00:05 Homey checks with Energylink if the values are not greater then 1kwh.
If they are greater Homey switch the KAKU off and after 30 sec on , to reset Homewizard.
And the problem is fixed :grinning:

Yes correct. Another problem what could cause this is if you have other integrations (domoticz or HASS etc) talking to your Homewizard unit. The Homewizard unit gets overloaded (high cpu or open connections) which eventually make the Homewizard unresponsive for a while. Not sure if you have other http gets getting data from Homewizard?

No I only use HomeWizard with Energylink at the moment. Maybe I’am switching tot Youless in the near future so I can switch off Homewizard. But for now I’am happy with your app and investigate the connection with Homey as you mention.