Chibald / maestrogateway

Manage MCZ pellet stoves that are equipped with Maestro technology
GNU General Public License v3.0
38 stars 13 forks source link

Home Assistant Support #9

Closed kimme1024 closed 3 years ago

kimme1024 commented 3 years ago

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!

Chibald commented 3 years ago

I dont really know anything about home assistant. But, it seems for turning on and off the stove you just need to send the mqtt commands. So for turning on, send { "Command": "Power", "Value": 1} and off { "Command": "Power", "Value": 0} to mqtt topic SUBmcz If you want to use anthony's version you should probably send 34,1 and 34,40 for on and off to the same topic.

I guess someone om HA forum could help you out configuring it?