Integrating Switchbot S1 #90
Unanswered
1technophile
asked this question in
New devices/things integration
Replies: 1 comment 10 replies
-
Hi @1technophile with just having created a test decoder for also with getting not yet available binary bit data form multiple OR hex index evaluations, wouldn't this also be possible here, especially as it looks like that the SWITCHBOT-S1 has a lot less states to check ;) Not really as a permanent solution for necessarily merging into the release, as I also don't see that for the Govee H5055 decoder in the test state, but for checking and testing the functionality for these devices until a nicer solution is available. Thanks |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As a prior work to the integration of Switchbot into OMG I would like to integrate the broadcast reading of switch bot actuator, I have found this doc:
https://github.com/OpenWonderLabs/python-host/wiki/Bot-BLE-open-API#broadcast-message-format
By the way I salute the fact that SwitchBot publish its BLE API and message format 👏
From it, we can easily identify the device type with the corresponding servicedata first byte.
Nevertheless, the other data are available in binary format, so we would need to target a byte convert it to binary, target one or several bit of this binary to compare it with some reference.
Example:
48d0db
2 = byte position in the servicedata (counted in char)
6 or 7 = bit position
"0" or "1" = position to check
For the battery, we may need also to extract a part of the bits and convert those to decimal, here is some bytes 2 examples:
Example:
4 = byte position in the servicedata (counted in char)
0 = start bit to extract
7 = number of bits to extract
48d0db
->
db
-> 1011011
-> 91
@h2zero any thoughts about adding this kind of functions, other proposals are welcome?
Beta Was this translation helpful? Give feedback.
All reactions