smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.02k stars 995 forks source link

Unable to find service broadlink/send, devices working, config good. #448

Closed morbidpete closed 4 years ago

morbidpete commented 4 years ago

Home Assistant version Home Assistant 0.114.0 Supervisor Version 231 Latest version 231 Channel beta

Hostname docker System Ubuntu 18.04.5 LTS Docker version 19.03.12

SmartIR version 1.12.0 SmartIR configuration


switch:
#livingroom
  - platform: broadlink
    host: 192.168.1.53
    mac: 24:DF:A7:E4:67:1F
    type: rm4_pro
#masterbedroom
  - platform: broadlink
    host: 192.168.1.128
    mac: 24:df:a7:e4:6b:48
    type: rm4_pro

Describe the bug

Working fine 2 days ago. Rebooted docker. Still would not work. Checked logs. Issue with calling broadlink.send service. Checked services and broadlink not showing. SmartIR services listed. Able to ping both RM devices. Devices not added to app. App not even installed so coudnt be added.

Debug log


Log Details (ERROR)
Logger: custom_components.smartir.climate
Source: core.py:1258
Integration: SmartIR (documentation)
First occurred: 11:11:03 AM (2 occurrences)
Last logged: 11:11:04 AM

Unable to find service broadlink/send
Traceback (most recent call last):
  File "/config/custom_components/smartir/climate.py", line 330, in send_command
    await self._controller.send(self._commands['off'])
  File "/config/custom_components/smartir/controller.py", line 92, in send
    await self.hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1258, in async_call
    raise ServiceNotFound(domain, service) from None
homeassistant.exceptions.ServiceNotFound: Unable to find service broadlink/send

Additional context

Upgraded to beta channel as a last ditch effort. No change.

morbidpete commented 4 years ago

Found the problem.

Had 2 switch sections so HA was only reading the switch info from the second switch area. Mistake. After adding all the platforms under 1 switch command. Everything is working again.

switch:
#livingroom  
  - platform: broadlink
    host: 192.168.1.53
    mac: 24:DF:A7:E4:67:1F
    type: rm4_pro
#masterbedroom
  - platform: broadlink
    host: 192.168.1.128
    mac: 24:df:a7:e4:6b:48
    type: rm4_pro
switch:
#garagedoor
  - platform: momentary
    name: Garage Door
    mode: on
    toggle_for: 1
    cancellable: True

to

switch:
#livingroom  
  - platform: broadlink
    host: 192.168.1.53
    mac: 24:DF:A7:E4:67:1F
    type: rm4_pro
#masterbedroom
  - platform: broadlink
    host: 192.168.1.128
    mac: 24:df:a7:e4:6b:48
    type: rm4_pro
#garagedoor
  - platform: momentary
    name: Garage Door
    mode: on
    toggle_for: 1
    cancellable: True