Arksine / moonraker

Web API Server for Klipper
https://moonraker.readthedocs.io
GNU General Public License v3.0
1.05k stars 402 forks source link

Power (SmartThings) Lighting #370

Open jalanjarosz opened 2 years ago

jalanjarosz commented 2 years ago

Is your feature request related to a problem? Please describe

No issues - Just extend functionallity

Describe the solution you'd like

Extend the "SmartThings Power" function to including lighting options:

GE Bulb: { "components": { "main": { "actuator": {}, "configuration": {}, "light": { "switch": { "value": "on", "timestamp": "2022-02-16T18:39:58.771Z" } }, "switchLevel": { "level": { "value": 100, "unit": "%", "timestamp": "2022-02-10T18:38:37.833Z" } }, "refresh": {}, "sensor": {}, "switch": { "switch": { "value": "on", "timestamp": "2022-02-16T18:39:58.771Z" } } } } }

Philips WIZ LED Strip { "components": { "main": { "colorControl": { "saturation": { "value": 94, "timestamp": "2022-02-16T19:15:34.735Z" }, "color": { "value": null }, "hue": { "value": 86, "timestamp": "2022-02-16T19:15:34.735Z" } }, "healthCheck": { "checkInterval": { "value": 60, "unit": "s", "data": { "deviceScheme": "UNTRACKED", "protocol": "cloud" }, "timestamp": "2022-02-12T02:35:11.309Z" }, "healthStatus": { "value": null }, "DeviceWatch-Enroll": { "value": null }, "DeviceWatch-DeviceStatus": { "value": "online", "data": {}, "timestamp": "2022-02-12T02:35:11.793Z" } }, "switchLevel": { "level": { "value": 100, "unit": "%", "timestamp": "2022-02-16T19:13:05.201Z" } }, "refresh": {}, "switch": { "switch": { "value": "on", "timestamp": "2022-02-16T19:10:29.849Z" } }, "colorTemperature": { "colorTemperature": { "value": 1, "unit": "K", "timestamp": "2022-02-16T19:15:34.735Z" } } } } }

Describe alternatives you've considered

None

Additional information

SInce @qtemp implemented the standard switch function, maybe this can be easily added in? I'd be willing to test as needed.

Arksine commented 2 years ago

This is probably outside of the scope of Moonraker's [power] plugin, which is intended to simply switch devices on/off. A platform like Home Assistant is better suited for this type of control. I believe that it would be possible to configure these lights in HA, then configure Moonraker to switch them on/off either over mqtt of through the homeassistant type.