Giter VIP home page Giter VIP logo

Comments (15)

donavanbecker avatar donavanbecker commented on July 30, 2024

@smartmatic, you are missing your openToken. we still require that because it is used to find all devices you have on your SwitchBot Account, but allows you to set BLE connection. Then BLE connection will be used every time unless it fails then OpenAPI is used as a backup.

You do not need to install @abandonware/noble

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

@smartmatic, you are missing your openToken. we still require that because it is used to find all devices you have on your SwitchBot Account, but allows you to set BLE connection. Then BLE connection will be used every time unless it fails then OpenAPI is used as a backup.

You do not need to install @abandonware/noble

So the openToken is a pre-requisite and not optional? I guessed i can save to add the openToken.

If i remember it right i saw a video related to io-Broker and they completely waive on the openToken. But i understand the point with the fallback in case BLE is not available.

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

@smartmatic, I currently don't have a plan to waive the openToken since BLE doesn't always work.

from homebridge-switchbot.

steverae68 avatar steverae68 commented on July 30, 2024

Following on from this conversation - i current still run the Switchbot.BLE plugin you created some time ago without any issues. based on this, i returned my switchbot mini hub as i didnt require it any more (i have broadlink for RF and IR).

Are you saying (according to the release notes) that i need the mini hub again now or will BLE still function without the Hub ?

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

since I have a hub I haven't tested it without a hub and the openToken. If you can test that for me and give me the log outputs, I can look into this further.

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

since I have a hub I haven't tested it without a hub and the openToken. If you can test that for me and give me the log outputs, I can look into this further.

I have already done that. The outpot is in my first post. The log show a message "missing openToken". Thats all i have as nothing more was shown in the log.

Please guide me a bit how to test in order to provide you a good data basis.

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

I am saying input an openToken, and then give me the logs.

And enable debug logs: send output
Then enable device logs: send output

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

Since i turned on the debug mode homebridge crashes. Here is the log:
homebridge.log.txt

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

@ smartmatic, I have enabled BLE only support, can you try Beta:

You must set the Device ID, Device Name, Device Type, Check BLE.

npm version

Click here to find out how to install Beta

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

Latest Beta is now installed. Added a Bot and Color Bulb and get this message after enabling Device Log

[19.11.2021, 17:59:18] [SwitchBot] Initializing SwitchBot platform...
[19.11.2021, 17:59:18] [SwitchBot] Using Default Refresh Rate (2 minutes).
[19.11.2021, 17:59:18] [SwitchBot] Using Default Push Rate.
[19.11.2021, 17:59:18] [SwitchBot] Missing openToken
[19.11.2021, 17:59:18] [SwitchBot] Cloud Enabled SwitchBot Devices & IR Devices will not work
[19.11.2021, 17:59:18] [SwitchBot] Loading accessory from cache: Bot 01
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Device: Bot 01 BLE Connection Enabled
[19.11.2021, 17:59:18] [SwitchBot] Restoring existing accessory from cache: Bot 01 DeviceID: D273C8A34EFF
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Unable to Register new device: Bulb 01 Color Bulb - 84F70353DD5A
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Bot: Bot 01 Config: (ble: true, mode: press, deviceType: switch)
[19.11.2021, 17:59:18] [SwitchBot] Bot: Bot 01 Displaying as Switch
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Bot: Bot 01 BLE Address: d2:73:c8:a3:4e:ff
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic On: false
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic BatteryLevel: 100
[19.11.2021, 17:59:18] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic StatusLowBattery: 0

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

I made an additional test and placed a Bot and a Meter close to the Raspberry in order to exclude any issues based on the distance. Here are some more logs.

[19.11.2021, 18:32:49] [SwitchBot] [DEVICE] Bot: Bot 01 serviceData: {"model":"H","modelName":"WoHand","mode":false,"state":false,"battery":93}
[19.11.2021, 18:32:49] [SwitchBot] [DEVICE] Bot: Bot 01, model: H, modelName: WoHand, mode: false, state: false, battery: 93
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic On: false
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic BatteryLevel: 93
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic StatusLowBattery: 0
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic StatusLowBattery: 0
[19.11.2021, 18:32:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic BatteryLevel: NaN
[19.11.2021, 18:32:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic CurrentRelativeHumidity: NaN
[19.11.2021, 18:32:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic CurrentTemperature: NaN
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 BLE Address: d2:73:c8:a3:4e:ff
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 Press Mode: press
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 BLE Address: d2:73:c8:a3:4e:ff
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01 serviceData: {"model":"H","modelName":"WoHand","mode":false,"state":false,"battery":93}
[19.11.2021, 18:32:50] [SwitchBot] [DEVICE] Bot: Bot 01, model: H, modelName: WoHand, mode: false, state: false, battery: 93
[19.11.2021, 18:32:50] [SwitchBot] Bot: Bot 01, On: true
[19.11.2021, 18:32:50] [SwitchBot] Bot: Bot 01 failed pushChanges with BLE Connection
[19.11.2021, 18:32:50] [SwitchBot] Bot: Bot 01 failed pushChanges with BLE Connection, Error Message: "Now connecting. Wait for a few seconds then try again."
[19.11.2021, 18:32:52] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:32:52] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.

[19.11.2021, 18:33:00] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic On: false
[19.11.2021, 18:33:00] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic BatteryLevel: 93
[19.11.2021, 18:33:00] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic StatusLowBattery: 0
[19.11.2021, 18:34:40] [SwitchBot] [DEVICE] Bot: Bot 01 BLE Address: d2:73:c8:a3:4e:ff
[19.11.2021, 18:34:40] [SwitchBot] [DEVICE] Meter: Meter 01 BLE Address: e1:d3:5c:4d:48:87
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic On: false
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic BatteryLevel: 93
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Bot: Bot 01 updateCharacteristic StatusLowBattery: 0
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic StatusLowBattery: 0
[19.11.2021, 18:34:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Battery Level': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic BatteryLevel: NaN
[19.11.2021, 18:34:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic CurrentRelativeHumidity: NaN
[19.11.2021, 18:34:50] [@switchbot/homebridge-switchbot] This plugin generated a warning from the characteristic 'Current Temperature': characteristic value expected valid finite number and received "NaN" (number). See https://git.io/JtMGR for more info.
[19.11.2021, 18:34:50] [SwitchBot] [DEVICE] Meter: Meter 01 updateCharacteristic CurrentTemperature: NaN

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

Hi, i've added now a Bot, a Contact Sensor and a Color Bulb.

Here my log results. The Bulb is currently not visible in the device section.

homebridge.log.txt

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

Version 1.2.0 has been released with support to do BLE Only connection

from homebridge-switchbot.

smartmatic avatar smartmatic commented on July 30, 2024

Thank you! Big progress, i can control the Bot! The other i device i tested is the contact sensor. If i open the sensor the state is not updated.

homebridge.log.txt

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

@smartmatic I think there is an issue with contact sensors in the node-SwitchBot dependency. I will have to look. Would you open another issue. Specifically for that?

from homebridge-switchbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.