kongkx / homebridge-cozylife-platform

Apache License 2.0
2 stars 1 forks source link

Support plug sockets #4

Open DEEJCUK opened 5 months ago

DEEJCUK commented 5 months ago

Is your feature request related to a problem? Please describe: NO

Describe the solution you'd like: Socket to turn on and off

Describe alternatives you've considered: edit /homebridge/node_modules/homebridge-cozylife-platform/dist/commands.js changing

on: 255, to on: 1,

and it works so im not sure if a new set of commands can be added to test if the device is a socket

Logs look like this

homebridge  | [2/8/2024, 8:59:06 PM] [Cozylife] [Charger -- 192.xxx.x.xxx] Update Status: {"1":1,"2":0} **<- ON**
homebridge  | [2/8/2024, 8:59:06 PM] [Cozylife] [Lamp -- 192.xxx.x.xxx] Update Status: {"1":0,"2":0} **<- OFF**
DEEJCUK commented 4 months ago

i also have a Power metering socket that gives some other results like /12/2024, 6:33:53 PM] [Cozylife] [Cozylife Meter -- 192.xxx.xxx.xxx] Update Status: {"1":1,"2":0,"26":0,"28":5} which i assume is the power in Watts but these dont seem to show in homebridge or Home / Eve apps, would be great to get the power stats as well