It should work if this device is sub device of s3 hub
Thanks @mnayef95
Done it with AppDaemon by manually copying the files.
The issue I know have is that the automation does not trigger this either as a light or a switch.
I can switch it on and off but not working through the following automation:
alias: New Automation test
description: ââ
trigger:
- type: opened
platform: device
device_id: c9bc6835f2feddfadb9cd19d4a253363
entity_id: binary_sensor.garage_door
domain: binary_sensor
condition: []
action: - service: switch.turn_on
target:
entity_id: switch.garage_light
mode: single
Whatâs the device you are using?
Can you paste the app daemon log?
2022-05-12 23:29:19.050575 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:20.052199 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:21.050123 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:22.053035 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:23.048478 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:24.063889 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:25.056932 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:26.056293 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:27.060665 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:28.073464 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:29.063526 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:30.057061 INFO broadlink_s3_hub: Device pwr value is: â0â
2022-05-12 23:29:31.052216 INFO broadlink_s3_hub: Device pwr value is: â0â
What about apps.yaml?
broadlink_s3_hub:
module: broadlink_s3_hub
class: BroadlinkS3Hub
friendly_name: âGarage lightâ
hub_ip: â192.168.5.143â
entity_id: âswitch.garage_lightâ
did: â00000000000000000000a043b084b503â
scan_interval: 1
gang: 1
The code is updated, please update your code, per in mind the changes to the config, now the entity_id
is accepting an array not a string, the same happens with the friendly_name
, Please let me know if itâs worked for you
works perfectly now! Thanks for this.
Slight issue (not really bothered) it takes a couple of seconds to switch off light in the automation. Switching on is instant.
Thanks once more for your work.
Actually the delay issue had to do with my connection - so everything looks good.
Hi! no entity is created when I put the settings
initialize_error
{
âmoduleâ: âbroadlink_s3_hubâ,
âclassâ: âBroadlinkS3Hubâ,
âhub_ipâ: â192.168.1.209â,
âdidâ: â00000000000000000000a043b0d059acâ,
âscan_intervalâ: 0.5,
âfriendly_namesâ: [
âBalcony Lightâ
],
âentity_idâ: [
âlight.balcony_app_demon_lightâ
]
}
Can you share the app daemon logs?
sure.
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executingâŚ
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] appdaemon.sh: executingâŚ
[cont-init.d] appdaemon.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[07:00:18] INFO: Starting AppDaemonâŚ
2022-05-13 13:00:19.131330 INFO AppDaemon: AppDaemon Version 4.2.1 starting
2022-05-13 13:00:19.131505 INFO AppDaemon: Python version is 3.9.7
2022-05-13 13:00:19.131679 INFO AppDaemon: Configuration read from: /config/appdaemon/appdaemon.yaml
2022-05-13 13:00:19.131848 INFO AppDaemon: Added log: AppDaemon
2022-05-13 13:00:19.132024 INFO AppDaemon: Added log: Error
2022-05-13 13:00:19.132175 INFO AppDaemon: Added log: Access
2022-05-13 13:00:19.132325 INFO AppDaemon: Added log: Diag
2022-05-13 13:00:19.148289 INFO AppDaemon: Loading Plugin HASS using class HassPlugin from module hassplugin
2022-05-13 13:00:19.176091 INFO HASS: HASS Plugin Initializing
2022-05-13 13:00:19.176319 INFO HASS: HASS Plugin initialization complete
2022-05-13 13:00:19.176715 INFO AppDaemon: Initializing HTTP
2022-05-13 13:00:19.177018 INFO AppDaemon: Using âwsâ for event stream
2022-05-13 13:00:19.180090 INFO AppDaemon: Starting API
2022-05-13 13:00:19.182805 INFO AppDaemon: Starting Admin Interface
2022-05-13 13:00:19.183145 INFO AppDaemon: Starting Dashboards
2022-05-13 13:00:19.199735 INFO HASS: Connected to Home Assistant 2022.5.4
2022-05-13 13:00:19.214276 INFO AppDaemon: App âbroadlink_s3_hubâ added
2022-05-13 13:00:19.215091 INFO AppDaemon: Found 1 total apps
2022-05-13 13:00:19.215531 INFO AppDaemon: Starting Apps with 1 workers and 1 pins
2022-05-13 13:00:19.216211 INFO AppDaemon: Running on port 5050
2022-05-13 13:00:19.281558 INFO HASS: Evaluating startup conditions
2022-05-13 13:00:19.295352 INFO HASS: Startup condition met: hass state=RUNNING
2022-05-13 13:00:19.295602 INFO HASS: All startup conditions met
2022-05-13 13:00:19.319553 INFO AppDaemon: Got initial state from namespace default
2022-05-13 13:00:21.223144 INFO AppDaemon: Scheduler running in realtime
2022-05-13 13:00:21.227355 INFO AppDaemon: Adding /config/appdaemon/apps to module import path
2022-05-13 13:00:21.228086 INFO AppDaemon: Adding /config/appdaemon/apps/broadlink to module import path
2022-05-13 13:00:21.247964 INFO AppDaemon: Loading App Module: /config/appdaemon/apps/broadlink_s3_hub.py
2022-05-13 13:00:21.316803 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/helpers.py - ignoring
2022-05-13 13:00:21.318229 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/switch.py - ignoring
2022-05-13 13:00:21.319535 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/light.py - ignoring
2022-05-13 13:00:21.320845 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/sensor.py - ignoring
2022-05-13 13:00:21.322136 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/remote.py - ignoring
2022-05-13 13:00:21.323408 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/init.py - ignoring
2022-05-13 13:00:21.324661 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/climate.py - ignoring
2022-05-13 13:00:21.325939 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/alarm.py - ignoring
2022-05-13 13:00:21.327406 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/const.py - ignoring
2022-05-13 13:00:21.328889 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/cover.py - ignoring
2022-05-13 13:00:21.330429 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/device.py - ignoring
2022-05-13 13:00:21.331859 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/exceptions.py - ignoring
2022-05-13 13:00:21.333335 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/protocol.py - ignoring
2022-05-13 13:00:21.334824 WARNING AppDaemon: No app description found for: /config/appdaemon/apps/broadlink/hub.py - ignoring
2022-05-13 13:00:21.336056 INFO AppDaemon: Initializing app broadlink_s3_hub using class BroadlinkS3Hub from module broadlink_s3_hub
2022-05-13 13:00:21.340906 WARNING broadlink_s3_hub: ------------------------------------------------------------
2022-05-13 13:00:21.341433 WARNING broadlink_s3_hub: Unexpected error running initialize() for broadlink_s3_hub
2022-05-13 13:00:21.341899 WARNING broadlink_s3_hub: ------------------------------------------------------------
2022-05-13 13:00:21.345176 WARNING broadlink_s3_hub: Traceback (most recent call last):
File â/usr/lib/python3.9/site-packages/appdaemon/app_management.pyâ, line 165, in initialize_app
await utils.run_in_executor(self, init)
File â/usr/lib/python3.9/site-packages/appdaemon/utils.pyâ, line 337, in run_in_executor
response = future.result()
File â/usr/lib/python3.9/concurrent/futures/thread.pyâ, line 52, in run
result = self.fn(*self.args, **self.kwargs)
File â/config/appdaemon/apps/broadlink_s3_hub.pyâ, line 13, in initialize
self.gang = self.args[âgangâ]
KeyError: âgangâ
2022-05-13 13:00:21.345736 WARNING broadlink_s3_hub: ------------------------------------------------------------
2022-05-13 13:00:21.347466 INFO AppDaemon: App initialization complete
Your config file is updated, but the code is not updated
How do I update the code? (sorry for all the problems )
I tried re downloading from hack and moving the files directly
You can update it through hcas, or go to /config/appdaemon/apps/broadlink-s3-hub-app-daemon/broadlink_s3_hub.py
and update the code with the code on github
Thank you so much for building this, makes a simple switch much better with HA!
Got it working yesterday but canât work out what config I need to input to tell it to expect 3-gangs, I wondered if maybe that isnât supported? Thanks again