You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi it will log an error message here and since the accessory never receives a value for temperature and humidity it will be marked as unreachable in the Home App.
also, does this plugin offer any more functionality than the already verified switchbot plugins?
It might be worth a note in your readme about how your plugin is different.
Whilst there is no official plugin verification rule against multiple plugins with the same functionality, I think it would be helpful for users who are looking for their right plugin to see (e.g. in your readme) how yours is different from the others
When trying to get the sensor to work on my Raspberry Pi 4 with Docker, I kept getting the error adapter is not ready: unknown, while other (non switchbot) BLE devices in the setup worked fine. Tracking down the error, I found that the node-switchbot library used by the other plugins was causing the error. Looking into creating a PR for node-switchbot, I found that it is easier to create a new plugin from scratch that only handles the device in question and does not rely on dependencies (besides noble).
So, unlike the other alternatives, my package is written according to the philosophy of doing only one thing but doing it well and having as few dependencies as reasonably possible. I tried to hint towards this in the README, if you have a suggestion on how to better communicate this to other users I will be happy to adjust the README accordingly.
After some communication with the creator of the other plugin, I looked at the problem again.
The node-switchbot package indeed has a BLE initialisation that is not compatible with my (and others Docker based) setup. Furthermore, and this is what made the troubleshooting so confusing, there is no support in node-switchbot at all for the sensor in question and additionally a wrong identifier used in the homebridge-switchbot plugin.
I have created corresponding PRs in both repos. Nevertheless, I will keep using my plugin due to its few dependencies and the concise code. For all those who also only use the hygrometers from Switchbot, it might be a lightweight alternative.
One more small thing, after installing the plugin and configuring an accessory with the ble address of a thermometer sensor with a different brand (yes, I wasn't expecting to work!) but it does throw homebridge into a crash loop:
[03/09/2023, 14:16:17] [Hygrometer] Restarting Process...
[03/09/2023, 14:16:19] [Hygrometer] Launched child bridge with PID 11611
[03/09/2023, 14:16:19] Registering accessory 'homebridge-switchbot-sensor-ble.SwitchBotSensorBLE'
[03/09/2023, 14:16:19] [Hygrometer] Loaded homebridge-switchbot-sensor-ble v1.3.2 child bridge successfully
[03/09/2023, 14:16:19] Loaded 0 cached accessories from cachedAccessories.0E7C2D126D68.
[03/09/2023, 14:16:19] [Hygrometer] SwitchBotSensorBLE finished initializing!
[03/09/2023, 14:16:19] Homebridge v2.0.0-beta.1 (HAP v1.0.0-beta.8) (Hygrometer) is running on port 44449.
TypeError: Cannot read properties of undefined (reading '10')
at SwitchBotSensorBLE.updateFromAdvertisement (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/src/accessory.ts:86:13)
at Noble.<anonymous> (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/src/accessory.ts:72:12)
at Noble.emit (node:events:514:28)
at Noble.onDiscover (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/noble.js:218:10)
at NobleBindings.emit (node:events:514:28)
at NobleBindings.onDiscover (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:213:10)
at Gap.emit (node:events:514:28)
at Gap.onHciLeAdvertisingReport (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/gap.js:175:10)
at Hci.emit (node:events:514:28)
at Hci.processLeAdvertisingReport (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/hci.js:1148:12)
[03/09/2023, 14:16:22] [Hygrometer] Child bridge process ended
[03/09/2023, 14:16:22] [Hygrometer] Process Ended. Code: 1, Signal: null
[03/09/2023, 14:16:29] [Hygrometer] Restarting Process...
[03/09/2023, 14:16:30] [Hygrometer] Launched child bridge with PID 11626
[03/09/2023, 14:16:30] Registering accessory 'homebridge-switchbot-sensor-ble.SwitchBotSensorBLE'
[03/09/2023, 14:16:30] [Hygrometer] Loaded homebridge-switchbot-sensor-ble v1.3.2 child bridge successfully
[03/09/2023, 14:16:30] Loaded 0 cached accessories from cachedAccessories.0E7C2D126D68.
[03/09/2023, 14:16:31] [Hygrometer] SwitchBotSensorBLE finished initializing!
[03/09/2023, 14:16:31] Homebridge v2.0.0-beta.1 (HAP v1.0.0-beta.8) (Hygrometer) is running on port 44449.
TypeError: Cannot read properties of undefined (reading 'data')
at SwitchBotSensorBLE.updateFromAdvertisement (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/src/accessory.ts:91:38)
at Noble.<anonymous> (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/src/accessory.ts:72:12)
at Noble.emit (node:events:514:28)
at Noble.onDiscover (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/noble.js:218:10)
at NobleBindings.emit (node:events:514:28)
at NobleBindings.onDiscover (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:213:10)
at Gap.emit (node:events:514:28)
at Gap.onHciLeAdvertisingReport (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/gap.js:175:10)
at Hci.emit (node:events:514:28)
at Hci.processLeAdvertisingReport (/usr/local/lib/node_modules/homebridge-switchbot-sensor-ble/node_modules/@abandonware/noble/lib/hci-socket/hci.js:1148:12)
[03/09/2023, 14:16:31] [Hygrometer] Child bridge process ended
[03/09/2023, 14:16:31] [Hygrometer] Process Ended. Code: 1, Signal: null
Yeah sorry about this i just happened to be going through closed issues and saw yours and remembered it hadn’t been verified.
Must have just closed by mistake so apologies.
Will have a look through the checklist a bit later 👍🏻
If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.
Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!
Activity
github-actions commentedon Sep 1, 2023
The following pre-checks failed:
❌ Failed to import plugin: EAFNOSUPPORT, Address family not supported by protocol
Comment
/checkto run checks again.moritzmhmk commentedon Sep 1, 2023
/check
github-actions commentedon Sep 1, 2023
✅ Pre-checks completed successfully.
bwp91 commentedon Sep 1, 2023
Hi @moritzmhmk
How does your plugin handle cases where
abandonware/noblehas not been able to install - does the plugin properly catch the error in this case?moritzmhmk commentedon Sep 1, 2023
Hi it will log an error message here and since the accessory never receives a value for temperature and humidity it will be marked as unreachable in the Home App.
bwp91 commentedon Sep 1, 2023
alrighty thank you for confirming.
also, does this plugin offer any more functionality than the already verified switchbot plugins?

It might be worth a note in your readme about how your plugin is different.
Whilst there is no official plugin verification rule against multiple plugins with the same functionality, I think it would be helpful for users who are looking for their right plugin to see (e.g. in your readme) how yours is different from the others
moritzmhmk commentedon Sep 2, 2023
When trying to get the sensor to work on my Raspberry Pi 4 with Docker, I kept getting the error
adapter is not ready: unknown, while other (non switchbot) BLE devices in the setup worked fine. Tracking down the error, I found that thenode-switchbotlibrary used by the other plugins was causing the error. Looking into creating a PR fornode-switchbot, I found that it is easier to create a new plugin from scratch that only handles the device in question and does not rely on dependencies (besidesnoble).So, unlike the other alternatives, my package is written according to the philosophy of doing only one thing but doing it well and having as few dependencies as reasonably possible. I tried to hint towards this in the README, if you have a suggestion on how to better communicate this to other users I will be happy to adjust the README accordingly.
moritzmhmk commentedon Sep 2, 2023
I updated the README.
moritzmhmk commentedon Sep 2, 2023
After some communication with the creator of the other plugin, I looked at the problem again.
The
node-switchbotpackage indeed has a BLE initialisation that is not compatible with my (and others Docker based) setup. Furthermore, and this is what made the troubleshooting so confusing, there is no support innode-switchbotat all for the sensor in question and additionally a wrong identifier used in thehomebridge-switchbotplugin.I have created corresponding PRs in both repos. Nevertheless, I will keep using my plugin due to its few dependencies and the concise code. For all those who also only use the hygrometers from Switchbot, it might be a lightweight alternative.
bwp91 commentedon Sep 3, 2023
One more small thing, after installing the plugin and configuring an accessory with the ble address of a thermometer sensor with a different brand (yes, I wasn't expecting to work!) but it does throw homebridge into a crash loop:
moritzmhmk commentedon Sep 3, 2023
Thanks for the feedback, this is now fixed in v1.3.3.
4 remaining items
bwp91 commentedon Sep 13, 2023
@moritzmhmk apologies i must have closed this accidentally
moritzmhmk commentedon Sep 15, 2023
I wondered if closing the issue meant that verification was about to happen 😅
Is there anything left that needs to be addressed code-wise?
bwp91 commentedon Sep 15, 2023
Yeah sorry about this i just happened to be going through closed issues and saw yours and remembered it hadn’t been verified.
Must have just closed by mistake so apologies.
Will have a look through the checklist a bit later 👍🏻
bwp91 commentedon Sep 21, 2023
/check
github-actions commentedon Sep 21, 2023
✅ Pre-checks completed successfully.
github-actions commentedon Sep 21, 2023
Everything Looks Good!
github-actions commentedon Sep 21, 2023
Congratulations! Your plugin has been verified.
You can now add the Verified by Homebridge badge to your plugin's README:
Your plugin is now also eligible to display a ❤️ Donate button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.
If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.
Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!
Thank you for your contribution to the Homebridge Community.
https://homebridge.io
bwp91 commentedon Sep 21, 2023
sorry for the confusion in the interim re accidentally closing the issue
nice 👍
moritzmhmk commentedon Sep 24, 2023
Thank you - I just added the badge in the Readme 🙂