openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

[shelly] Support for Shelly Pro Dimmer 2PM #16409

Open markus7017 opened 9 months ago

markus7017 commented 9 months ago

Add support for the dual Pro dimmer

troem commented 8 months ago

Good idea!

mstroeve commented 7 months ago

I installed a pro 2dm and discovered this device is not supported yet? Bountysource is gone. Any other way to add incentive for adding these model?

troem commented 4 months ago

I integrated the shelly dimmer via quick and dirty "http"-things implementation:

Thing http:url:shelly_light_1og4 "Shelly Light" [
    baseURL="http://192.168.x.x",
    commandMethod="GET",
    contentType="application/json",
    refresh=10
] {
    Channels:
        Type switch : power0 "Power0" [
            commandExtension="/rpc/Light.Set?id=0&on=%2$s",
            stateExtension="/rpc/Light.GetStatus?id=0",
            stateTransformation="JSONPATH:$.output",
            onValue="true",
            offValue="false"
        ]
        Type dimmer : brightness0 "Brightness0" [
            commandExtension="/rpc/Light.Set?id=0&brightness=%2$s",
            stateExtension="/rpc/Light.GetStatus?id=0",
            stateTransformation="JSONPATH:$.brightness"
        ]
        Type switch : power1 "Power1" [
            commandExtension="/rpc/Light.Set?id=1&on=%2$s",
            stateExtension="/rpc/Light.GetStatus?id=1",
            stateTransformation="JSONPATH:$.output",
            onValue="true",
            offValue="false"
        ]
        Type dimmer : brightness1 "Brightness1" [
            commandExtension="/rpc/Light.Set?id=1&brightness=%2$s",
            stateExtension="/rpc/Light.GetStatus?id=1",
            stateTransformation="JSONPATH:$.brightness"
        ]
}
renescherer commented 3 weeks ago

I would be interested in this too. I've got a number of "Pro Dimmer 2PM". Happy to help with testing.

nighty85 commented 3 weeks ago

+1 i also have multiple devices of Pro Dimmer 1PM and 2PM

ralph-ol commented 44 minutes ago

+1 same here