OpenWonderLabs / homebridge-switchbot

The Homebridge SwitchBot plugin allows you to access your SwitchBot Device(s) from HomeKit. Homebridge.
https://openwonderlabs.github.io/homebridge-switchbot/
ISC License
236 stars 47 forks source link

Bug: wasn't able to establish BLE Connection, node-switchbot: false #638

Closed alevehemens closed 1 year ago

alevehemens commented 1 year ago

Describe The Bug

homebridge-switchbot no longer functions (it used to work!) - shows error "wasn't able to establish BLE Connection, node-switchbot: false"

To Reproduce

Install

Expected behavior

Switches control bot

Relevant log output

02/01/2023, 02:55:54] [SwitchBot] Bot: Luce Cucina wasn't able to establish BLE Connection, node-switchbot: false
[02/01/2023, 02:55:54] [SwitchBot] Bot: Luce Cucina Using OpenAPI Connection to Refresh Status
[02/01/2023, 02:57:54] [SwitchBot] Was 'node-switchbot' found: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Macchina caffè  wasn't able to establish BLE Connection, node-switchbot: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Macchina caffè  Using OpenAPI Connection to Refresh Status
[02/01/2023, 02:57:54] [SwitchBot] Was 'node-switchbot' found: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Mac wasn't able to establish BLE Connection, node-switchbot: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Mac Using OpenAPI Connection to Refresh Status
[02/01/2023, 02:57:54] [SwitchBot] Was 'node-switchbot' found: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Luce Cucina wasn't able to establish BLE Connection, node-switchbot: false
[02/01/2023, 02:57:54] [SwitchBot] Bot: Luce Cucina Using OpenAPI Connection to Refresh Status
[02/01/2023, 02:59:54] [SwitchBot] Was 'node-switchbot' found: false
[02/01/2023, 02:59:54] [SwitchBot] Bot: Portoncino wasn't able to establish BLE Connection, node-switchbot: false
[02/01/2023, 02:59:54] [SwitchBot] Bot: Portoncino Using OpenAPI Connection to Refresh Status
[02/01/2023, 02:59:54] [SwitchBot] Was 'node-switchbot' found: false

Config for homebridge-switchbot

{
            "name": "SwitchBot",
            "credentials": {
                "token": "",
                "secret": "",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "deviceId": "",
                        "configDeviceName": "Portoncino",
                        "configDeviceType": "Bot",
                        "connectionType": "BLE/OpenAPI",
                        "customBLEaddress": "",
                        "scanDuration": 5,
                        "bot": {
                            "mode": "press",
                            "deviceType": "switch",
                            "allowPush": false,
                            "doublePress": 1
                        },
                        "refreshRate": 360,
                        "offline": false,
                        "logging": "standard"
                    },
                    {
                        "deviceId": "",
                        "configDeviceName": "Macchina caffè ",
                        "configDeviceType": "Bot",
                        "connectionType": "BLE/OpenAPI",
                        "customBLEaddress": "",
                        "scanDuration": 5,
                        "bot": {
                            "mode": "press",
                            "deviceType": "switch",
                            "allowPush": false,
                            "doublePress": 1
                        },
                        "offline": false,
                        "logging": "standard"
                    },
                    {
                        "deviceId": "",
                        "configDeviceName": "Mac",
                        "configDeviceType": "Bot",
                        "connectionType": "BLE/OpenAPI",
                        "scanDuration": 5,
                        "bot": {
                            "mode": "press",
                            "deviceType": "switch",
                            "allowPush": true,
                            "doublePress": 1
                        },
                        "offline": false,
                        "logging": "standard"
                    },
                    {
                        "deviceId": "",
                        "configDeviceName": "Luce Cucina",
                        "configDeviceType": "Bot",
                        "connectionType": "BLE/OpenAPI",
                        "scanDuration": 5,
                        "bot": {
                            "mode": "switch",
                            "deviceType": "switch",
                            "allowPush": true,
                            "doublePress": 0
                        },
                        "offline": false,
                        "logging": "standard"
                    }
                ],
                "logging": "standard"
            },
            "platform": "SwitchBot"
        },

Screenshots

07D0AB90-DC7D-4E8C-88CE-417D3757BDE4

Device & Model

SwitchBot bot

Node.js Version

18.12.1

NPM Version

8.19.2

Homebridge Version

1.6.0

Homebridge Switchbot Plugin Version

2.4.0

Homebridge Config UI X Plugin Version

4.50.2

Operating System

Raspian

Jorick-tv commented 1 year ago

I have the same since updating Node.js

alevehemens commented 1 year ago

Hi guys, any update?or ideas?

francescosabia commented 1 year ago

I have the same bug.. what can we do?

donavanbecker commented 1 year ago

FYI, this isn't a bug.

