Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hardware Request]: Shelly Plus RGBW PM #996

Closed
2 tasks done
mhuber77 opened this issue Jun 6, 2024 · 8 comments · Fixed by Paradoxa/ioBroker.shelly#2 or #1039
Closed
2 tasks done

[Hardware Request]: Shelly Plus RGBW PM #996

mhuber77 opened this issue Jun 6, 2024 · 8 comments · Fixed by Paradoxa/ioBroker.shelly#2 or #1039
Labels
hardware request Request to integrate new devices

Comments

@mhuber77
Copy link

mhuber77 commented Jun 6, 2024

I'm sure that

  • This device is still unsupported in the current beta version of this adapter
  • There is no other (open) request for the same device type (used the search)

Shelly device

Shelly Plus RGBW PM

Further information

Please add the new RGB Shelly see https://www.shelly.com/de-at/products/product-overview/shelly-plus-rgbw-pm
If you need any other infos/debugs let me know. I've the device is up and running.
Thanks

@mhuber77 mhuber77 added the hardware request Request to integrate new devices label Jun 6, 2024
@mhuber77
Copy link
Author

Hi,

gibts hier schon was neues? Werdet Ihr die Hardware in Zukunft unterstützen? Ich habe 5 von denen gekauft, wenn nicht müsste ich die ev. tauschen.

danke und lg
Markus

@FranzKillig
Copy link

FranzKillig commented Jul 17, 2024

Hallo Zusammen,
ich würde mich auch sehr freuen, wenn dieser Shelly schnellstmöglich unterstützt würde.
Danke
lg Franz

@Borschtwischt
Copy link

Ich schließe mich der Runde an - würde mir ebenfalls wünschen das sie unterstützt werden

VG Thorsten

@StopAndG0
Copy link

Ich würde mich auch über eine Unterstützung in ioB sehr freuen.

VG Enrico

@Martin4us3
Copy link

Martin4us3 commented Aug 26, 2024

Ich reihe mich in die Liste ein - ich habe ein Gerät im Einsatz und würde gern 4 weitere einbinden.

Hier ein kleiner Workaround - mithilfe des MQTT-Adapters - bis der Shelly-Adapter erweitert wird:

const MQTT_STATE_REGEX = /mqtt.0.(shellyplusrgbwpm-\S+).status.light:(\d)/;
const USER_STATE_REGEX = /0_userdata.0.ShellyPlusRGBW.(shellyplusrgbwpm-\S+).light:(\d).(\S+)/;

const ShellyStates = {
"Switch": {
read: status => status.output,
write: val => ({on: val}),
common: {
"type": "boolean",
"read": true,
"write": true,
"name": {
"en": "Switch",
"de": "Schalter",

        },
        "role": "switch",
        "def": false
    },
},
brightness: {
    read: status => status.brightness,
    write: val => ({brightness: val}),
    common: {
        "name": "Brightness",
        "type": "number",
        "role": "level.brightness",
        "read": true,
        "write": true,
        "min": 0,
        "max": 100,
        "unit": "%"
    },
},
"Voltage": {
    read: status => status.voltage,
    common: {
        "name": "Voltage",
        "type": "number",
        "role": "value.voltage",
        "read": true,
        "write": false,
        "def": 0,
        "unit": "V"
    },
},
"Power": {
    read: status => status.apower,
    common: {
        "name": "Power",
        "type": "number",
        "role": "value.power",
        "read": true,
        "write": false,
        "def": 0,
        "unit": "W"
    },
},
"Current": {
    read: status => status.current,
    common: {
        "name": "Current",
        "type": "number",
        "role": "value.current",
        "read": true,
        "write": false,
        "def": 0,
        "unit": "A"
    },
},
"temperatureC": {
    read: status => status.temperature?.tC,
    common: {
        "name": {
            "en": "Temperature",
            "de": "Temperatur",
        },
        "type": "number",
        "role": "value.temperature",
        "read": true,
        "write": false,
        "unit": "°C"
    },
},
"Energy": {
    read: status => status.aenergy?.total,
    common: {
        "name": "Energy",
        "type": "number",
        "role": "value.power.consumption",
        "read": true,
        "write": false,
        "def": 0,
        "unit": "Wh"
    },
}

};

on({id: MQTT_STATE_REGEX, change: 'ne'}, obj => {
const [m, device, light] = obj.id.match(MQTT_STATE_REGEX);
const status = JSON.parse(obj.state.val);
const userDevice = 0_userdata.0.ShellyPlusRGBW.${device}.light:${light}.;

Object.entries(ShellyStates).forEach(([userState, shelly]) => {
    const id = userDevice + userState;
    const val = shelly.read(status);
    if(val !== undefined) {
        const setStateValue = () => setState(id, val, true);
        if(!existsObject(id)) {
            const userObj = {"type": "state", common: shelly.common};
            setObject(id, userObj, setStateValue);
        } else
            setStateValue();
        }
    });

})

on({id: USER_STATE_REGEX, ack: false}, obj => {
const [m, device, light, state] = obj.id.match(USER_STATE_REGEX);
if(ShellyStates[state].write) {
const rpcCmd = {
method: "Light.Set",
params: {id: light, ...ShellyStates[state].write(obj.state.val)}
};
setState(mqtt.0.${device}.rpc, JSON.stringify(rpcCmd), false);
}
})

Ist nicht ganz sauber, funktioniert aber

@AtomicIX
Copy link

Ich würde mich auch freuen, wen der Rgbw Pm unterstütz wird.

@Makobe
Copy link

Makobe commented Sep 10, 2024

Ich wäre auch dran interessiert. Würde benötigte Logs o.Ä. auch gern zur Verfügung stellen.

@AtomicIX
Copy link

Gibt es denn eine Info, zu wann oder ob überhaupt eine Integration gemacht wird?
Ich würde gern mehrere Geräte einbinden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hardware request Request to integrate new devices
Projects
None yet
7 participants