Control MCZ Maestro pellet stove via HACore trough MQTT

Hello @imcaro,

try changing

"MQTT_TOPIC_PUB": "Maestro/"

to

"MQTT_TOPIC_PUB": "Maestro/State"

(and same for state_topic in config sensor)

This could be due to the trailing slash in the mqtt topic (cf: MQTT seems to have broken with latest 6.0.1 update · Issue #2020 · home-assistant/addons · GitHub)

I applied “Maestro/State” in the config + sensor

but the problem persists, the sensors remain in an unknown state

Hi there,
Very impressive work!
I am totally new to this, so it may be a simple mistake… However, I struggle with getting a cloud connection with SebLz addon. Seems to be refused?!

HA on virtualbox, WIN10 - working fine with other automations…
MQTT is up and running.

I hope you have some suggestions to where I went wrong/could try different things.

BW, Jesper

This is the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[19:12:33] INFO: Launching maestro cloud connection plugin
2022-05-14 19:12:33,789 :root :: INFO :: Lancement du deamon
2022-05-14 19:12:33,790 :root :: INFO :: Anthony L. 2019
2022-05-14 19:12:33,790 :root :: INFO :: Pipolaq's version
2022-05-14 19:12:33,790 :root :: INFO :: Niveau de LOG : DEBUG
2022-05-14 19:12:33,790 :engineio.client :: INFO :: Attempting polling connection to http://app.mcz.it:9000/socket.io/?transport=polling&EIO=3
2022-05-14 19:12:33,793 :urllib3.connectionpool :: DEBUG :: Starting new HTTP connection (1): app.mcz.it:9000
2022-05-14 19:12:38,799 :engineio.client :: INFO :: HTTP GET request to http://app.mcz.it:9000/socket.io/?transport=polling&EIO=3&t=1652548353.7908173 failed with error HTTPConnectionPool(host='app.mcz.it', port=9000): Max retries exceeded with url: /socket.io/?transport=polling&EIO=3&t=1652548353.7908173 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f360dd6e410>: Failed to establish a new connection: [Errno -3] Try again')).
Traceback (most recent call last):
  File "/maestro/cloud/maestro.py", line 229, in <module>
    sio.connect(_MCZ_App_URL)
  File "/usr/local/lib/python3.7/site-packages/socketio/client.py", line 280, in connect
    raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: Connection refused by the server
[cmd] /run.sh exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

This is the config - serial and macadress changed of course.

USE_MCZ_CLOUD: true
MQTT_ip: core-mosquitto
MQTT_port: '1883'
MQTT_authentication: 'True'
MQTT_user: jesper
MQTT_pass: password
MQTT_TOPIC_SUB: Maestro/Command
MQTT_TOPIC_PUB: Maestro/State
MQTT_PAYLOAD_TYPE: TOPIC
WS_RECONNECTS_BEFORE_ALERT: '5'
MCZip: 192.168.120.1
MCZport: '81'
MCZ_device_serial: '11111111'
MCZ_device_MAC: 11aa22bb33cc
MCZ_App_URL: http://app.mcz.it:9000

Hi @Seb_Lz

As I’m using HA Core I’m not able to install addons to my HA Instance.
Would it be possible to make your addon available trough HACS?

Today my RPI died and as I have to start over anyway I’d better start using your integration.

Thanks in advance!

Kim

Hi, I’m afraid I won’t have time to do that, besides I’m not sure it really makes sense to duplicate this feature in HACS. Isn’t it possible for you to move to a supervised HA install or HassOS (Installation - Home Assistant) ?

Hi,

Not an option here (running on a Mac server in venv)
I reinstalled a rpi in the meantime and did it the old fashioned way…
It would’ve been more logical if you’d made it to work with hacs from the beginning. Then it would’ve worked on every installation method but I understand it’s too much work now.

no, i try to look if something change when the pellets get empty but no luck, maybe @Seb_Lz has a idea to get this work?

Hello All :slight_smile:
I’m trying to upgrade my config, and I’m looking for a sensor (maybe IR) to check how much pellet I’ve got left in the tank. Does anybody have a got such a device ?

Thxs

Nicolas

Not yet but I’m also thinking about doing that. I was thinking to use a car reverse sensor with an esp32. Maybe a little project for the upcoming winter :slight_smile:

Found this link in Italian from a guy who did it. It’s dead cheap around 5€ in components, I just need to find a way to install it inside the stove…

https://www.lejubila.net/2021/04/creare-un-sensore-di-livello-del-pellet-per-una-stufa-e-integrarlo-su-home-assistant/

Hi, thank you for this addon. I try to get it working for several hours without any chance. My head is now out of order :wink: I get the connection with MQTT but it seems I do not get any data from my stove. The log is looping with this sequence:

2022-09-16 19:39:40,016 :root :: INFO :: Websocket still connected ? True
2022-09-16 19:39:40,016 :root :: INFO :: Envoi de la commande pour rafraichir les donnees
Emitting event "chiedo" [/]
2022-09-16 19:39:40,016 :socketio.client :: INFO :: Emitting event "chiedo" [/]
2022-09-16 19:39:40,016 :engineio.client :: INFO :: Sending packet MESSAGE data 2["chiedo",{"serialNumber":"xxxxxxxxxxxxxx","macAddress":"xxxxxxxxxx","tipoChiamata":1,"richiesta":"C|RecuperoInfo"}]
2022-09-16 19:39:44,545 :engineio.client :: INFO :: Sending packet PING data None
2022-09-16 19:39:44,563 :engineio.client :: INFO :: Received packet PONG data None

Any support is more than welcome as now I am stuck.

USE_MCZ_CLOUD: true
MQTT_ip: core-mosquitto
MQTT_port: "1883"
MQTT_authentication: "True"
MQTT_user: user
MQTT_pass: pass
MQTT_TOPIC_SUB: Maestro/Command
MQTT_TOPIC_PUB: Maestro/State
MQTT_PAYLOAD_TYPE: TOPIC
WS_RECONNECTS_BEFORE_ALERT: "5"
MCZip: 192.168.120.1
MCZport: "81"
MCZ_device_serial: "xxxxxxxxxxxx"
MCZ_device_MAC: xxxxxxxxxxxx
MCZ_App_URL: http://app.mcz.it:9000
debug: true

It seems you connect through the cloud.

Do your App on the phone get any info from the stove ?

Yes, I can get connected to it and suucessfully starter the store via the MCZ app.

Have you double checked your Serial & Mac Info ? Normally it works…

Yes. I have only a double for the Mac : I put the Mac of the wifi interface in lowercase without “:”. Is that correct?

You have to use the MAC that you can see on the MCZ app, when you configure the stove, I first tried with the “real” @MAC i found in my router, and it was not working.

you need to use the MAC written on the stove

Yes I trier both without success. I have now without success the Mac from the mcz app. I have one for bt and one for wifi. I use the Mac from the wifi.
Still no success.

Did you use the correct local IP address ?
I see 192.168.120.1 in your config, is it the right IP for your stove on your wifi router ?

Quick question about my On/ Off Switch

my switch looks like this:

switch:
  # Switch Poele On Off
- platform: mqtt
  name: poele marche arret
  state_topic: "Maestro/State"
  value_template: >
   {% if value_json['Etat du poele'] == 'Eteint' %}
   Eteint
   {% else %}
   En marche
   {% endif %}
  state_on: "on"
  state_off: "off"
  command_topic: "Maestro/Command"
  payload_on: "34,1"
  payload_off: "34,40"

The yaml looks like this :

cards:
  - show_name: true
    show_icon: true
    type: button
    tap_action:
      action: toggle
    entity: switch.poele_marche_arret
    icon: mdi:fire
    show_state: true
    icon_height: 80px
    name: Marche Arrêt

The problem is that the card does not show the state of the stove
Capture d’écran 2022-09-21 100207

why is that ?
thx a lot