Broadlink Send Error

Hey All,

Been using the Broadlink Integration for weeks now with no issues. I upgrade my Home Assistant version whenever there is a new one available.

All of a sudden, and I can’t figure out why, my Broadlink Commands aren’t working anymore?
Configuration Yaml:

switch:
  - platform: broadlink
    host: 192.168.1.142
    mac: 'XX:XX:XX:XX:XX:XX'
    timeout: 15

cover:
  - platform: template
    covers:
      b_b3_1:
        friendly_name: "Bedroom 3.1"
        position_template: "50"
        device_class: "shade"
        open_cover:
          service: broadlink.send
          data:
            host: 192.168.1.142
            packet:
              - "data that worked previously"
        close_cover:
          service: broadlink.send
          data:
            host: 192.168.1.142
            packet:
              - "data that worked previously"
        stop_cover:
          service: broadlink.send
          data:
            host: 192.168.1.142
            packet:
              - "data that worked previously"

Causes Error:

Failed to call service cover/open_cover. Unable to find service broadlink/send

Alternative Configuration Yaml I have tried:

      b_b1_0:
        friendly_name: "Bedroom 1"
        position_template: "50"
        open_cover:
          service: remote.send_command
          data:
            host: 192.168.1.142
            packet:
              - "data that worked previously"

Causes Error:

Failed to call service cover/open_cover. extra keys not allowed @ data[‘host’]

HA Logs:

020-07-12 22:30:56 WARNING (MainThread) [homeassistant.components.remote] Platform broadlink not ready yet. Retrying in 180 seconds.
2020-07-12 22:31:36 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform broadlink is taking over 10 seconds.
2020-07-12 22:31:41 WARNING (MainThread) [homeassistant.components.switch] Platform broadlink not ready yet. Retrying in 180 seconds.
2020-07-12 22:32:52 ERROR (MainThread) [homeassistant.helpers.script] Error executing script. Service not found for call_service at pos 1: Unable to find service broadlink/send
2020-07-12 22:32:54 ERROR (MainThread) [homeassistant.helpers.script] Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['host']
2020-07-12 22:32:54 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1683226960] extra keys not allowed @ data['host']
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1295, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 595, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/template/cover.py", line 318, in async_open_cover
    await self._open_script.async_run(context=self._context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 831, in async_run
    await run.async_run()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 555, in async_run
    await self._async_run()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 572, in _async_run
    await self._async_step(log_exceptions=not propagate_exceptions)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 153, in _async_step
    self, f"_async_{cv.determine_script_action(self._action)}_step"
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 656, in _async_call_service_step
    *self._prep_call_service_step(), blocking=True, context=self._context
  File "/usr/src/homeassistant/homeassistant/core.py", line 1222, in async_call
    processed_data = handler.schema(service_data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 208, in __call__
    return self._exec((Schema(val) for val in self.validators), v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 287, in _exec
    raise e if self.msg is None else AllInvalid(self.msg, path=path)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/validators.py", line 283, in _exec
    v = func(v)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
    return schema(data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 272, in __call__
    return self._compiled([], data)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
    return base_validate(path, iteritems(data), out)
  File "/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
    raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: extra keys not allowed @ data['host']
2020-07-12 22:32:57 ERROR (MainThread) [homeassistant.helpers.script] Error executing script. Service not found for call_service at pos 1: Unable to find service broadlink/send

FYI: Restarting the router seems to have fixed it. Strange getting that error though!

Glad you got it fixed. For me if ever I have issues with Broadlink, I normally check in node-red. If I can send/receive from that, usually it means HA has fallen over. If i can’t even get through to the broadlink via NR (extremely rare) it’s usually because the cleaner has unplugged it, or it’s dropped off the wifi for one reason or another.