Add support for the FastCon technology - #669
Conversation
How to testBuild the environmentLinuxWIndowsRun the codepython3The Python Interpreter is open. Let's write some code and check the response. >>>importbroadlinkasblk>>>device=blk.hello("192.168.0.16") # Example IP address>>>device.auth()
>>>subdevices=device.get_subdevices()
>>>did=subdevices[0].get("did")
>>>device.get_state(did)
>>>device.set_state(did, pwr=1)
>>>device.set_state(did, pwr=0) |
OMVMMG
commented
Mar 22, 2022
Hi @felipediel , |
felipediel
commented
Mar 22, 2022
Thank you! I forgot to mention, you need to have a sub-device connected to the device to test. |
OMVMMG
commented
Mar 23, 2022
I have 2 devices and one of them must be connecting as a sub-device as it doesn't respond to ping but I can control it thorugh Home Assistant and the Broadlink app, which woulod indicate it's part of the FastCon mesh. However, in the Broadlink app it doesn't specifically appear as a sub-device. |
@OMVMMG what type of sub devices do you have? If you would like to test with: Instructions here: https://community.home-assistant.io/t/broadlink-s3-hub-support/319832/18?u=stevendodd Noticed you are potentially using an SP4 device .. I'm not sure how that works but you might just be able to add the device ID into the Python library under an S3 hub for testing |
felipediel
commented
Mar 23, 2022
If you can control it with Home Assistant, it's not a subdevice, we don't support this feature yet. |
OMVMMG
commented
Mar 24, 2022
If you can control it with Home Assistant, it's not a subdevice, we don't support this feature yet. I can control one of them, as soon as I integrate the second device I lose control of the other. |
stevendodd
commented
Mar 24, 2022
Are you using the process I described to create a Docker image? |
ovionlogis
commented
Mar 24, 2022
@felipediel hi state= {"count": step, "index": index}
print(state) # {'count': 5, 'index': 0}packet=self._encode(14, state)
print(packet) # bytearray(b'!\x00\xa5\xa5ZZ\xa1\xc7\x0e\x0b\x15\x00\x00\x00{"count":5,"index":0}')resp=self.send_packet(0x6A, packet)
print(resp) # b'Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>\xe9\x00\x00\x8ba\xee\x03m\x94e8\x00\xb0C\xa0\x01\x00\x00\x00\x96\xcf\x00\x00\xfe\x10X\x995\xd2\xbcp\xe7\xe9\x8b\x1b\xc2\x95F\xd9\xec3\x07\x11\xe5\xf2\xc2\x93\x7fn \x02(\xb1\x1d@AM\x8c\xe7\xbf\x82\xf5h\x85heZ\xaa\xdd\x9b\x92^\x9dB5\xb7\xaf\x18\xddu\xa6\xb7Ez\x843E'e.check_error(resp[0x22:0x24])
resp=self._decode(resp)
print(resp) # {'status': 0, 'total': 0, 'index': 0, 'list': []}Is there anything else I can help? |
felipediel
commented
Mar 25, 2022
Thank you! Maybe the communication is a bit different. I will do some research. If anyone can make it work, please let me know. |
felipediel
commented
Apr 5, 2022
We are making progress here: home-assistant/core/pull/69338. Everyone with subdevices is welcome to help capture and decode this packet: importsocketdefdiscover(ip_addr):
conn=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
conn.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
conn.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
conn.settimeout(10)
packet=bytearray(0x30)
packet[0x26] =6checksum=sum(packet, 0xBEAF) &0xFFFFpacket[0x20:0x22] =checksum.to_bytes(2, "little")
conn.sendto(packet, (ip_addr, 80))
resp=conn.recvfrom(1024)
conn.close()
returnrespresp=discover("192.168.0.16") # Example device IP addressprint(resp)
unknown_bytes=resp[0x80:]
print(unknown_bytes)So the mission is to capture and understand the unknown bytes. This part of the packet contains the MAC address and product id (2 bytes) of the subdevices. |
stevendodd
commented
Apr 6, 2022
@felipediel are you wanting someone to try and connect directly to a sub device? I don't think that's possible; I have to talk via the hub. The hub then sends UDP traffic to each sub device via a broadcast message. |
felipediel
commented
Apr 6, 2022
No, it's via hub, the devices can work as hubs too. They have subdevices that can be discovered with the function above. |
192.168.1.99 = S3 Hub
|
TanTrungNguyen
commented
Apr 10, 2023
Would it help if we specify the DID (device unique identifier) in the integration? We can get the DID from Device Info from the Broadlink App. |

Proposed change
Add support for the FastCon technology. SP4 devices can now communicate with sub-devices.
Credits
@stevendodd helped us integrate the S3 hub recently. It's the same protocol.
Type of change
Additional information
Checklist