Giter VIP home page Giter VIP logo

Comments (9)

lgranger avatar lgranger commented on July 30, 2024 1

Update fixed the issues. Thanks!

from homebridge-switchbot.

lgranger avatar lgranger commented on July 30, 2024

I also had my homebridge server crash when I upgraded to v1.1.0, but I'm not sure that they are causally linked, since I downgraded back through the versions to v 1.0.0 and was still unable to restore functionality.

At first I was getting the same TypeError: Cannot read properties of undefined (reading 'deviceType') error as @ydogandjiev, but after opening the settings for the switchbot plugin and then restarting that error went away and my whole homebridge server isn't crash looping anymore.

Now it is not loading the switchbot devices properly. Logs say that it is loading them from cache after it fails to load them due to missing Device Type:

[11/17/2021, 7:18:12 PM] [SwitchBot] Finished initializing platform: SwitchBot
[11/17/2021, 7:18:12 PM] [SwitchBot] "The devices config section is missing the \"Device Type\" in the config, Check Your Conifg."
[11/17/2021, 7:18:12 PM] [SwitchBot] {}
......
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Heater
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Vacuum On
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Vacuum Home
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Bedroom 
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Office 
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Outside 
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Curtain
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Living Room
[11/17/2021, 7:28:00 PM] [SwitchBot] Loading accessory from cache: Kitchen

I see the devices, but the temp/humidity sensors are returning 0 for all values (including battery level), and I can't control any of the switches.

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

@ydogandjiev Your hide_device section is no longer needed, remove it and remove and re-add

@lgranger i need to see your config.

from homebridge-switchbot.

ydogandjiev avatar ydogandjiev commented on July 30, 2024

@ydogandjiev Your hide_device section is no longer needed, remove it and remove and re-add

@donavanbecker, thanks for the quick reply but this didn't work. I removed the SwitchBot plugin completely (including the config) and re-installed it just adding my token in the config. Now at least Homebridge starts up but none of my SwitchBot devices show up. I see this error in the logs:

[11/17/2021, 10:54:32 PM] [SwitchBot] Initializing SwitchBot platform...
[11/17/2021, 10:54:32 PM] [SwitchBot] "The devices config section is missing the \"Device Type\" in the config, Check Your Conifg."

Seems like this latest version still has some serious bugs in it. I am rolling back to v1.0.2 to get myself unblocked. Will not be upgrading again until this issue is resolved.

from homebridge-switchbot.

ydogandjiev avatar ydogandjiev commented on July 30, 2024

Hmm, rolling back to v1.0.2 didn't fix the issue this time around. :( I had to delete the two SwitchBots from my account that appeared to be causing the issue. Thankfully I am not using them at the moment. Hopefully whatever caused this regression gets resolved soon.

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

@ydogandjiev, can you try Beta:

npm version

Click here to find out how to install Beta

from homebridge-switchbot.

jeroen020 avatar jeroen020 commented on July 30, 2024

I'm having the same issue, also after installing 1.1.1b8. Log shows:

[18/11/2021, 14:30:39] [SwitchBot] The devices config section is missing the *Device ID* in the config, Check Your Conifg.
[18/11/2021, 14:30:39] [SwitchBot] The devices config section is missing the *Device Type* in the config, Check Your Conifg.
[18/11/2021, 14:30:39] [SwitchBot] You must set your Bot to Press or Switch Mode

I've removed the switchbot (only keeping curtains and airco control), removed the plugin & reinstalled but still get the above error in 1.1.1b8. Reverting to 1.1.0 gives this error:

[18/11/2021, 14:48:15] [SwitchBot] "The devices config section is missing the \"Device Type\" in the config, Check Your Conifg."

The 'Devices' tab in the switchbot plug settings says 'No Devices'.
and this is the config section:

{
            "name": "SwitchBot",
            "credentials": {
                "openToken": "XXXXXXXXXX",
                "notice": "Keep your token a secret!"
            },
            "options": {
                "devices": [
                    {
                        "bot": {
                            "deviceType": "outlet"
                        }
                    }
                ],
                "debug": "device"
            },
            "platform": "SwitchBot"
        }

When I remove the "bot": section from the config and restart I finally get access to my curtains again.

from homebridge-switchbot.

lgranger avatar lgranger commented on July 30, 2024

Here's my config:

        {
            "name": "SwitchBot",
            "credentials": {
                "openToken": "<Token>",
                "notice": "Keep your token a secret!"
            },
            "platform": "SwitchBot"
        }

Here's also a gist with the switchbot portion of the home bridge logs: https://gist.github.com/lgranger/4a3f33bb3f694fd2150f34466fd9d06b

I've also tried the current beta and it's still not working. I've had to disable the plugin.

from homebridge-switchbot.

donavanbecker avatar donavanbecker commented on July 30, 2024

Version 1.2.0 has been released, Please update me on this, and if it has been resolved with this version.

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.