GithubHelp home page GithubHelp logo

Comments (33)

KraigM avatar KraigM commented on July 17, 2024

I just went and looked at that issue, I'm wondering if it is either an issue with homebridge itself or something with the beta version of iOS 9.3.

I had not yet updated my RPi homebridge that I legit use, but I updated my dev homebridge to 0.3.1 a week or two ago and have not had any issues. My dev one has been running on my machine for the last three days with and even after switching Mac users, restoring after battery ran out several times, etc they all still show up on my phone (iOS 9.2).

Anyone else have any issues?

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

What version of Node are you running?

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

4.2.4

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

I'm on 4.3.1
Not sure if that anything to do with to be honest.

I don't see how the iOS version can be the culprit. The accessories disappear over night while my iPhone isn't being used, or I come back home and find that the accessories have gone when they were there before I left, etc.

It's definitely Homebridge and/or the plugin.
I'm starting to think it's something to do with how the current version of Homebridge or of the plugin handles characteristic updates in the background. HomeKit config seems to find something problematic with that and deletes the accessories.

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

It could be a new requirement that iOS 9.3 has or a bug in 9.3

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

They did change how platforms are handled in homebridge 0.3 to allow dynamic functionality. So it could be some weird combo of that and the beta iOS version

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

also Im not sure what changed in homebridge 0.3.1 but if you just have 0.3.0 you should try updating

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

I think I'm already on 0.3.1
If not I'll update to it

This doesn't explain how other Homebridge plugins are stable though

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

pdlove is facing the same problem with his Homebridge-SmartThings plugin and seems to be making some headway towards a fix.

tonesto7/homebridge-smartthings#58

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

The official release of iOS 9.3 is probably happening Tuesday. Maybe that could fix it. Otherwise the problem might just continue thereafter.

I'm anticipating some announcement regarding HomeKit, but that hasn't even been rumoured. Wishful thinking on my part perhaps.

I only updated my iOS to 9.3 beta because of instabilities I was having with Siri in general under 9.2
I use Siri a lot!

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

KraigM

The only accessories I use with the nest plugin are my NestCams. If users with other Nest accessories but no NestCams aren't experiencing the same problem as me, we can safely say that issue centres around the MotionDetected Characteristic and/or the Away Characteristic, specifically how they are being communicated to HomeKit.
Maybe there is a DataType mis-match in the handling of either or both of these two characteristics within homebridge-nest?
Matching the DataTypes in the plugin code to the datatype homebridge/homekit is expecting should be easy to achieve. I believe this is the source of the problems I'm experiencing.

Please see pdlove's most recent posts on:
https://github.com/pdlove/homebridge-smartthings/issues/58#issuecomment-198941106

"pdlove: ... I finally started looking at datatypes in the JSON file and found brightness was being sent as a string in several occasions. Most programs that use JSON are able to handle this datatype issue, but not Apple apparently.
I was able to duplicate it last night. What would happen is that everything would be fine until I adjusted the brightness at my light switch. After that, HomeKit would refuse to do any updates and, eventually, it would drop out every device after that light switch. This latest version is confirmed to not do that.
I am opening a support case with SmartThings to find out why the streaming updates are sending numbers as strings
".

Tying this into another discussion we've had about the best way to represent Nest AWAY in HomeKit, I still believe having a separate NestAway HomeKit accessory utilising (Characteristic.On) is the way to go.

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

In the case of MotionDetected, I send HAPServer's constant value. In the case of Away, it is custom bool attribute and we send true or false. This would be the same if it was a Characteristic.On so even if we switched to that, nothing would change.

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

Have you tried putting homebridge into full debug mode to see if you are getting any errors

DEBUG=* homebridge -D

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

My main point about NestAway is that it should be an independent HomeKit accessory rather than being tied to any nest device in HomeKit. I'd like to see Away as stand-alone "Nest Structure" device in HomeKit. That's just my opinion.

The current problem I'm facing has something to do with Nest Away being translated from its original String datatype to a Bool datatype by homebridge/NodeJS, which would normally cause no issue with HomeKit, but for some reason now HomeKit (either on iOS 9.3 or on the HomeKit iCloud side) doesn't seem to like that and so decided to delete the accessories from it's config.

