Comments (25)
looks like the plugin never finished initialization. Is this the log in debug mode?
from homebridge-switchmate-switch.
No. Not debug. I set Debug to * and I'm not sure I can weed through that to pull out everything that needs to be pulled for privacy. Any way to guide me what to look for?
from homebridge-switchmate-switch.
you can turn on the debug mode(not setting debug environment variable) then copy all lines starting with [SwitchmateSwitch]
. you can mark anything that looks like a mac address to you.
from homebridge-switchmate-switch.
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39mInitializing SwitchmateSwitch platform...
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mFinished initializing platform�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mExecuted didFinishLaunching callback�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 5d23eeb4f6554650b9d98f6695a0a997 is not configured�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 33103bb138af4b03974c5abccaf75cdb is not configured�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 2408c374f2db426bad43b6ad34eb3010 is not configured�[39m
��[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 460bac18ea7844de8a6edc494e2f047b is not configured�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral b3983b47956648cdbd5e9a794cf91e81 is not configured�[39m
�[37m[12/29/2020, 10:50:52 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 17f673b4ac3e42428d03736c2a5f1d01 is not configured�[39m
�[37m[12/29/2020, 10:50:53 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral b329c7ed14644a4f83953e844bea93b0 is not configured�[39m
�[37m[12/29/2020, 10:50:53 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 241c9f36660c4ab0bb288e1f50638407 is not configured�[39m
�[37m[12/29/2020, 10:50:53 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral a4453abf79dc4bd1992561b2dbeef0a9 is not configured�[39m
�[37m[12/29/2020, 10:50:53 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 46737e251227465f994366c474af5c65 is not configured�[39m
�[37m[12/29/2020, 10:50:53 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 33437f4e699e402191e2ff88d4e6c858 is not configured�[39m
�[37m[12/29/2020, 10:50:54 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 65502d2d7c22452ebc758487cfaa3ee4 is not configured�[39m
�[37m[12/29/2020, 10:50:54 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 6529a4cee1024493ac5de8849eb72da6 is not configured�[39m
�[37m[12/29/2020, 10:50:55 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 5a91ab5cedf241c6ad1ed9413472bc88 is not configured�[39m
�[37m[12/29/2020, 10:50:55 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 7b5771be4f554b5bb7599d0338f1770b is not configured�[39m
�[37m[12/29/2020, 10:50:56 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral d807b6cb343d46de9e250a3c596b5688 is not configured�[39m
�[37m[12/29/2020, 10:50:57 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 29fc38c976164fb6bcec5c1bdefb8bd6 is not configured�[39m
�[37m[12/29/2020, 10:50:59 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 11949155a2ed4e8194f5b0765df5d2be is not configured�[39m
�[37m[12/29/2020, 10:50:59 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 040ba6b162d744df8448e2c2e4a73c6c is not configured�[39m
�[37m[12/29/2020, 10:51:03 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral d291606134a44897bda672d58df496bb is not configured�[39m
�[37m[12/29/2020, 10:51:03 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 3fd1f921e873433899b307602b7525a6 is not configured�[39m
�[37m[12/29/2020, 10:51:05 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 773a9038973b4116b06d3d7138a1ec59 is not configured�[39m
�[37m[12/29/2020, 10:51:11 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mperipheral 9824745086554d628011cf9421fee8e4 is not configured�[39m
from homebridge-switchmate-switch.
thanks. looks like it does discover some bluetooth devices but the mac addresses are not in a format that this plugin can understand. they should be something like 5f06d9e88cd2
.
Are you running homebridge on a pi?
from homebridge-switchmate-switch.
No. On a Mac. Maybe it’s not picking up the switch just being too far away?
from homebridge-switchmate-switch.
no. the plugin is looking for something like 5f06d9e88cd2
. Are you installing noble with homebrew?
Looking at their page I don't find anything regarding macOS yet it supports macOS link
from homebridge-switchmate-switch.
MacOS is at the top. It just says install Xcode which I verified I have installed. I’ll see if I can find more info down that path. Thanks for the help.
from homebridge-switchmate-switch.
Looking through the code examples though there are a bunch of notes regarding MacOS. Don’t know what may or may not apply to your code.
example: Note: isNotification event parameter value MAY be undefined depending on platform. The parameter is deprecated after version 1.8.1, and not supported on macOS High Sierra and later.
And
Note: On macOS, the address will be set to '' if the device has not been connected previously.
from homebridge-switchmate-switch.
that's why I'm not sure. There's nothing special regarding the usage of noble on macOS, yet it's outputing something different from linux/raspbian.
Note: On macOS, the address will be set to '' if the device has not been connected previously.
this doesn't matter to us since we're using the id
of the device not the address
from homebridge-switchmate-switch.
I'll try to see if I can find the problem on my macbook but I'm pretty busy this week so hopefully next week
from homebridge-switchmate-switch.
I'm going to move to Big Sur and update Xcode too, see if that helps.
from homebridge-switchmate-switch.
This is all I'm seeing now (I don't know that it's related to the updates).
�[37m[1/2/2021, 4:29:49 PM] �[39mLoaded plugin: [email protected] �[37m[1/2/2021, 4:29:49 PM] �[39mRegistering platform 'homebridge-switchmate-switch.SwitchmateSwitch' �[37m[1/2/2021, 4:29:49 PM] �[39mRegistering platform 'homebridge-switchmate-switch.SwitchmateSwitch' �[37m[1/2/2021, 4:29:49 PM] �[39m�[36m[SwitchmateSwitch] �[39mInitializing SwitchmateSwitch platform... �[37m[1/2/2021, 4:29:49 PM] �[39m�[36m[SwitchmateSwitch] �[39mInitializing SwitchmateSwitch platform... �[37m[1/2/2021, 4:29:49 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mFinished initializing platform�[39m �[37m[1/2/2021, 4:29:49 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mExecuted didFinishLaunching callback�[39m �[37m[1/2/2021, 4:29:49 PM] �[39m�[36m[SwitchmateSwitch] �[39m�[90mstart noble scanning�[39m
from homebridge-switchmate-switch.
hi @gonzonia, i just updated the plugin with more detailed logs. Please update and see if you get more logs from homebridge.
from homebridge-switchmate-switch.
I looked at this some more earlier today. I have some theories....
#1- Noble added some details to their requirements. They added a note about needing to update security settings on OSX.
#2- I looked at another Switchmate plugin and and they had some additional steps that won't work on MacOS. I'm wondering if some of that is to blame.
In my logs now.
[1/24/2021, 7:06:18 PM] [SwitchmateSwitch] Initializing SwitchmateSwitch platform...
[1/24/2021, 7:06:18 PM] [SwitchmateSwitch] Finished initializing platform
[1/24/2021, 7:06:18 PM] [SwitchmateSwitch] on DID_FINISH_LAUNCHING. Looking for new accessories
[1/24/2021, 7:06:18 PM] [SwitchmateSwitch] delay discovery for 15 seconds
[1/24/2021, 7:06:33 PM] [SwitchmateSwitch] noble is not running. waiting for it to power on...
from homebridge-switchmate-switch.
#2- I looked at another Switchmate plugin and and they had some additional steps that won't work on MacOS. I'm wondering if some of that is to blame.
I don't see the additional steps. mind referring those?
for the logs is that all you get from the plugin? Normally the scan should start following your last line.
from homebridge-switchmate-switch.
From the other plugin - This can't be run on MacOS.
Permissions
NodeJS needs permission to control the Bluetooth radio on your system. Execute the command below to give NodeJS the capability use raw sockets and manage the interface.sudo setcap 'cap_net_raw,cap_net_admin+eip'
which node
That's it from the logs.
from homebridge-switchmate-switch.
maybe they removed the 'undocumented protocol' mentioned here
from homebridge-switchmate-switch.
not sure if this is the issue you have abandonware/noble#162
from homebridge-switchmate-switch.
That's the security changes I referred to. I made the change, but still no go. I've installed the plugin (is there an install log somewhere?) but no accessories. I think this is likely the issue because an npm install in the homebridge folder (from ssh or terminal directly) results in
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules/@abandonware/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @abandonware/[email protected]: wanted {"os":"linux,android,freebsd,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
So I think the issue is the that it's being accessed from something other than terminal and I need to determine what and give it appropriate permissions.
from homebridge-switchmate-switch.
I think this is likely the issue because an npm install in the homebridge folder (from ssh or terminal directly) results in
it shouldn't be because these 2 are optional dependencies.
if you install the plugin you referred they have a binary tool that scans BLE devices. Have you tried that? Does it work?
from homebridge-switchmate-switch.
No. I posted an issue on that plugin as well.
I tried just installing and running switchmate-ble find
This is the result/usr/local/lib/node_modules/homebridge-switchmate-ble/lib/scanner.js:28
noble._bindings._hci.on('leScanEnableSetCmd', enabled => {
^TypeError: Cannot read property 'on' of undefined
at new Scanner (/usr/local/lib/node_modules/homebridge-switchmate-ble/lib/scanner.js:28:30)
at Object. (/usr/local/lib/node_modules/homebridge-switchmate-ble/lib/scanner.js:224:28)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object. (/usr/local/lib/node_modules/homebridge-switchmate-ble/bin/cli-find.js:4:17)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
from homebridge-switchmate-switch.
Hi @gonzonia
Not sure if you still have this problem. I've upgraded my pi4 to bullseye and had the same problem.
Upon checking the bluetooth service is not running due to the new connman
cli tool added.
This might be the same problem for you. Can you please check if the bluetooth service corrected started?
You can do so by using sudo systemctl status bluetooth
from homebridge-switchmate-switch.
I actually stopped using homebridge and switched over to Home Assistant which had broader support for my devices. I couldn't get the Switchmate device working their either, but it's not a big deal.
from homebridge-switchmate-switch.
Okay I'll close this then. Let me know if you're switching back and we can try debug it.
from homebridge-switchmate-switch.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebridge-switchmate-switch.