Domoticz et shelly

Forum dédié au protocole MQTT : fonctionnement, intégration ...
Pour les questions concernant le plugin de FlyingDomotic, merci d'utiliser le sous-forum dédié.
manuloup
Messages : 781
Inscription : 18 févr. 2015, 13:05

Re: Domoticz et shelly

Message par manuloup »

Bonjour,

Oui, pour les avoir, tu dois cocher l'option "Generic Status update over MQTT" dans l'interface admin de ton shelly :
Capture d’écran 2023-09-17 150348.jpg
Capture d’écran 2023-09-17 150348.jpg (211.22 Kio) Consulté 4272 fois
Retente, et dis-moi si c'est bon. Si besoin, supprime le device et recréé-le dans domoticz.
Synology DS920+ avec VM Debian 12, Aeon Labs Z-Stick Gen5, Aeon Zwave et devices zwaves , Teleinfo USB, devices Zigbee, batterie Marstek Venus E, Shelly Pro 3EM...
ker49
Messages : 85
Inscription : 08 janv. 2016, 18:13

Re: Domoticz et shelly

Message par ker49 »

Neutrino a écrit : 04 janv. 2023, 19:21 Disons que l'affichage est filtré pour montrer l'essentiel :mrgreen:
A mon avis, tu as 2 serveurs mqtt sur ton pi.
Les versions ne sont pas les mêmes entre ce que renvoie le service (3.1) et ce que renvoie mqtt explorer (1.5.7).
Si tu es parti d'une base Jeedom, peut-être qu'un serveur mqtt tourne en fond sous jeedom.
A mon avis :
- d'un côté Domoticz se connecte sur un serveur
- ton shelly se connecte sur l'autre.

Bonjour à vous tous,

J'ai acquis 4 panneaux solaires reliés à un MO Hoymiles HMS 2000 4T que je "suis" avec un OpenDTU. Toutes les infos de l'OpenDTU remontent bien dans Domoticz mais je rencontre un problème avec mon CT Shelly Pro 3em (comme beaucoup de personnes à priori).
J'ai beaucoup essayé par moi même ; j'ai trouvé le plugin shellyteacher4domo (qui m'a aidé à faire remonter les infos de l'OpenDTU sans problème) mais là pour le shelly Pro 3em impossible d'y arriver.
Je vois ceci dans les logs de Domoticz mais un seul device (à priori du type switch) apparait :
2025-05-20 10:01:01.214 Status: MQTTad: Discovered: shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Active Power)/shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Active Power) (unique_id: shellypro3em-9454c5b91868-power)
2025-05-20 10:01:01.315 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Total Apparent Power)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Total Apparent Power) (unique_id: shellypro3em-9454c5b91868-appower)
2025-05-20 10:01:01.417 Status: MQTTad: Discovered: shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Active Energy)/shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Active Energy) (unique_id: shellypro3em-9454c5b91868-energy)
2025-05-20 10:01:01.519 Status: MQTTad: Discovered: shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Returned Energy)/shellypro3em-9454c5b91868 (shellypro3em-9454c5b91868 Total Returned Energy) (unique_id: shellypro3em-9454c5b91868-retenergy)
2025-05-20 10:01:01.621 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Voltage)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Voltage) (unique_id: shellypro3em-9454c5b91868-A-voltage)
2025-05-20 10:01:01.723 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Active Power)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Active Power) (unique_id: shellypro3em-9454c5b91868-A-power)
2025-05-20 10:01:01.824 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Apparent Power)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Apparent Power) (unique_id: shellypro3em-9454c5b91868-A-appower)
2025-05-20 10:01:01.926 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Total Active Energy)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Total Active Energy) (unique_id: shellypro3em-9454c5b91868-A-energy)
2025-05-20 10:01:02.028 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Total Returned Energy)/shellypro3em-9454c5b91868-A (shellypro3em-9454c5b91868 Phase A Total Returned Energy) (unique_id: shellypro3em-9454c5b91868-A-retenergy)
2025-05-20 10:01:02.130 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Voltage)/shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Voltage) (unique_id: shellypro3em-9454c5b91868-B-voltage)
2025-05-20 10:01:02.232 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Active Power)/shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Active Power) (unique_id: shellypro3em-9454c5b91868-B-power)
2025-05-20 10:01:02.333 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Apparent Power)/shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Apparent Power) (unique_id: shellypro3em-9454c5b91868-B-appower)
2025-05-20 10:01:02.435 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Total Active Energy)/shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Total Active Energy) (unique_id: shellypro3em-9454c5b91868-B-energy)
2025-05-20 10:01:02.537 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Total Returned Energy)/shellypro3em-9454c5b91868-B (shellypro3em-9454c5b91868 Phase B Total Returned Energy) (unique_id: shellypro3em-9454c5b91868-B-retenergy)
2025-05-20 10:01:02.639 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Voltage)/shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Voltage) (unique_id: shellypro3em-9454c5b91868-C-voltage)
2025-05-20 10:01:02.741 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Active Power)/shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Active Power) (unique_id: shellypro3em-9454c5b91868-C-power)
2025-05-20 10:01:02.842 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Apparent Power)/shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Apparent Power) (unique_id: shellypro3em-9454c5b91868-C-appower)
2025-05-20 10:01:02.944 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Total Active Energy)/shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Total Active Energy) (unique_id: shellypro3em-9454c5b91868-C-energy)
2025-05-20 10:01:03.046 Status: MQTTad: Discovered: shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Total Returned Energy)/shellypro3em-9454c5b91868-C (shellypro3em-9454c5b91868 Phase C Total Returned Energy) (unique_id: shellypro3em-9454c5b91868-C-retenergy)
2025-05-20 10:01:03.147 Status: MQTTad: Discovered: OpenDTU-B08EC4 (Status)/OpenDTU-B08EC4 (Status) (unique_id: OpenDTU-B08EC4_11570884_status)
2025-05-20 10:01:03.250 Status: MQTTad: Discovered: HMS 2000 Abri Piscine (Reachable)/HMS 2000 Abri Piscine (Reachable) (unique_id: 1164a00aa306_reachable)
2025-05-20 10:01:03.352 Status: MQTTad: Discovered: HMS 2000 Abri Piscine (Producing)/HMS 2000 Abri Piscine (Producing) (unique_id: 1164a00aa306_producing)
2025-05-20 10:01:03.454 Status: MQTTad: Discovered: shellypro3em-9454c5b91868 Online/shellypro3em-9454c5b91868 Online (unique_id: shellypro3em-9454c5b91868-online)
Un point qui m'interroge c'est qu'il est indiqué unique_id alors que le CT Shelly Pro 3em a 3 capteurs différents a, b et c qui apparaissent bien dans MQTT Explorer mais c'est peut-être normal.