You're correct, MotionDetected/has_motion is represented as a Bool value by both Nest and homebridge by default. That's unlikely to be the problem as mentioned.

It must be the Away characteristic.

https://github.com/nfarina/homebridge/issues/570

"KhaosT
HomeKit will unpair (aka lose) accessory when it think the accessory's behavior is out of compliance. In the case of homebridge, this normally occurs when one or more plugin returned invalid value for characteristic reads. Ideally if all plugin developers enforce the value it returns for characteristic is valid, this should never happen. For now I'd suggest you try to isolate the plugin that causes the problem and contact plugin developer to address the problem."

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

Easy way to test that theory, downgrade to 1.1.0 since I added the Away characteristic to NestCam in 1.1.1 (per your request)

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

Just seems odd to me that 3/3 platforms don't work for you but all you accessories do. Right after updating to a version that made major changes to platforms but mostly left accessories alone.

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

Ok. I'll try that first
but I believe the failures won't occur anyway, because they only happen when the Away setting is being toggled.

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

bc that is the only thing you can actually set. Is there anything you can set in the other platforms that doesn't cause any issues. Also do the nest cam's work perfectly until you toggle (in other words is the only way to make the nest cam's disappear is by toggling away)?

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

I am running other platforms which have no issues. so that's 3/5 really.
Well 2/5 now: Homebridge-smartthings has been stable now since pdlove's most recent fixes.

homebridge-Fibaro-HC2, homebridge-sensibo, homebridge-smartthings - all have accessories which persist with no issues now. Only homebridge-sensibo uses any set commands in my setup. the other two just report changes for motion sensors.

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

Yes I believe the camera accessories fail then eventually disappear when I toggle Away. Maybe even some time after a Set event. I haven't been able to replicate it yet because I've removed the nest plugin from my setup at the moment, but it makes sense to my use case.
I have the Away toggle as an Action in my "I'm home" and "I'm leaving" scenes, maybe even my "good night" scenes.
I only noticed the disappearing cameras when i've come back home, or woken up in the morning.

I will test this tonight to confirm

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

It could also be the fact that Away is currently a custom characteristic. Maybe HomeKit isn't liking that fact for some reason...

I love how Apple like to confuse developers about HomeKit. There's always a guessing game involved when dealing with it 😛

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

Is there anyway to force the parsing of Nest Away String value as a Bool value within the plugin code, rather than relying on NodeJS to do that?

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

... When I said we send true or false, what I meant was "we send true or false".

NestDeviceAccessory.prototype.isAway = function () {
    switch (this.structure.away) {
        case "home":
            return false;
        case "away":
        case "auto-away":
            return true;
        default:
            return false;
    }
};

No strings unless HomeBridge is taking the bool and making it a string

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

I wonder if the issue is HomeBridge is doing that... Im looking at their constants and they use 0 and 1 instead of bool...

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

Though they do default all bools to false
case Characteristic.Formats.BOOL: return false;

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

@leoneleone So if you toggle it, it immediately disappears?

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

@leoneleone I changed it to use ints instead so try

npm install -g git+https://github.com/KraigM/homebridge-nest.git#24ea2789887ef914c4ba21b43935be6196ebb5e8

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

No it doesn't immediately disappear. I think they disappear after some time, not sure how long.

I'll try the new changes

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

When you toggle, does it actually change? What about if you toggle from the Nest app?

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

I updated using the http address above and yes now the toggle works and the change appears in the Nest app as well, almost immediately. I've toggled it a few times now and all seems stable.

I'll have to leave if overnight to confirm stability.

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

toggling from within the nest app works as well, the change is reported in HomeKit correctly.

from homebridge-nest.

leoneleone avatar leoneleone commented on July 17, 2024

Seems stable after 14 hours now. No disappearing accessories so far

from homebridge-nest.

KraigM avatar KraigM commented on July 17, 2024

Officially released in 1.1.2

from homebridge-nest.

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.