Broadlink S1C Alarm Kit Custom Sensor Component

For those who lost all Broadlink switches since 0.67 and 0.68 didn’t fix it

If you get the error:

TypeError: init() takes 3 positional arguments but 4 were given

Just delete from config/deps/lib all the broadlink folders, and update the last version from Tomer’s repo

1 Like

Hi,
just an additional question about the status of these additional sensors. In fact, at the moment I’m able to get the status only from the key fob, but if I switch on the alarm from the original e-control broadlink app, the status on HA is not updated since the command, to switch on the alarm is not sent by the key fob. How can I get this changing in HA? Thanks

0.69.0 tested and working with S1 custom plugin

1 Like

So sorry, I didn’t use e-control

1 Like

after update to 0.69.1 this error

exception while getting sensors status: Traceback (most recent call last):
  File "/home/homeassistant/.homeassistant/custom_components/sensor/broadlink_s1c.py", line 259, in run
    current_status = self._hub.get_sensors_status()
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/broadlink/__init__.py", line 782, in get_sensors_status
    response = self.send_packet(0x6a, packet)
  File "/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/broadlink/__init__.py", line 305, in send_packet
    response = self.cs.recvfrom(2048)
socket.timeout: timed out

I can not install.
Here are the errors found when running hass.io:

2018-06-13 18:00:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/setup.py”, line 56, in async_setup_component
return await task
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/setup.py”, line 116, in _async_setup_component
conf_util.async_process_component_config(hass, config, domain)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/config.py”, line 679, in async_process_component_config
platform = get_platform(hass, domain, p_name)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/loader.py”, line 58, in get_platform
return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/homeassistant/loader.py”, line 86, in get_component
module = importlib.import_module(path)
File “/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 674, in exec_module
File “”, line 781, in get_code
File “”, line 741, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/Users/armandomuassabneto/.homeassistant/custom_components/sensor/broadlink_s1c.py”, line 7

^
SyntaxError: invalid syntax

What version of hassio are you running?

Same issue on 0.70.0

core-ssh:/config# hassio ha check
ERROR
Testing configuration at /config
ERROR:homeassistant.scripts.check_config:BURB
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py”, line 207, in check
res[‘components’] = check_ha_config_file(hass)
File “/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py”, line 372, in check_ha_config_file
platform = loader.get_platform(hass, domain, p_name)
File “/usr/lib/python3.6/site-packages/homeassistant/loader.py”, line 58, in get_platform
return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
File “/usr/lib/python3.6/site-packages/homeassistant/loader.py”, line 86, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 674, in exec_module
File “”, line 781, in get_code
File “”, line 741, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/sensor/broadlink_s1c.py”, line 7

^
SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (broadlink_s1c.py, line 7)
Failed config
General Errors:
- invalid syntax (broadlink_s1c.py, line 7)
Successful config (partial)

All is good with the

REQUIREMENTS =

modified inside the file.

version 0.72
now this error:

2018-06-25 20:53:12 ERROR (SyncWorker_7) [homeassistant.loader] Unable to find component sensor.broadlink_s1c
2018-06-25 20:54:04 ERROR (MainThread) [homeassistant.components.hassio] Testing configuration at /config
Failed config
General Errors:
- Platform not found: sensor.broadlink_s1c
Successful config (partial)

2018-06-25 20:56:34 ERROR (SyncWorker_8) [homeassistant.loader] Unable to find component sensor.broadlink_s1c
2018-06-25 20:56:37 ERROR (SyncWorker_17) [homeassistant.loader] Unable to find component sensor.broadlink_s1c
2018-06-25 21:00:46 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/speedtest.py”, line 1428, in get_best_server
fastest = sorted(results.keys())[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3.6/site-packages/homeassistant/components/sensor/speedtest.py”, line 173, in update
speed.get_best_server()
File “/usr/lib/python3.6/site-packages/speedtest.py”, line 1430, in get_best_server
raise SpeedtestBestServerFailure('Unable to connect to servers to ’
speedtest.SpeedtestBestServerFailure: Unable to connect to servers to test latency.
2018-06-25 21:03:54 ERROR (MainThread) [homeassistant.components.hassio] Testing configuration at /config
Failed config
General Errors:
- Platform not found: sensor.broadlink_s1c
Successful config (partial)

2018-06-25 21:32:25 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.iluminacao is taking over 10 seconds
2018-06-25 21:51:00 ERROR (MainThread) [homeassistant.components.hassio] Testing configuration at /config
Failed config
General Errors:
- Platform not found: sensor.broadlink_s1c
Successful config (partial)

In Hass.io version 0.72 this error:

Log Details (ERROR)
Wed Jun 27 2018 18:26:15 GMT-0300 (Horário Padrão de Brasília)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/components/discovery.py", line 163, in new_service_found
    hass, component, platform, info, config)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/discovery.py", line 160, in async_load_platform
    hass, component, hass_config)
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 45, in async_setup_component
    return await setup_tasks[domain]
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 56, in async_setup_component
    return await task
  File "/usr/lib/python3.6/site-packages/homeassistant/setup.py", line 116, in _async_setup_component
    conf_util.async_process_component_config(hass, config, domain)
  File "/usr/lib/python3.6/site-packages/homeassistant/config.py", line 673, in async_process_component_config
    platform = get_platform(hass, domain, p_name)
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 58, in get_platform
    return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
  File "/usr/lib/python3.6/site-packages/homeassistant/loader.py", line 86, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/config/custom_components/sensor/broadlink_s1c.py", line 7
   <!DOCTYPE html>

Hi guys, I have same error in hassio 0.72.1

