Control MCZ Maestro pellet stove via HACore trough MQTT

Hello,

You need to run a python script 24/7, unsure you can do that on Hassio. If you have Hassio on top of a Raspbian OS, yes you can.

Nicolas

You need to run a python script 24/7, unsure you can do that on Hassio

This is what my addon is doing, no problem with that

You need to run a python script 24/7, unsure you can do that on Hassio

This is what my addon is doing, no problem with that

Your addon is great, but it connects to the stove directly. My method connects to the MCZ servers, as the wifi of the stove can’t be reached by my Rpis.

Ah that’s interesting ! I belive it would not be that hard to create another HA addon running your script so that people can choose how they want to connect to their stove (either directly or via the cloud). This is something I could have a look at when I have a bit of free time if you are ok with this. I wonder how hard it would be to just ‘merge’ your script and the one I use and just let people choose via an option if they want to connect via the cloud or locally. I haven’t checked the code in details but it seems they are both based on Anthony55’s work and maybe the cloud and local APIs are similar ?

If you could, that’d be great. To me the APIs are the same, except you connect to the cloud instead of the stove.

I’ve integrated the script you mentionned in my addon, you can now choose between local and cloud connections:

(I haven’t merged it with Chibald’s script as I’m lacking time/expertise in Python but if someone could do it it would definately be an improvement).

3 Likes

Hello Seb, and thank you for you addon.

I tested it and it works well, despite some adjustements with the cloud sensors example.

I test your code and it did not work. This code works for me :

- platform: mqtt
  name: Maestro_State
  state_topic: "Maestro/"
  value_template: "{{ value_json['Etat du poêle'] }}"

- platform: mqtt
  name: Maestro_Etat_Fan_Ambiance
  state_topic: "Maestro/"
  value_template: "{{ value_json['Etat du ventilateur d\\'ambiance'] }}"

Is it possible to send command with the cloud script ?

Hello @fmplaw and thanks for your feedback. The example code did not work because your State topic is set to “Maestro/” whereas my example assumes it is set to “Maestro/State”. I’ve updated the documentation and the default values accordingly.

Yes, I’ve added an example for a turn On/Off command:

Hello
i’ve followed this topic to configure my new Stream MCZ stove with MQTT & HomeAssistant ; using MCZ server (public api).
First, thanks so much for all contributors of this project ! :slight_smile:

Currently, i’ve some issues ;

  • from MaestroGateway log, i can see i get correctly my stove status :
    Publication sur le topic MQTT PUBmcz le message suivant : {“Etat du po\u00eale”: “Puissance 1”, “Etat du ventilateur d’ambiance”: “D\u00e9sactiv\u00e9”, “Temp\u00e9rature des fum\u00e9es”: 123, “Temp\u00e9rature ambiante”: 20.5, “Etat de la bougie”: 0, “ACTIVE - Set”: 155, “RPM - Ventilateur fumm\u00e9es”: 1821, “RPM - Vis sans fin - SET”: 300, “RPM - Vis sans fin - LIVE”: 304, “Etat du mode Active”: 1, “ACTIVE - Live”: 155, “Mode de r\u00e9gulation”: “Dynamique”, “Mode ECO”: 0, “Mode Chronotermostato”: 1, “TEMP - Consigne”: 21.0, “TEMP - Carte m\u00e8re”: 39.0, “Puissance Active”: “Puissance 1”, “Heure du po\u00eale (0-23)”: 18, “Minutes du po\u00eale (0-29)”: 6, “Jour du po\u00eale (1-31)”: 28, “Mois du po\u00eale (1-12)”: 12, “Ann\u00e9e du po\u00eale”: 2021, “Heures de fonctionnement total (s)”: “15:16:33:4”, “Heures de fonctionnement en puissance 1 (s)”: “9:22:15:39”, “Heures de fonctionnement en puissance 2 (s)”: “1:1:24:8”, “Heures de fonctionnement en puissance 3 (s)”: “0:1:3:54”, “Heures de fonctionnement en puissance 4 (s)”: “0:0:1:38”, “Heures de fonctionnement en puissance 5 (s)”: “0:0:11:9”, “Heures avant entretien”: 1623, “Minutes avant extinction”: 0, “Nombre d’allumages”: 164, “Etat effets sonores”: 0, “Mode”: “Hiver”}

