FlyingDomotic / domoticz-mqttmapper-plugin

Domoticz plugin to map MQTT topics to devices/Associe MQTT topics et Domoticz dispositifs
GNU General Public License v3.0
18 stars 6 forks source link

Energy #7

Closed TheReiner closed 1 year ago

TheReiner commented 1 year ago

Bonjour,

J'essaye d'utiliser votre plug-in avec un Shelly Plus 1 Gen 2 i try to use your plug-in with Shelly Plus 1 Gen 2

Pour récupérer ma consommation électrique.

This is the MQTT JSON

{"id":0, "source":"WS_in", "output":true, "apower":2.2, "voltage":225.7, "current":0.018, "aenergy":{"total":5200.043,"by_minute":[35.826,36.248,35.826],"minute_ts":1681828019},"temperature":{"tC":36.9, "tF":98.5}}

And this is my JSON Config

{ "Ballon ECS": { "topic": "shellyplus1pm-80646fe51164/status/switch:0", "type": "243", "subtype": "29", "switchtype": "0", "mapping": {"item":"current"} } }

Screenshot 2023-04-18 at 16 29 49

Screenshot 2023-04-18 at 16 30 05

TheReiner commented 1 year ago

i think the problem is the : in the topic je pense que le problème vient du : contenu dans le topic.

switch:0

TheReiner commented 1 year ago

ok je crois que j'ai trouvé le problème... je confirmerai demain :) OK i thins i solve the problem... I will confirm tomorrow { "Ballon ECS": { "topic": "shellyplus1pm-80646fe51164/status/switch:0", "type": "243", "subtype": "29", "switchtype": "0", "mapping": {"item":"apower;aenergy/total"} } }

Merci

FlyingDomotic commented 1 year ago

Effectivement, le mapping a une chance de fonctionner avec "mapping": {"item":"apower;aenergy/total"}

Si la consommation a 2 tarifs (genre jour/nuit), ou si on produit également de l'électricité, on peut utiliser un type 248, sous-type 1.

TheReiner commented 1 year ago

Bonjour, merci pour le tuyau, je note ^^ et tout fonctionne :)