Using ZS06/UFO-R11 Zigbee/MQTT Infrared (IR) remote with SmartIR

Can you please explain step by step for total noob how to run this?

I have Windows based PC with Python installed, I have an MQTT broker configured, and of course I have VM with HA OS installed on other host.
Where should I run that tool, on PC or on HA?

I actually did find it a bit hard to get it working with all the dependencies. You can read about my adventures with it at Stuck on Setting the controller to learning mode… · Issue #2 · EduardoHerreraM/SmartIR-Zigbee-Tools (github.com)

You would run it on your PC. It would then generate the .json file that you’d copy to HA.
However if there’s already a .json for your device for a Broadlink device then I’d instead just recommend converting it as it’s way easier than learning all the codes. You can use Convert SmartIR Broadlink commands to Tuya (github.com).

Hi

I have a problem trying to use the latest version (1.18) for SmartIR in order to work with an UFO-R11 (Z2M) and a Fujitsu AR-RCE1E.

I’m trying with:

Configuration.yaml

climate:
  - platform: smartir
    name: Fujitsu
    unique_id: pto_fujitsu
    device_code: 1285 # for Fujitsu remote AR-RCE1E
    controller_data:
      controller_type: UFOR11 # for UFO-R11
      mqtt_topic: zigbee2mqtt/Universal Remote Control/set # or /command?
      temperature_sensor: sensor.0x00158d0001ddaee4_temperature
      humidity_sensor: sensor.0x00158d0001ddaee4_humidity

Unfortunately, there is a problem :unamused:

Advertencias (warning) de configuración
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 283: required key 'remote_entity' not provided
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 284: Values are not equal: value:UFOR11 != target:Broadlink for dictionary value 'controller_data->controller_type', got 'UFOR11'
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 285: 'mqtt_topic' is an invalid option for 'climate.smartir', check: controller_data->mqtt_topic
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 286: 'temperature_sensor' is an invalid option for 'climate.smartir', check: controller_data->temperature_sensor
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 287: 'humidity_sensor' is an invalid option for 'climate.smartir', check: controller_data->humidity_sensor

Help me, please!

Thank you in advance

Probably because 1285.json is designed for Broadlink devices and you’re trying to use a UFOR11. You’d have to edit the file and change the supportedController and IR codes.
Ideally what you’d do is change the number to one that isn’t being used and put it in the custom codes folder. You could use a converter to convert it or capture the codes and replace the IR codes in the file.

You’re probably right, but I don’t understand why your procedure for writing the JSON file couldn’t also be done with previous versions. What does the latest version for UFOR11 introduce compared to the previous ones?

I have created a new 6285.json with the converted codes from the original 1285.json but the problem is the same :frowning:

Configuration.yaml

climate:
  - platform: smartir
    name: Fujitsu
    unique_id: pto_fujitsu
    device_code: 6285

    controller_data:
      controller_type: MQTT # for UFO-R11
      mqtt_topic: zigbee2mqtt/Universal Remote Control/set  # or /command ?
      temperature_sensor: sensor.0x00158d0001ddaee4_temperature
      humidity_sensor: sensor.0x00158d0001ddaee4_humidity

6285

6285.json

