howanghk / homebridge-ewelink

Homebridge plugin to control Sonoff relays with OEM firmware
MIT License
81 stars 46 forks source link

Initial Lan Mode Support #111

Closed dhutchison closed 4 years ago

dhutchison commented 4 years ago

Relates to issue #41 .

This PR adds initial support for Lan mode, for devices which identify themselves as "plug". While there are references and code to support "strip" type devices, this is not currently working. I think this is something to do with the way that devices with multiple channels are currently handled (this is going to need a bit of refactoring to sort out I think).

This only supports getting and setting the power state for a device, and has been tested against an S26 plug.

This is currently hidden behind an additional configuration setting. To enable support for the lan client the following needs added to the platform configuration.

"experimentalLanClient": true

howanghk commented 4 years ago

Thanks for the contribution! As the LAN client is hidden behind a flag in configuration I think it should be safe to merge and release for the general public to test. Merging now :)