This has to deal with noble getting installed. You will have to follow prerequisites, then try reinstalling.

donavanbecker commented 1 year ago

Follow all instructions:

https://github.com/abandonware/noble#prerequisites

Also: https://github.com/OpenWonderLabs/homebridge-switchbot/wiki/Bluetooth-Issues

francescosabia commented 1 year ago

Do I need to do this? If you are having trouble connecting to BLE devices on a Raspberry Pi, you should disable the pnat plugin. Add the following line at the bottom of /etc/bluetooth/main.conf:DisablePlugins=pnat

donavanbecker commented 1 year ago

@francescosabia You may have too.

francescosabia commented 1 year ago

i did it. but still have the same error>

donavanbecker commented 1 year ago

Not much I can do, it's a Bluetooth issue not a plug-in issue.

francescosabia commented 1 year ago

I saw I can t edit the file.. FileZilla says error because no root access.. how can I access in FileZilla with root so I can edit the file? Thanks

alevehemens commented 1 year ago

Also file explore allow to edit file but not to save.Any suggestion?Thanks!My afraid that if I redo HOMEBRIDGE from zero the issue persist and all action will be done for nothing…;(Il giorno 18 feb 2023, alle ore 21:36, francescosabia @.> ha scritto: I saw I can t edit the file.. FileZilla says error because no root access.. how can I access in FileZilla with root so I can edit the file? ThanksInviato da iPhoneIl giorno 18 feb 2023, alle ore 20:34, Donavan Becker @.> ha scritto: Not much I can do, it's a Bluetooth issue not a plug-in issue.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

BrandonHacks commented 1 year ago

Did anyone figure this out? I’m having the same issue and followed directions to a T. Including the prerequisites.

francescosabia commented 1 year ago

As soon as I can I ll do a fresh install of hoobs, restore my backup and try to install again the plugin, hoping that will help to solve the problemInviato da iPhoneIl giorno 3 mar 2023, alle ore 05:33, BrandonHacks @.***> ha scritto: Did anyone figure this out? I’m having the same issue and followed directions to a T. Including the prerequisites.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

BrandonHacks commented 1 year ago

As soon as I can I ll do a fresh install of hoobs, restore my backup and try to install again the plugin, hoping that will help to solve the problemInviato da iPhoneIl giorno 3 mar 2023, alle ore 05:33, BrandonHacks @.> ha scritto: Did anyone figure this out? I’m having the same issue and followed directions to a T. Including the prerequisites. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

I just did a fresh install and that solves this issue. Now I’m still unable to establish a connection through BLE.

alevehemens commented 1 year ago

Hi Brandon,So with a fresh install any issue about SwitchBot was resolved correct?But with Bluetooth issue, which problem do you have now?some example?Thanks a lot for your update!for me it’s very important!AlessioIl giorno 5 mar 2023, alle ore 00:57, BrandonHacks @.***> ha scritto:

As soon as I can I ll do a fresh install of hoobs, restore my backup and try to install again the plugin, hoping that will help to solve the problemInviato da iPhoneIl giorno 3 mar 2023, alle ore 05:33, BrandonHacks @.> ha scritto: Did anyone figure this out? I’m having the same issue and followed directions to a T. Including the prerequisites. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.>

I just did a fresh install and that solves this issue. Now I’m still unable to establish a connection through BLE.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

francescosabia commented 1 year ago

As soon as I can I ll do a fresh install of hoobs, restore my backup and try to install again the plugin, hoping that will help to solve the problemInviato da iPhoneIl giorno 3 mar 2023, alle ore 05:33, BrandonHacks @.**> ha scritto: Did anyone figure this out? I’m having the same issue and followed directions to a T. Including the prerequisites. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.**>

I just did a fresh install and that solves this issue. Now I’m still unable to establish a connection through BLE.

So what can be the problem? 😩

BrandonHacks commented 1 year ago

Others may not have any issue connecting to Bluetooth. I am able to find my device with Noble, but this plugin does not connect to it.

I would give a fresh install a try and see if you have success. Python version was one of my problems with the above error.

francescosabia commented 1 year ago

did a hoobs fresh install but still having the same problem wasn't able to establish BLE Connection, node-switchbot: [object Object]

Il giorno lun 6 mar 2023 alle ore 04:09 BrandonHacks < @.***> ha scritto:

Others may not have any issue connecting to Bluetooth. I am able to find my device with Noble, but this plugin does not connect to it.

I would give a fresh install a try and see if you have success. Python version was one of my problems with the above error.

— Reply to this email directly, view it on GitHub https://github.com/OpenWonderLabs/homebridge-switchbot/issues/638#issuecomment-1455369440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2AVOKMJGIJ47SLQYXAF3W2VIOJANCNFSM6AAAAAATOUEEQY . You are receiving this because you were mentioned.Message ID: @.***>

alevehemens commented 1 year ago

I suggest you to reinstall fresh hoobs without re-establish your backup, then install immediately SwitchBot plug-in and try with your first SwitchBot or anything other SwitchBot and then check on your log if the issue about node SwitchBot persist or not.Let us know!AlessioIl giorno 7 mar 2023, alle ore 16:33, francescosabia @.***> ha scritto: did a hoobs fresh install but still having the same problem wasn't able to establish BLE Connection, node-switchbot: [object Object]

Il giorno lun 6 mar 2023 alle ore 04:09 BrandonHacks < @.***> ha scritto:

Others may not have any issue connecting to Bluetooth. I am able to find my device with Noble, but this plugin does not connect to it.

I would give a fresh install a try and see if you have success. Python version was one of my problems with the above error.

— Reply to this email directly, view it on GitHub https://github.com/OpenWonderLabs/homebridge-switchbot/issues/638#issuecomment-1455369440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2AVOKMJGIJ47SLQYXAF3W2VIOJANCNFSM6AAAAAATOUEEQY . You are receiving this because you were mentioned.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

francescosabia commented 1 year ago

I did it!! The issue still here.. now I managed to let the bot work.. (I understand now that the MAC address must be written without:) but the meter still doesn t work.. I have same result in logs

alevehemens commented 1 year ago

Hi everyone again,Finally I reinstall fresh HOMEBRIDGE me too and insert backup of HOMEBRIDGE but I still have error with SwitchBot:wasn't able to establish BLE Connectio n, node-switchbot: [object Object] Someone knows how to solve this issue?ThanksAlessioIl giorno 7 mar 2023, alle ore 20:25, francescosabia @.> ha scritto: I did it!! The issue still here.. now I managed to let the bot work.. (I understand now that the MAC address must be written without:) but the meter still doesn t work.. I have same result in logsInviato da iPhoneIl giorno 7 mar 2023, alle ore 19:46, alevehemens @.> ha scritto: I suggest you to reinstall fresh hoobs without re-establish your backup, then install immediately SwitchBot plug-in and try with your first SwitchBot or anything other SwitchBot and then check on your log if the issue about node SwitchBot persist or not.Let us know!AlessioIl giorno 7 mar 2023, alle ore 16:33, francescosabia @.***> ha scritto: did a hoobs fresh install but still having the same problem wasn't able to establish BLE Connection, node-switchbot: [object Object]

Il giorno lun 6 mar 2023 alle ore 04:09 BrandonHacks < @.***> ha scritto:

Others may not have any issue connecting to Bluetooth. I am able to find my device with Noble, but this plugin does not connect to it.

I would give a fresh install a try and see if you have success. Python version was one of my problems with the above error.

— Reply to this email directly, view it on GitHub https://github.com/OpenWonderLabs/homebridge-switchbot/issues/638#issuecomment-1455369440, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2AVOKMJGIJ47SLQYXAF3W2VIOJANCNFSM6AAAAAATOUEEQY . You are receiving this because you were mentioned.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

francescosabia commented 1 year ago

Hi everyone again,Finally I reinstall fresh HOMEBRIDGE me too and insert backup of HOMEBRIDGE but I still have error with SwitchBot:wasn't able to establish BLE Connectio n, node-switchbot: [object Object] Someone knows how to solve this issue?ThanksAlessioIl giorno 7 mar 2023, alle ore 20:25, francescosabia @.> ha scritto: I did it!! The issue still here.. now I managed to let the bot work.. (I understand now that the MAC address must be written without:) but the meter still doesn t work.. I have same result in logsInviato da iPhoneIl giorno 7 mar 2023, alle ore 19:46, alevehemens @.> ha scritto: I suggest you to reinstall fresh hoobs without re-establish your backup, then install immediately SwitchBot plug-in and try with your first SwitchBot or anything other SwitchBot and then check on your log if the issue about node SwitchBot persist or not.Let us know!AlessioIl giorno 7 mar 2023, alle ore 16:33, francescosabia @.> ha scritto: did a hoobs fresh install but still having the same problem wasn't able to establish BLE Connection, node-switchbot: [object Object] Il giorno lun 6 mar 2023 alle ore 04:09 BrandonHacks < @.> ha scritto: Others may not have any issue connecting to Bluetooth. I am able to find my device with Noble, but this plugin does not connect to it. I would give a fresh install a try and see if you have success. Python version was one of my problems with the above error. — Reply to this email directly, view it on GitHub <#638 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQ2AVOKMJGIJ47SLQYXAF3W2VIOJANCNFSM6AAAAAATOUEEQY . You are receiving this because you were mentioned.Message ID: @.> —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.> —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.> —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>

I think it s a plugin bug

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.