but this the following sensor get an “unknow” status :

  • platform: mqtt
    name: Maestro
    state_topic: “PUBmcz”
    value_template: “{{ value_json[‘Etat du poêle’] }}”
    json_attributes_topic: “PUBmcz”

2nd problem : if the following switch, i can see the MQTT message & MaestroGW message(or log); but nothing happened :

  • platform: mqtt
    name: Maestro
    state_topic: “PUBmcz”
    value_template: >*
    {% if value_json[‘Etat du poêle’] == ‘Eteint’ %}
    off
    {% else %}
    on
    {% endif %}
    state_on: “on”
    state_off: “off”
    command_topic: “SUBmcz”
    payload_on: “34,1”
    payload_off: “34,40”

I’m a newby on MQTT and Python script; i don’t know where is my problem comes from (is a the same problem, 2 differents pb, …).
big thanks in advance for your help.

Regards

Hello @ll
after new investigation, my issue comes from my connexion to MQTT broker (connexion refused) from maestroGW. I’ve updated my MQTT configuration and now i get correctly all informations.
i guess push command should work correctly now too (not yet tested)
Regards

Hello Seb,

and thank you for the explanation. My error was in my configuration of your addon at this section =

MQTT_TOPIC_SUB: Maestro/

With the default values all your example works well.

Now, i’m trying to add switch with HA. The command works good, for example my stove switch to ECO Mode Off, but the switch button stays on “on” position. This is my code for this example =

- platform: mqtt
  name: Maestro_Eco
  state_topic: "Maestro/State"
  value_template: >
    {% if value_json['Mode ECO'] == '0' %}
    off
    {% else %}
    on
    {% endif %}
  state_on: "on"
  state_off: "off"
  command_topic: "Maestro/Command"
  payload_on: "41,1"
  payload_off: "41,0"

Is there something wong ?

Thank you !

Of, my test was wrong. When removing the simple quote it works =

- platform: mqtt
  name: Maestro_Eco
  state_topic: "Maestro/State"
  value_template: >
    {% if value_json['Mode ECO'] == 0 %}
    off
    {% else %}
    on
    {% endif %}
  state_on: "on"
  state_off: "off"
  command_topic: "Maestro/Command"
  payload_on: "41,1"
  payload_off: "41,0"
1 Like

Hi all!

Nice to see that this topic is still alive :slight_smile:
As my MCZ Wifi Temperature sensor stopped working and I can’t get it to work again I’d like to send temperature sensor data from HA to the stove. Both sensors (wired and wifi) never gave correct temperatures so I’d rather use my own ones. When opening up the wifi module it’s just an ESP board so I assume it’s also just sending MQTT data to the stove. That’s why I think it might be possible to send correct data from another sensor connected to HA.

Any ideas?

You could try to listen to the network trafic between the mcz sensor and the stove using something like wireshark and try to reverse engineer the protocol to see how hard it would be to mimic it.
But it looks much easier to me to just control the stove in “manual mode” and play with power level to reach the desired target temperature.

Did anybody figure out how to switch between the profiles? ( Silent, Confort, … )

Hello

I just installed the addon but when I look in the logs this is what I get: Sending packet PING data None
Received packet PONG data None

And when I launch the MCZ MEASTRO application on my smartphone, I see the stove information coming back in the logs.

socket.gaierror: [Errno -2] Name does not resolve

Help PLease

New command /Maestro/Command/Profile has been added, this is now resolved.
Thanks to @Chibald

Hello Seb,

I’ve finally had the time to try your addon, it’s working great thxs a lot !!

Do you know if the data.py can be modified ? I’ve tried to access it, but couldn’t find it. If I can’t, could add to it the value for “mode silence” ?

    [24, "Mode Silence",[
                                                    [0, "Arrêt"],
                                                    [1, "Marche"],
                                                    ]],

Thxs

Nicolas

Hello @Zeta38090 , I’ve updated the data file of the cloud script adding some missing variables and removing all accents (might require to update template sensors/switch in configuration.yaml). Let me know if it helps :wink:.

That was fast !! Thxs a lot, great work

1 Like