chibald / maestrogateway Goto Github PK
View Code? Open in Web Editor NEWManage MCZ pellet stoves that are equipped with Maestro technology
License: GNU General Public License v3.0
Manage MCZ pellet stoves that are equipped with Maestro technology
License: GNU General Public License v3.0
Hi @Chibald,
during installtion I encountered some small bugs. I wanted to directly create a PR, but hadn't right to do so. So here the things I found:
Add copy of the "config.py" file to the "install" and "update_daemon" file:
add "cp config.py /opt/maestro " to line 19 of "install" and "update_daemon" file.
Change the "maestro.service" file to use python3 instead of python2. After the installing process the script had an error, that the "enum" module could not be found. After googling I found that in python 2 this had to be installed additionally whereas in python3 its included in the std lib. After I changed the "maestro.service" to use python3 instead of the default python2, it worked.
change in maestro.service:
old: ExecStart=/usr/bin/python '/opt/maestro/maestro.py'
new: ExecStart=/usr/bin/python3 '/opt/maestro/maestro.py'
Hope that helps others =)
Hi,
I'm currently trying to create a script to control my stove.
How can we know if the stove is turned on/off ? The only way I see is to check the "Fume_Temperature" is upper than 50-70 degrees which is the only parameter that come often enough on the topic....
Do you have any other idea ?
Hi maintainers,
Thanks for this project, I use it with Home Assistant and it works very well!
Do you have any plans to publish the Docker container on Docker hub? This would make the setup very straightforward.
Hi @Chibald,
thanks for the software
why does it write the messages on the console and not in the activity.log.
The file was not created automatically either.
I created it for the test, but it does not log into the file.
He runs over the deamon
Thanks
Since the scripts are meant as a way to control an MCZ stove from Openhab2 it would be helpful if there were additional informations and examples how to configure the mqtt broker, giving examples how to configure things and items.
Hi, my MCZ Club Hydro 16 doesn't have a wifi module - the cost of a the module is currently around £300 which is crazy high price, so I'm not gong to buy one. Since you have a good knowledge about the technology, I'd like to ask your opinion - do you think its possible to control the stove without the wifi module somehow? Maybe via raspberry pi + modbus rtu command??
Would love to get your thoughts...
Thanks!
Hello,
I updated the container and now maestrogateway seems stuck in the config and does not start connecting to the stove.
My server is on ubuntu server 21.04 up to date.
My docker-compose:
maestrogateway:
container_name: maestrogateway
image: chibald/maestrogateway:v1.02
networks:
- proxy
environment:
MQTT_ip: 'mqttbroker'
MQTT_port: 1883
MQTT_authentication: 'True'
MQTT_user: 'mqtt'
MQTT_pass: 'mqtt'
MQTT_TOPIC_SUB: 'SUBmcz'
MQTT_TOPIC_PUB: 'PUBmcz'
MQTT_PAYLOAD_TYPE: 'TOPIC'
WS_RECONNECTS_BEFORE_ALERT: 1
MCZip: '192.168.120.1'
MCZport: '81'
restart: always
networks:
proxy: # this is the external network
name: proxy
mqtt: #network t`
The docker compose up log:
Attaching to maestrogateway
maestrogateway | Starting Maestrogateway.
maestrogateway | Systemd is not available. This is the case on docker alpine images and on windows machines
maestrogateway | 2021-10-13 12:28:18,111 :: __main__ :: INFO :: Starting Maestro Daemon
maestrogateway | Reading config from envionment variables
maestrogateway | 2021-10-13 12:28:18,111 :: __main__ :: INFO :: Connection in progress to the MQTT broker (IP:mqttbroker PORT:1883)
maestrogateway | mqtt authentication enabled
maestrogateway | 2021-10-13 12:28:18,113 :: __main__ :: INFO :: MQTT: Subscribed to topic "SUBmcz#"
maestrogateway | 2021-10-13 12:28:18,113 :: __main__ :: INFO :: MQTT: Connected to broker. 0
How can I get more log ?
Hi,
Thanks to this component I was able to create a very nice card in home assistant to control my Pellet Stove. It works so much better than the original app!
The feature I'm still looking for is to be able to control the profile. I don't want to operate the stove in manual mode. But just control the set temperature and switch between the different profiles ( Active, Comfort, Silent, Boost ).
The current commands don't allow me to switch the profile. When I use the silend mode command the stove automatically switches to the manual profile, while I want to actually switch to the silend profile.
A command to control the profile is needed to be able to control the stove in "automatic" mode.
Cheers,
Tom
Hello, is it possible to export this code for Homebridge plugin ?
Using DockerHub, I run maestrogateway as container in Home Assistant's Portainer. Its status is running, but in the log it says: portainer standard_init_linux.go: 219: exec user process caused: exec format error. What is the explanation for this?
my stove has 3 fans. Which I would like to control. With Fan1 (Fan_State) everything works as expected.
I could see that the other both fans are linked to the Ducted Fans. When changing the state in the MCZ app, I could see, that the state topics for the ducted fans (DuctedFan1, DuctedFan2) are also changed. But I think there is something wrong in the script, because those values are the half of the normal Fan. E.g. Level 1 is sent as 0.5, Level 2 as 1.0, Level 3 as 1.5 and so on. I guess this is because the message type is wrongly set to "temperature" instead of "int". When I change this as follows, the correct numbers seem to be sent:
MAESTRO_INFORMATION.append(MaestroInformation(3, "DuctedFan1", 'int')) MAESTRO_INFORMATION.append(MaestroInformation(4, "DuctedFan2", 'int'))
As a second step I would like to send those commands to the stove. This command seems not to be implemented yet. I would just add the same lines as for the Fan_State to the commands.py, but I am not sure about the ID:
MAESTRO_COMMANDS.append(MaestroCommand('Fan_State', 37, 'int'))
Where is this 37 coming from?How can I find out the correct ID for the other fans? Is there a program/app where I can actually see what the MCZ app is sending?
I guess there is no official API documentation, is there?
Thanks for your help!
Hello,
i found a small error. in the file install_daemon in line number 20 a small "s" is missing in commands.py .
I also get an error message when I try to start the service.
Loaded: loaded (/etc/systemd/system/maestro.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-04-08 06:49:17 CEST; 14min ago
Process: 1503 ExecStart=/usr/bin/python /opt/maestro/maestro.py (code=exited, status=1/FAILURE)
Apr 08 06:49:17 raspberrypi systemd[1]: maestro.service: Service RestartSec=100ms expired, scheduling restart.
Apr 08 06:49:17 raspberrypi systemd[1]: maestro.service: Scheduled restart job, restart counter is at 5.
Apr 08 06:49:17 raspberrypi systemd[1]: Stopped MCZ Maestro Equipment Gateway with MQTT Server.
Apr 08 06:49:17 raspberrypi systemd[1]: maestro.service: Start request repeated too quickly.
Apr 08 06:49:17 raspberrypi systemd[1]: maestro.service: Failed with result 'exit-code'.
Apr 08 06:49:17 raspberrypi systemd[1]: Failed to start MCZ Maestro Equipment Gateway with MQTT Server.
Does it mean anything to anyone?
I have two stoves from MCZ. I have been able to use my first stove in Home Assistant for a while now. I'm using here for a docker container.
Now I would like to use my second stove in Home Assistant as well.
That's where I'm having problems. One way to do this is to use an extra USB WiFi dongle. Problem is I can't find a dongle that works in Debian Bullseye on a Raspberry Pi.
I installed Home Assistant Supervised on a Raspberry Pi 4b 8gb.
Another solution would be that the IP address 192.168.120.1:81 is not used but on my home WiFi network. The MCZ app also works via that network.
What solutions are possible to be able to use both of my stoves in Home Assistant?
Hi -
is it mandatory to run the MCZ as wifi access point and bridge the connection to my official house wifi?
Or is it also possible to integrate the MCZ into my house wifi connected to the internet?
Thanks ...
I'm running the latest build in a docker container and it builds up memory. 2 GB after less than a day.
I am about to buy a MCZ pellet stove for my workshop.
There seems to be a new version of Maestro labelled M2 or Maestro 2.0 along with a new app.
I assume the gateway does not work with the new version? Anyone tried to use the gateway with new version?
Hi,
I've been using the original plugin from Anthony for about a year now via Homebridge.
Recently I switched to Home Assistant to have more possibilities for customisation.
However I'm a real MQTT-noob so I'm not able to convert this...
As your plugin is very similar to the original I hope you might be able to help me out! If not, no problem!
What I have so far:
I can sub to the MQTT stream. Output:
Bericht 8 ontvangen op PUBmcz om 21:55:
{
"RPM - Vis sans fin - LIVE": 0,
"RPM - Ventilateur fummées": 0,
"Heure du poêle (0-23)": 21,
"Etat du ventilateur d'ambiance": "Niveau 5",
"Minutes du poêle (0-29)": 58,
"TEMP - Carte mère": 30,
"Heures de fonctionnement en puissance 1 (s)": "1:17:39:31",
"TEMP - Consigne": 22,
"Jour du poêle (1-31)": 23,
"Heures de fonctionnement total (s)": "11:5:49:37",
"Etat du mode Active": 1,
"Mode Chronotermostato": 0,
"Minutes avant extinction": 0,
"ACTIVE - Live": 100,
"Etat effets sonores": 1,
"Température des fumées": 25,
"Température ambiante": 15,
"Heures de fonctionnement en puissance 5 (s)": "4:2:26:14",
"Heures de fonctionnement en puissance 2 (s)": "1:3:18:44",
"Puissance Active": "Puissance 3",
"Mode": "Hiver",
"Heures de fonctionnement en puissance 3 (s)": "1:23:48:16",
"Etat du poêle": "Eteint",
"Heures de fonctionnement en puissance 4 (s)": "0:20:26:50",
"Mode ECO": 0,
"RPM - Vis sans fin - SET": 0,
"Etat de la bougie": 0,
"Heures avant entretien": 1730,
"ACTIVE - Set": 192,
"Année du poêle": 2020,
"Nombre d'allumages": 53,
"Mode de régulation": "Manuelle",
"Mois du poêle (1-12)": 10
}
My previous Homebridge config:
{
"accessory": "mqttthing",
"type": "thermostat",
"name": "MCZ VIVO 90",
"logmqtt": true,
"url": "mqtt://192.168.1.211:1883",
"topics": {
"getCurrentTemperature": {
"topic": "PUBmcz",
"apply": "return JSON.parse(message)['Température ambiante'].toFixed(1);"
},
"setTargetHeatingCoolingState": {
"topic": "SUBmcz",
"apply": "return message == 'HEAT' ? '34,1' : '34,40';"
},
"setTargetTemperature": {
"topic": "SUBmcz",
"apply": "return \"42,\"+message;"
}
}
},
Now is the question:
How do I translate this into something working in HACore which works with .yaml files for configuration?
What I want to do:
2 states: On/Off
Temperature control
yaml-sample:
# Full example configuration.yaml entry
climate:
- platform: mqtt
name: Study
modes:
- "off"
- "cool"
- "fan_only"
swing_modes:
- "on"
- "off"
fan_modes:
- "high"
- "medium"
- "low"
power_command_topic: "study/ac/power/set"
mode_command_topic: "study/ac/mode/set"
temperature_command_topic: "study/ac/temperature/set"
fan_mode_command_topic: "study/ac/fan/set"
swing_mode_command_topic: "study/ac/swing/set"
precision: 1.0
I don’t really need to do anything more as the stove itself regulates pellets and ventilation by it’s own built-in thermostat.
Thanks in advance!
When running the docker with docker compose I get the following error :
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 | exec /usr/local/bin/python3: exec format error
mcz-maestrogateway-1 exited with code 1
Here is the compose file:
version: '3.3'
services:
maestrogateway:
image: chibald/maestrogateway:latest
network_mode: host
environment:
MQTT_ip: '192.168.xxx.xxx'
MQTT_port: 1883
MQTT_authentication: 'False'
MQTT_user: ''
MQTT_pass: ''
MQTT_TOPIC_SUB: 'Maestro/Command/'
MQTT_TOPIC_PUB: 'Maestro/'
MQTT_PAYLOAD_TYPE: 'TOPIC'
WS_RECONNECTS_BEFORE_ALERT: 5
MCZip: '192.168.120.1'
MCZport: '81'
restart: unless-stopped
When a getinfo explicitly request all the stove info, don't filter out all the values that didn't change but send all values. Only appy filtering of non changed values when it's triggered by the timer...
Please delete
Hey,
first of all Thank you for the great Script. This is a perfect solution for the horrible App from MCZ. I use it in combination with ioBroker and now i can control the oven even in Homekit.
But i have a Problem using the Deamon on Raspberry Pi OS. After a Powerloss or Restart the daemon wont come up correctly, it is stuck at "activating/start".
As soon as i restart the deamon using "sudo systemctl restart maestro.service" the deamon will come up immediately.
Any suggestions what could have go wrong here? Perhaps it is starting too early or something like this?
Thanks
Hi,
I love this gateway. Great work! Thanks so much! I use it to integrate my stove into my home automation.
I have one question: How can I switch from automatic mode (dynamic) to manual mode? I tried to use Maestro/Command/Control_Mode and Maestro/Command/Active_Mode, but it looks like neither of them has any effect...
Can you help?
Thanks!
Hello,
When i turn on the Pellet_Sensor, i can see a change on the "Maestro/Celcius_Or_Fahrenheit" topic in my logs.
Is it normal?
How return the state of the Pellet_Sensor?
Installed the script like described in the README.
When starting the daemon service using
sudo systemctl start maestro.service
it does not return to command line until CTRL-C is pressed.
Checking the status with
sudo systemctl status maestro.service
gives:
`● maestro.service - MCZ Maestro Equipment Gateway with MQTT Server
Loaded: loaded (/etc/systemd/system/maestro.service; disabled; vendor preset: enabled)
Active: activating (start) since Wed 2020-01-29 22:42:47 CET; 2min 25s ago
Cntrl PID: 10051 (python)
Tasks: 5 (limit: 4915)
Memory: 7.4M
CGroup: /system.slice/maestro.service
└─10051 /usr/bin/python /opt/maestro/maestro.py
Jan 29 22:42:47 openhab systemd[1]: Starting MCZ Maestro Equipment Gateway with MQTT Server...`
It looks like the service doesn't start completely.
Subscribing the channel PUBmcz works and status messages from the stove are received.
Publishing commands to the SUBmcz topic does nothing. No reaction from the stove.
i'm running Home Assistant Supervised on debian 11 Bullseye installed on a raspberry pi 4b.
I have installed Docker version 20.10.12, build e91ed57 and docker-compose version 1.29.2.
I installed MaestroGateway as explained.
Home Assistant supervisor log reports the following warning:
12/21/28 14:27:21 WARNING (MainThread) [supervisor.resolution.evaluations.base] Found unsupported images: {'chibald/maestrogateway'} (more info: https://www.home-assistant.io /more-info/unsupported/software)
What's going wrong?
Hello,
I am using your script to control my stove with home assistant.
Everything works except the Power_Level command.
Here is an example of what I am using:
topic: SUBmcz
payload_template: '{"Command":"Power_Level", "Value":"13"}'
qos: 0
retain: true
With best regards
dear chibald
I am a new user of Home Assistant in Rasberry pi. I still have a lot to learn. Today I spent a whole day installing your repository Maestrogateway. I did not succeed. I try to follow your instructions on the website closely, but I keep getting stuck.
When working with a terminal it does not execute this file "bash install".
When I use docker, the version of docker-compose.yml is higher than version 2 and it doesn't work.
What am I doing wrong and what can I do?
How can I install "Maestro Gateway" on my "Home Assistance"?
I would greatly appreciate it if you could put me on my way.
With best regards
Koen
Hey there,
first of all: Thanks @Chibald for the work, much appreciated.
Background: We got finally installed our new Pellet today.
I was expecting that the official App is not that good, but anyhow, I thought it should do the job somehow. But I didn't expected that the App is really a great piece of sh*t.
Anyhow, I got a well configured OpenHab-Installation which should perfectly fit with this MQTT-Solution. Thanks again for that.
My question is: Are you (everybody here) using this Gateway in production, I mean as a full replacement for the "App" and is the Communication with the Pellet reliable at all? For sure, I need to configure my OpenHab for that to have a frontend, but that should be really no problem at all.
So, what I mean is: when I publish a message, like "stop the oven" does it work on the first try?
Thank you in advance & great new year.
Cheers,
Dominik
When using the cloud script, if for some reason, the MQTT server connection is lost (server restart, network outage, etc...), the service never tries to subscribe back to the command topic.
You have to restart the service to make the commands work again.
It could be a great enhancement to check if subscription is still active.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.