I have Geeklink IR blaster (tasmota fw, mqtt enabled) and with mqtt integration in HA and with some code I can turn on/off my AC, set cool, change fan speed…
Question is:
Is it possible somehow to use irrecieve code that i see in tasmota console to set AC state (on or off)?
If someone use original AC remote then AC state in HA will be wrong.
In tasmota console I can se if original remote is used by irrecieve command.
It will be nice if I can use this to set real state to my AC in HA if orginal remote is used.
If you can “see it” you can trigger automations.
Where do you see it and what data is available?
I can see full code in tasmota console when someone push any button on orginal AC remote.
I can se protocol, data, irhvac code…
Tasmota console is not home assistant. Is it publishing this to your mqtt broker?
How can I do that to see recieved code in HA?
You will receive something like
{"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x00FE08F7","DataLSB":"0x007F10EF","Repeat":0}}
You can check here (configuration → integrations → mqtt → configure)
You can create a mqtt trigger to set the state.
I see code like this in tasmota console:
{"IrReceived":{"Protocol":"NEC","Bits":32,"Data":"0x00FE08F7","DataLSB":"0x007F10EF","Repeat":0}}
I will try this listen/triger thing in HA.
Do you have any idea how this code must look?
(If recieved code from IR blaster is “123456” then set AC state " On”…)
Maybe show what you receive first.
This is for power on:
Message 1 received on tele/tasmota_9212C6/RESULT at 08:13:
{
“IrReceived”: {
“Protocol”: “VESTEL_AC”,
“Bits”: 56,
“Data”: “0xC41B2001FF0201”,
“DataLSB”: “0x23D80480FF4080”,
“Repeat”: 0,
“IRHVAC”: {
“Vendor”: “VESTEL_AC”,
“Model”: -1,
“Mode”: “Cool”,
“Power”: “Off”,
“Celsius”: “On”,
“Temp”: 18,
“FanSpeed”: “Max”,
“SwingV”: “Off”,
“SwingH”: “Off”,
“Quiet”: “Off”,
“Turbo”: “Off”,
“Econo”: “Off”,
“Light”: “Off”,
“Filter”: “On”,
“Clean”: “Off”,
“Beep”: “Off”,
“Sleep”: -1
}
}
}
QoS: 0 - Retain: false
This is for power off:
Message 0 received on tele/tasmota_9212C6/RESULT at 08:13:
{
“IrReceived”: {
“Protocol”: “VESTEL_AC”,
“Bits”: 56,
“Data”: “0xF41B2001FEE201”,
“DataLSB”: “0x2FD804807F4780”,
“Repeat”: 0,
“IRHVAC”: {
“Vendor”: “VESTEL_AC”,
“Model”: -1,
“Mode”: “Cool”,
“Power”: “On”,
“Celsius”: “On”,
“Temp”: 18,
“FanSpeed”: “Max”,
“SwingV”: “Off”,
“SwingH”: “Off”,
“Quiet”: “Off”,
“Turbo”: “Off”,
“Econo”: “Off”,
“Light”: “Off”,
“Filter”: “On”,
“Clean”: “Off”,
“Beep”: “Off”,
“Sleep”: -1
}
}
}
QoS: 0 - Retain: false
As far I can see the “Data” and DataLSB" data changes if for example I change the temperature.
If it is possible to use only part of the data for example “Protocol”: “VESTEL_AC” and “Power”: “On” or “Off” data this would be great
I tried it that way, but it does not work
binary_sensor:
- platform: mqtt
name: ‘AC’
state_topic: ‘tele/tasmota_9212C6/RESULT’
value_template: >-
{% if value_json.IrReceived.Power == ‘On’ %}
{{‘ON’}}
{% elif value_json.IrReceived.Power == ‘Off’ %}
{{‘OFF’}}
{% else %}
{{states(‘binary_sensor.AC’) | upper}}
{% endif %}
device_class: power
It would be IrReceived.IRHVAC.Power, since Power is in a second {
It works now
binary_sensor:
- platform: mqtt
name: ‘AC’
state_topic: ‘tele/tasmota_9212C6/RESULT’
value_template: >-
{% if value_json.IrReceived.IRHVAC.Power == ‘On’ %}
{{‘ON’}}
{% elif value_json.IrReceived.IRHVAC.Power == ‘Off’ %}
{{‘OFF’}}
{% else %}
{{states(‘binary_sensor.AC’)}}
{% endif %}
device_class: power
New question.
Currently with these settings I can see if someone has turned the air conditioning on / off.
Can the lovelace thermostat be set to refresh with the data read by the ir blaster?
How to insert this data into the binary_sensor.
(Mode, temperature, fan speed, swing mode, …)