gysmo38 / mitsubishi2MQTT

Mitsubishi to MQTT with ESP8266 module
GNU Lesser General Public License v2.1
396 stars 141 forks source link

Remote Temp MQTT - Home Assistant #163

Closed Lactionaire closed 1 year ago

Lactionaire commented 2 years ago

How do I set up the remote temperature sensor option? I have an external sensor that is reading the temperature and is being displayed in home assistant. How do I get the heat pump to get the reading from the external sensor? The sensor is tasmota based and I am using the mqtt broker in home assistant if that helps.

Any help would greatly appreciated.

Mediacj commented 2 years ago

You have to publish a remote temperature to the following topic: m2mqtt/mqttha/remote_temp/set The m2mqtt and mqttha are defined by myself so you have different names there. The remote temperature itself is just a raw value so no json is required.

Lactionaire commented 2 years ago

Hi, can you help me with the syntax. I have been trying to publish the topic. I am using mqtt explorer and when I call the service the message appears in mqtt explorer. The temperature does not change to the room temp and continues to read the internal sensor. Heres my syntax:

service: mqtt.publish data: topic: mitsubishi2mqtt/JuliansAC/remote_temp/set payload_template: '{{ states("sensor.sensor_julian_bme280_temperature") }}'

Thanks for your help,

Mediacj commented 2 years ago

Hi, can you help me with the syntax. I have been trying to publish the topic. I am using mqtt explorer and when I call the service the message appears in mqtt explorer. The temperature does not change to the room temp and continues to read the internal sensor. Heres my syntax:

service: mqtt.publish data: topic: mitsubishi2mqtt/JuliansAC/remote_temp/set payload_template: '{{ states("sensor.sensor_julian_bme280_temperature") }}'

Thanks for your help,

It looks ok for what I can see.

I don't use automation for it but Node Red, but the way you do it within automation should work also. The roomTemperature in the state topic should change to your external temperature.

melyux commented 2 years ago

I have the following automation "action" block to publish to the remote temperature, and it works.

  - service: mqtt.publish
    data:
      topic: "hvac/bedroom/remote_temp/set"
      payload_template: "{{ trigger.to_state.state | float | round(1) }}"

Try this and then we can see which parts are actually important to get it to work (I don't remember why I'm casting to a float and then rounding, for example).

Tip: To reset the temperature back to using the Mitsubishi's internal thermometer, publish 0 to the your/topic/here/remote_temp/set topic.

Lactionaire commented 2 years ago

I was able to get the remote temp to work with my syntax above. I updated the program and that resolved the issue as I must have been using an earlier version that did not have the remote temp mqtt function.

Thanks for your help.