RESTful Switch for a Palazzetti Pellet Stove

Hey :wink:
Got a newbie question about the Restfull switch.
I’ve got a pellet stove that can be controlled with http commands. As i want to use a generic_thermostat i need to create a switch to turn ON/OFF the stove.

The rest commands are formated like that:

GET+STATUS will return:

{"INFO":{"RSP":"OK","CMD":"GET STATUS","TS":1575311921},"SUCCESS":true,"DATA":{"STATUS":7,"LSTATUS":51}}.

STATUS 1, 2, 3 or 4 means that the stove is ON and 0, 6, 7, 8 or 9 means the stove is OFF
SET+ON will turn on the stove
SET+OFF will turn off the stove

Anyone can help me to create the switch? I’m so lost i don’t even know where to start.

Thanks !

Did you read this? Did you already try to create it yourself and it’s not working?

Hi :slight_smile: Thanks for the quick reply.
Well yes I already read the article but can’t really understand how to create the switch.

I already created a sensor to extract the status:

  - platform: rest
    resource: http://192.168.1.XXX/cgi-bin/sendmsg.lua?cmd=GET+STATUS
    name: "id_status_poele"
    value_template: '{{ value_json["DATA"]["STATUS"] }}'

And a sensor to display the status in a more readable way :

  - platform: template
        value_template: >- 
          {% if is_state("sensor.id_status_poele", "0") %}
          {% elif is_state("sensor.id_status_poele", "1") %}
            Chargement Pelets
          {% elif is_state("sensor.id_status_poele", "2") %}
            Allumage du Brasier
          {% elif is_state("sensor.id_status_poele", "3") %}
            Fin d'Allumage
          {% elif is_state("sensor.id_status_poele", "4") %}
          {% elif is_state("sensor.id_status_poele", "5") %}
          {% elif is_state("sensor.id_status_poele", "6") %}
            Cycle de nettoyage
          {% elif is_state("sensor.id_status_poele", "7") %}
            Mode Eco
          {% elif is_state("sensor.id_status_poele", "8") %}
          {% elif is_state("sensor.id_status_poele", "9") %}
            Alarme Température Fumées
          {% else %}
          {% endif %}

For the RESTful switch now, i dont really know what is the endpoint.

If it’s http://192.168.1.XXX/cgi-bin/sendmsg.lua?cmd=GET+STATUS i understand how to format the “is_on_template” (well i will find on, my own how) but how does the body_on and body_off will work? will they replace the GET+STATUS part of the endpoint?

But if it’s
body_on and body_off will add (SET+ON or SET+OFF) at the end of the endpoint but i don’t know to tell the sensor to use GET+STATUS to get the is_on_template to work.

Or perhaps it can be something like http://192.168.1.XXX/cgi-bin/ and i must use the headers option, i don’t know.

Or juste maybe the RESTfull switch is not the way to go for my case.

How do you turn on/off the stove now, do you make a GET request to these respective endpoints?


or do you make a POST request with SET+ON / SET+OFF to this endpoint?


Maybe the command line switch is better for your needs

Right now I’m just using a regular browser and I type :
http://192.168.1.XXX/cgi-bin/sendmsg.lua?cmd=SET+ON (and hit enter) to turn on the stove.
The same applies With SET+OFF to turn off.
For the status I’m using the same method with GET+STATUS instead of SET+XXX A
and the browser get me the details I need.

Reading the docs I think the command line switch is the way to go for me.

Thanks for the help I will try that tomorrow :slight_smile:

Hi there,

Just so you know, I have made something to integrate my Palazzetti stove with Home Assistant:

Feel free to use and fork, and let me know if you like it.


Hi, I’m very interested in integrating my stove palazzetti on home assistant, could you guide me on how to do it ?, I’m not very experienced thanks

You can have some clues here about how i did it.

thanks for the guide, i’m trying but when i insert in configuraton.yaml sensor: !include sensor.yaml it gives me the following error : Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/sensor.yaml”, line 2, column 13 where am i wrong? thanks

Can you paste here your sensor.yaml code? seems there is a problem on line 2;
Is your indentation correct? Don’t forget the spaces at the start of each line.

Also in configuration.yaml you must use:

switch: !include switchs.yaml
sensor: !include sensors.yaml

my sensor.yaml is:

  • platform: rest
    name: “temp_poele”
    unit_of_measurement: ‘°C’
    device_class: temperature
    value_template: ‘{{ value_json[“DATA”][“T1”] }}’

    • platform: rest
      resource: ####
      name: “id_status_poele”
      value_template: ‘{{ value_json[“DATA”][“STATUS”] }}’

    • platform: rest
      resource: ####
      name: “id_status_poele_stamp”
      device_class: timestamp
      value_template: ‘{{ value_json[“INFO”][“TS”] }}’

Using french below and don’t have clue about some error codes but it’s not a big deal

  • platform: template
    value_template: >-
    {% if is_state(“sensor.id_status_poele”, “0”) %}
    {% elif is_state(“sensor.id_status_poele”, “1”) %}
    Chargement Pelets
    {% elif is_state(“sensor.id_status_poele”, “2”) %}
    Allumage du Brasier
    {% elif is_state(“sensor.id_status_poele”, “3”) %}
    Fin d’Allumage
    {% elif is_state(“sensor.id_status_poele”, “4”) %}
    {% elif is_state(“sensor.id_status_poele”, “5”) %}
    {% elif is_state(“sensor.id_status_poele”, “6”) %}
    Cycle de nettoyage
    {% elif is_state(“sensor.id_status_poele”, “7”) %}
    Mode Eco
    {% elif is_state(“sensor.id_status_poele”, “8”) %}
    {% elif is_state(“sensor.id_status_poele”, “9”) %}
    Alarme Température Fumées
    {% else %}
    {% endif %}

Can you format your code so i can read it better and see the indentation?

yes, how do I adjust format? thanks

Before and after your code use ```

solved there is no space in the first line, thanks, now if in the configurator.yaml I add the two instructions to include the two files, the mqtt entities no longer work

You have to move all your switchs and sensors to the switch and sensor files you’ve just created. Those files are here so the configuration.yaml is not to big :slight_smile:

I understand, I try now, thanks

I did it, thank you very much

1 Like

I’m newbie with HA and trying to figure out how to add my Jotul Stove (with palazetti wifi control) to my HA instance… (I installed my HA server just for this for now).
I tried to follow @Noza instructions but i don’t understand how I can see switch and sensors in lovelace dashboard after to have creating and editing yaml files as shown here : GitHub - NoSaga0717/Palazzetti-Ha
Can someone help me please ?
Sorry for my bad english …

Click on the three dots at the top right of the screen and select ‘Edit Dashboard’. Then click on the blue ‘+ Add Card’ icon at the bottom right and select a card to add." Find the card you want to use (e.g the Entity one). Type switch.xxxxx or sensor.xxxx and you will find your newly created switch/sensor