Simple sensor component for Home Assistant which listens for the messages from the LightwaveRF Energy hub. This current implementation uses polling method, I may migrate it to a asynchronous approach in the future depending on how it perfroms
- clone the repository to a local folder on your computer using git
git clone https://github.com/asantaga/lightwaverf_HA_EnergySensor.git - Copy the
lightwaverf_energydirectory within custom_components to your custom_components directory in your Hoome Assistant config directory e.g.cp -r custom_components/lightwave_energy <yourConfigDir>/custom_components - Configure configuration.yaml as below
- Ensure port 9761/UDP is open on your linux server. If you are using ufw then something like
ufw enable 9761/udpwill do the trick
- Add repository
https://github.com/asantaga/lightwaverf_HA_EnergySensoras a integration and install voila easy - Configure configuration.yaml as below
- Ensure port 9761/UDP is open on your linux server. If you are using ufw then something like
ufw enable 9761/udpwill do the trick
configuration.yaml
lightwaverf_energy:
scan_interval: 30
Scan_interval is optional, defaults to every 30 seconds
Remember Ensure port 9761/UDP is open for thi integration to work
PR's / Issues welcome!
V 1.3 : Migrated to new component model, breaking changes that yaml is now different
V 1.4 : Added support for HACS
V 1.5 : Added version number to manifest file
V 1.6 : Added PR which adds a socket close, hopefully fixes errors with ports still being open
v 1.7.1 : Getting back into it after a long break, dot release getting things working agian
v1.8 : Working again
v1.10 : Fixed core lightwave lights/switches responding slowly. The hub sends command ACKs (<id>,OK) unicast to port 9761, the same port this sensor listened on, so the sensor swallowed them (and crashed parsing them) while the lights integration retried each command for ~15s. The sensor now binds to 255.255.255.255, so it only receives broadcast meter data, and ignores packets that are not meterData.
v1.9 : Fixed readings lagging real time (by ~70 min on one install). The monitor broadcasts more often than the sensor polls, so unread UDP packets queued up in the socket buffer and each poll read a stale one. Each update now drains the queue and uses the newest reading.