{
  "manufacturer": "Fujitsu",
  "supportedModels": [
    "AR-RCE1E"
  ],
  "supportedController": "MQTT",
  "commandsEncoding": "Raw",                                                                                              "temperatureUnit": "C",                                                                                                 "minTemperature": 16.0,                                                                                                 "maxTemperature": 30.0,                                                                                                 "precision": 1.0,                                                                                                       "operationModes": [                                                                                                       "heat",                                                                                                                 "cool",                                                                                                                 "dry",                                                                                                                  "fan_only",                                                                                                             "heat_cool"                                                                                                           ],                                                                                                                      "fanModes": [                                                                                                             "auto",                                                                                                                 "high",                                                                                                                 "med",                                                                                                                  "low",                                                                                                                  "quiet"     
.
.
.

ERRORs

Advertencias de configuración
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 284: required key 'remote_entity' not provided
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 285: Values are not equal: value:MQTT != target:Broadlink for dictionary value 'controller_data->controller_type', got 'MQTT'
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 286: 'mqtt_topic' is an invalid option for 'climate.smartir', check: controller_data->mqtt_topic
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 287: 'temperature_sensor' is an invalid option for 'climate.smartir', check: controller_data->temperature_sensor
Invalid config for 'smartir' from integration 'climate' at configuration.yaml, line 288: 'humidity_sensor' is an invalid option for 'climate.smartir', check: controller_data->humidity_sensor

First error… very strange: “required key ‘remote_entity’ not provided”

Your temp and humidity is indented wrong. Should be

climate:
  - platform: smartir
    name: Fujitsu
    unique_id: pto_fujitsu
    device_code: 6285

    controller_data:
      controller_type: MQTT # for UFO-R11
      mqtt_topic: zigbee2mqtt/Universal Remote Control/set  # or /command ?
    temperature_sensor: sensor.0x00158d0001ddaee4_temperature
    humidity_sensor: sensor.0x00158d0001ddaee4_humidity

Also not sure if mqtt_topic should have spaces in it. Below is an example of mine, making note that my mqtt_topic ends in /ir_code_to_send

climate:
  - platform: smartir
    name: Bedroom Room AC
    unique_id: ac_bedroom_zigbee
    device_code: 10271
    controller_data:
      controller_type: MQTT
      mqtt_topic: zigbee2mqtt/moes_ufo_r11/set/ir_code_to_send
    power_sensor: binary_sensor.0x00158d000ae4f462_contact
    power_sensor_restore_state: true

You should also put your custom code in the custom codes folder, not in the
codes - climate folder otherwise it’ll get deleted next time you update the integration. If it’s not already there, create it under smartir - custom_codes - climate

Here’s the first little bit of my .json file

{
  "manufacturer": "Panasonic",
  "supportedModels": [
    "CS-SA9CKP"
  ],
  "supportedController": "MQTT",
  "commandsEncoding": "Raw",
  "temperatureUnit": "C",
  "minTemperature": 16.0,
  "maxTemperature": 30.0,
  "precision": 1.0,
  "operationModes": [
    "heat",
    "cool",
    "dry"
  ],
  "fanModes": [
    "auto",
    "low",
    "mid",
    "high"
  ],
  "commands": {
    "off": "CJANrw10AzwKVSADAjcDeGAHgAMAWiAPAFpgC8Af4AcTQAtAMwc3A5IDVQN0A4AvAHRgC0ADQAHAG4ADQFfgCR9Ag4B/QD+AX+AHi8AL4AGL4AMXgHeAh+ABY8AF4AOD4AOjwCFAC4CDBF42rw2QIAfgA7OAt8DHgPfA7wCSoFvgA/fA48CbgHOBQ+AFU8AT4AH34AOLwK/Aa0EP4AXDgJPhAXvhA4eA9+ABg+EB48CzwStAhwBV4ACvwOcCzQ1yIZM=",
    "heat": {
      "auto": {
        "16": "C3INzQ1VA1oKVQN0A0ADCDcDsQMYA3gKNyATQANAG4AHAJIgFwCSIB9AAwB4IBcAPKAjQCtAFwCxIBcAPKAvwA9AT8AzAJIgX4BT4AETgCPgCYNAK0BfgIeAG0Bb4ANPwBuAJ+ABG8CzQG/gAX+Av0CTwDPgAYNAFwdyDa8NNwObNoEPgGNBBwB0IFcAGOAA5+ABO4EPQHdAcwA8ICcBWgqAJ0B7gGfgAesAl6AbgGuAh0FjQNMEkgP6ArVgC8AfA1MN7A1Ba4BbAHggO+EBk0FDQZ+AQ4Dv4AP34QE3QcdAKwCXYB+AM4CvAhgDz2DzAfoCwefAr0AjgZcAUyGTATcD",

Then to make sure it’s actually firing an IR code I use my phones camera so I can see if the IR blasters are working.

Perfect, solved! The problem was the indentation :slight_smile: