Page 1 sur 1

Paramétrage Shelly

Publié : 25 oct. 2025, 10:35
par oli80330
Bonjour,

Après avoir pas mal galéré à configurer les JSON pour ce plugin quelques exemples :
> JSON pour shelly (1/2.5/EM Gen1)
> DOmoticz device pour volet, switch on/off, compteur electrique

1 - Shelly 1 (GEN1) / domoticz device on/off :

Code : Tout sélectionner

"SDB Ventil": {
"topic": "shellies/SDB Ventil/relay/0",
"type": "244", "subtype": "73",
"switchtype": "0",
"mapping": {"item": "", "default": "0", "values": { "off": "0", "on": "100", "false": "0", "true": "100" }},
"commands": {
"On": {"topic": "shellies/SDB Ventil/relay/0/command", "payload": "on"},

"Off": {"topic": "shellies/SDB Ventil/relay/0/command", "payload": "off"}
}
2- Shelly 2.5 mode relay (not roller mode) (GEN1) / domoticz on/off :

Code : Tout sélectionner

"CE Mode PAC": {
"topic": "shellies/CE Thermo Solaire/relay/0",
"type": "244", "subtype": "73",
"switchtype": "0",
"mapping": {"item": "", "default": "0", "values": { "off": "0", "on": "100", "false": "0", "true": "100" }},
"commands": {
"On": {"topic": "shellies/CE Thermo Solaire/relay/0", "payload": "on"},

"Off": {"topic": "shellies/CE Thermo Solaire/relay/0", "payload": "off"}
}
}
3 -Shelly 2.5 mode roller (not relay mode) (GEN1) / domoticz blinds on/off/stop/position :

Code : Tout sélectionner

"ShellyMapper - Buro Volet": {
"topic": "shellies/Buro Volet/roller/0/pos",
"type": "244",
"subtype": "73",
"switchtype": "21",
"mapping": {"item": ""},
"commands": {
"Open": { "topic": "shellies/Buro Volet/roller/0/command", "payload": "open" },
"Close": { "topic": "shellies/Buro Volet/roller/0/command", "payload": "close" },
"Stop": { "topic": "shellies/Buro Volet/roller/0/command", "payload": "stop" },
"Set Level": { "topic": "shellies/Buro Volet/roller/0/command/pos", "payload": "<level>", "retain": false }
}
}
4 - Shelly EM or Shelly 2.5 (Gen1 conso) / domoticz General, kWh :

Code : Tout sélectionner

"Clim Salon": {
"topic": "shellies/Clim Salon/relay/0/power",
"type": "243", "subtype": "29", "switchtype": "0",
"options": {"EnergyMeterMode":"0"},
"mapping": {"item":"~*;~0"}
}
La consommation CPU du RPi est très basse.
Un très bon plugin, meilleur que shellyteacher ou AutoDiscovery qui sont trop très lents en feedback MQTT.

Un grand merci à l'auteur pour son aide dans le forum anglais !

Re: Plugin MQTT de FlyingDomotic

Publié : 25 oct. 2025, 10:42
par Flying Domotic
Une petite remarque concernant "item": "values". Dans l'exemple suivant :

Code : Tout sélectionner

"mapping": {"item": "", "default": "0", "values": { "off": "0", "on": "100", "false": "0", "true": "100" }},
On s'attend à ce que le contenu du message puisse contenir "off" ou "on" ou "true" ou "false".
La doc Shelly indique qu'en fait seuls "on" et "off" sont générés.
On peut donc réécrire :

Code : Tout sélectionner

"mapping": {"item": "", "default": "0", "values": { "off": "0", "on": "100"}},

Re: Plugin MQTT de FlyingDomotic

Publié : 25 oct. 2025, 17:19
par oli80330
Hello,

J'ai corrigé et merci beaucoup pour ton aide :P
Un vrai plaisir de voir réagir mes scripts LUA/Python/Blockly au quart de tour.