Broadlink S1C Alarm Kit Custom Sensor Component

Have already said to you need to assign a fixed ip going to router configuration . Assign a specific ip to a specific mac address

i ’ m already doing this, what part of “my s1c connect with a random MAC address“ you didn’t get it? how i am supposed to EVERY time a random mac appears jump into my router, assign a ip address to it, and get back into HA config and set this new IP/MAC? Its just not reliable.

Check the mac address of your S1C Alarm from e-control app. Use that mac address to specific ip address from your router. The mac address won’t changed.

Mac address not changing . Maybe you are confused, you are not configurig sc1 mac but different item in the same network, scroll left in e-remote you see sc1 mac and set this to a specific ip, restart your router after this

Yes, i did that, however, sometimes it connects to my network with a different mac address than what is shown is the app but all finishing with 8e:d7:56 , i double checked that. I dont know what else i can do to solve this.

do you use a wifi repeater?

Yes i use, i just blocked the device on the repeater so it can only connect to main router that have the mac address rule, let’s see if the static ip and mac persists. Thanks for the tip.

this is why you have 2 different mac address , in your lan you have a different mac address from original s1c so not working, in the past I had same problem , I used a powerlan and a secondary router set as access point thAt not change the real mac address. Anyway you can try this in your configuration and see if work:

master router set mac address S1C (on repeater, not real) and fix ip for this mac address example 192.168.1.33
on repeater real mac address s1c like you read on e-control and set fix ip like 192.168.1.33 same ip
on .yaml configuration set S1c mac address (given by repeater) and 192.168.1.33
so everytime you connect given always same ip and search for this mac address
I don’t know if work but at this time is the only thing you can test before change your repeater and use an access point

Actually my S1C unit is next to the main router so no need to connect to AP repeater, i blacklisted real S1C mac address on the repeater so it will never connect to it again and stay connected to main router which have the static ip rule for the mac address that is shown in the app. Since that, the mac and ip stays the same and i don’t need to configure it in HA *.yaml every time like before. I still can’t get the movement sensor info to show in HA dashboard, it says “unknown”, only keyfob and door, but that is another issue :grin:

Well if you can Connect direct to router is very easy to do , like you do well done :+1:t2:

Hello, It works for some hours, sending notifications, and then it stop working, I restart homme assistant, and working again for some hours.

Any idea?

Regards

1 Like

same problem, works for 5/6 hours and after Home assistant don’t detect any canghes in sensor status ,I use HA 0.78.3 and the last Kit custom sensor posted. Need new upgrade ?!
Please TomerFi fix this new bug if you can.

Hello, try using timeout parameter:

  • platform: broadlink_s1c
    ip_address: 192.168.2.x
    mac: ‘xx:xx:xx:xx:xx:xx’
    timeout: 10

It seem that it’s working…

1 Like

ok, I’m testing this solution, thanks

TESTED: seem it works fine now. Thanks again

Sorry, I haven’t been here for a while and didn’t see any of the last 21 messages.
I hope everything is working well now, I still use this component so it there is anything I can try and help with…

Maybe a more stable version will be in future? When your custom plug-in will be native integreted in HA?

1 Like

Hello, i’m having trouble with getting the motion sensor to appear in HA, i’m using the latest version on a Raspberry Pi 3. It is working for anyone? For me its always “Unknown” status, key fob and door is working OK. only motion is broken for me.

I activated the logger component for this custom sensor and the message is the following:

2019-01-05 16:55:52 DEBUG (Thread-17) [custom_components.sensor.broadlink_s1c] unknow status 80for type Motion Sensor
2019-01-05 16:55:52 DEBUG (Thread-17) [custom_components.sensor.broadlink_s1c] status change tracked from: {"serial": "2102bbd7", "name": "motion", "type": "Motion Sensor", "status": 80, "order": 3}
2019-01-05 16:55:52 DEBUG (Thread-17) [custom_components.sensor.broadlink_s1c] status change tracked to: {"serial": "2102bbd7", "name": "motion", "type": "Motion Sensor", "status": 0, "order": 3}
2019-01-05 16:55:52 DEBUG (Thread-17) [custom_components.sensor.broadlink_s1c] launching event for motionfor state changed to no_motion
2019-01-05 16:55:52 DEBUG (MainThread) [custom_components.sensor.broadlink_s1c] motion received BROADLINK_S1C_SENSOR_UPDATE
2019-01-05 16:56:47 WARNING (Thread-17) [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 259, 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

I just edited the broadlink_s1c.py file and added status 80 to “MOTION DETECTED” and it started working since is the code my alarm sends when it captures motion, but i don’t know if this is the right way to do it. Hope it helps someone.

80??
That’s weird… I never ran into status code 80.
I have one motion sensor and it never worked for me, I figured it’s a device issue, I can’t recall why…
I’ll try it out myself, maybe it’ll make stuff happen for my motion sensor hehe.

But, I don’t believe the message you are receiving has anything to do with the motion sensor, looks like a network issue.
You are not the only one to have witness that lately, I remember seeing a couple of other posts or issues on my GitHub regarding the same message.

I think there is a connections issue on the S1 hub side but I can’t know for sure.
Maybe try resetting you hub/ha/router and see if it doe’s you any good…

Yes, the timeout is unrelated to the motion sensor, but that isn’t really a problem for me. After the change of the received codes in the script, i now have all sensors working properly, key fob, door and motion. My guess is that broadlink changed the codes for some sensors for some revisions of the Alarm Kit.

I’ll have a further look in the script to see if i find something that may be causing the timeout.

1 Like

Hi having this error on hassio 0.88

2019-02-27 23:06:34 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py”, line 418, in start
resp = await task
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_app.py”, line 458, in _handle
resp = await handler(request)
File “/usr/local/lib/python3.6/site-packages/aiohttp/web_middlewares.py”, line 119, in impl
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/real_ip.py”, line 34, in real_ip_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/ban.py”, line 67, in ban_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/auth.py”, line 99, in auth_middleware
return await handler(request)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/http/view.py”, line 118, in handle
result = await result
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/config/core.py”, line 21, in post
errors = await async_check_ha_config_file(request.app[‘hass’])
File “/usr/local/lib/python3.6/site-packages/homeassistant/config.py”, line 812, in async_check_ha_config_file
check_ha_config_file, hass)
File “/usr/local/lib/python3.6/concurrent/futures/thread.py”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/scripts/check_config.py”, line 374, in check_ha_config_file
platform = loader.get_platform(hass, domain, p_name)
File “/usr/local/lib/python3.6/site-packages/homeassistant/loader.py”, line 66, in get_platform
domain=platform_name, platform=domain))
File “/usr/local/lib/python3.6/site-packages/homeassistant/loader.py”, line 117, in _load_file
module = importlib.import_module(path)
File “/usr/local/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 941, in _find_and_load_unlocked
File “”, line 219, in _call_with_frames_removed
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/broadlink_s1c/init.py”, line 7

^
SyntaxError: invalid syntax