Déjà, à priori j'ai moi aussi 2 serveurs mqqt car j'ai ça depuis MQTT Explorer:

Code : Tout sélectionner

zigbee2mqtt
solar
dtu
1164a00aa306
ac
dc
sensor
binary_sensor
button
number
homeassistant
shellypro
shellypro3em-9454c5b91868
online = true
events
status
em1:0 = {"id":0,"voltage":233.7,"current":1.323,"act_power":-240.2,"aprt_power":309.5,"pf":0.78,"freq":50.0,"calibration":"factory"}
em1:2 = {"id":2,"voltage":233.7,"current":0.062,"act_power":1.1,"aprt_power":14.5,"pf":0.09,"freq":49.9,"calibration":"factory"}
em1data:0 = {"id":0,"total_act_energy":0.00,"total_act_ret_energy":4565.29}
em1data:1 = {"id":1,"total_act_energy":0.10,"total_act_ret_energy":75.75}
em1data:2 = {"id":2,"total_act_energy":50.11,"total_act_ret_energy":0.01}
em1:1 = {"id":1,"voltage":234.0,"current":0.037,"act_power":-4.0,"aprt_power":8.6,"pf":0.43,"freq":50.0,"calibration":"factory"}
$SYS
broker
version = mosquitto version 1.5.7
uptime = 42544 seconds
clients
load
messages
store
subscriptions
retained messages
heap
publish
bytes
domoticz
et aussi ça depuis Putty :
systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; preset: enabled)
Active: active (running) since Tue 2025-05-20 09:46:35 CEST; 25min ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Process: 4854 ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 4855 ExecStartPre=/bin/chown mosquitto /var/log/mosquitto (code=exited, status=0/SUCCESS)
Process: 4856 ExecStartPre=/bin/mkdir -m 740 -p /run/mosquitto (code=exited, status=0/SUCCESS)
Process: 4857 ExecStartPre=/bin/chown mosquitto /run/mosquitto (code=exited, status=0/SUCCESS)
Main PID: 4858 (mosquitto)
Tasks: 1 (limit: 8748)
CPU: 664ms
CGroup: /system.slice/mosquitto.service
└─4858 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

mai 20 09:46:35 raspberrypi systemd[1]: Starting mosquitto.service - Mosquitto MQTT Broker...
mai 20 09:46:35 raspberrypi mosquitto[4858]: 1747727195: Loading config file /etc/mosquitto/conf.d/default.conf
mai 20 09:46:35 raspberrypi systemd[1]: Started mosquitto.service - Mosquitto MQTT Broker.
Je ne sais pas s'il faut mettre à jour MQTT Explorer ou supprimer de mon raspi Mosquitto ?

Sinon, pour info, j'ai aussi essayé d'ajouter depuis le site Shelly les scripts suivants :
load-shedding.js
mqtt-announce-control.js
monitor-production.js
Je fais "tourner" les 3 ; je ne sais absolument pas si c'est une bonne idée ou non ? ? ?

Vous aurez compris que malgré beaucoup de recherches et essais je suis plutôt perdu ...

J'espère que vous pourrez m'aider à y arriver car à priori il est possible de récupérer les infos sous Domoticz d'un Shelly Pro 3em qui est de Gen2.

A bientôt et merci par avance
Répondre