Testing configuration at /config
ERROR:homeassistant.scripts.check_config:BURB
Traceback (most recent call last):
File “/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py”, line 207, in check
res[‘components’] = check_ha_config_file(hass)
File “/usr/lib/python3.6/site-packages/homeassistant/scripts/check_config.py”, line 372, in check_ha_config_file
platform = loader.get_platform(hass, domain, p_name)
File “/usr/lib/python3.6/site-packages/homeassistant/loader.py”, line 58, in get_platform
return get_component(hass, PLATFORM_FORMAT.format(domain, platform))
File “/usr/lib/python3.6/site-packages/homeassistant/loader.py”, line 86, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 994, in _gcd_import
File “”, line 971, in _find_and_load
File “”, line 955, in _find_and_load_unlocked
File “”, line 665, in _load_unlocked
File “”, line 674, in exec_module
File “”, line 781, in get_code
File “”, line 741, in source_to_code
File “”, line 219, in _call_with_frames_removed
File “/config/custom_components/sensor/broadlink_s1c.py”, line 7

^
SyntaxError: invalid syntax
Fatal error while loading config: invalid syntax (broadlink_s1c.py, line 7)
Failed config
General Errors:
- invalid syntax (broadlink_s1c.py, line 7)
Successful config (partial)

Running HA 0.73,0 on Hassbian - Pi 3b+
Using Broadlink S2 alarm kit with two windows and one movement sensor.

Initially everything works well, then after a couple of hours the status of the sensors do not update on HA
log file entries below:-

2018-06-12 17:20:11 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] starting platform setup
2018-06-12 17:20:12 INFO (MainThread) [custom_components.sensor.broadlink_s1c] succesfully connected to s1c hub
2018-06-12 17:20:12 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] Wall Motion Sensor initiated
2018-06-12 17:20:12 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] Key Fob initiated
2018-06-12 17:20:12 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] Door Sensor initiated
2018-06-12 17:20:12 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] window 1 initiated
2018-06-12 17:20:12 INFO (Thread-23) [custom_components.sensor.broadlink_s1c] starting sensors watch
2018-06-12 17:24:33 DEBUG (Thread-23) [custom_components.sensor.broadlink_s1c] status change tracked from: {“name”: “Wall Motion Sensor”, “type”: “Motion Sensor”, “serial”: “2102e9a2”, “order”: 1, “status”: 0}
2018-06-12 17:24:33 DEBUG (Thread-23) [custom_components.sensor.broadlink_s1c] status change tracked to: {“name”: “Wall Motion Sensor”, “type”: “Motion Sensor”, “serial”: “2102e9a2”, “order”: 1, “status”: 16}
2018-06-12 17:24:33 DEBUG (Thread-23) [custom_components.sensor.broadlink_s1c] launching event for Wall Motion Sensorfor state changed to motion_detected
.
.
2018-06-12 19:56:31 DEBUG (Thread-23) [custom_components.sensor.broadlink_s1c] launching event for Wall Motion Sensorfor state changed to no_motion
2018-06-12 19:56:31 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] Wall Motion Sensor received BROADLINK_S1C_SENSOR_UPDATE
2018-06-12 20:00:01 WARNING (Thread-23) [custom_components.sensor.broadlink_s1c] exception while getting sensors status: Traceback (most recent call last):
File “/home/homeassistant/.homeassistant/custom_components/sensor/broadlink_s1c.py”, line 254, in run
current_status = self._hub.get_sensors_status()
File “/srv/homeassistant/lib/python3.5/site-packages/broadlink/init.py”, line 782, in get_sensors_status
response = self.send_packet(0x6a, packet)
File “/srv/homeassistant/lib/python3.5/site-packages/broadlink/init.py”, line 305, in send_packet
response = self.cs.recvfrom(2048)
socket.timeout: timed out

2018-06-12 20:00:05 WARNING (Thread-23) [custom_components.sensor.broadlink_s1c] exception while getting sensors status: Traceback (most recent call last):
File “/home/homeassistant/.homeassistant/custom_components/sensor/broadlink_s1c.py”, line 254, in run
current_status = self._hub.get_sensors_status()
File “/srv/homeassistant/lib/python3.5/site-packages/broadlink/init.py”, line 782, in get_sensors_status
response = self.send_packet(0x6a, packet)
File “/srv/homeassistant/lib/python3.5/site-packages/broadlink/init.py”, line 303, in send_packet
self.cs.sendto(packet, self.host)
OSError: [Errno 101] Network is unreachable
.
.
2018-06-12 20:00:05 ERROR (Thread-23) [custom_components.sensor.broadlink_s1c] max exceptions allowed in watch loop exceeded, stoping watch loop
2018-06-12 20:00:05 INFO (Thread-23) [custom_components.sensor.broadlink_s1c] sensors watch done

Can anyone help?

Hi, i’ve successfully installed S1C Component in my HA setup, however, from time to time the MAC and IP Addresses from my S1C Alarm Kit changes randomly and i lose my configuration, is anyone else having this issue?

If you can set the ip of the s1c alarm kit from your router then the ip address will not change. But if you can’t fix the ip address then ip will be randomly change.

having the same issue…

not sure if this is being worked on by anyone, if I have time I’ll try to look over the code and see if I can fix it

I can set a static IP in my router by setting a MAC Address, however, the MAC randomly change as well, how you managed to solve this?

Mac address of the broadlink s1c never change. You can check the mac address of S1C from e-control. Then configure the fix ip address in your router.

@TomerFi is there a way to update the Key fob status via Rest API?
Thank you.

@Sunonline Well, mine does. Over the last 36 hours i had 3 different mac adresses, all finishing with 8e:d7:56 but the first 3 entries are changing, is there any way to config something like a range in HA configs?