Closed Veldkornet closed 5 years ago
Does this happen for all of your devices, or for a specific device? If so, what type of device is it?
Well at the moment I see the issue with my lights which are Fribaro. They are Fibaro Dimmer 2's, as well as Fibaro Wall Plug 2's.
I'll double check the other items/products, but almost all of my items are Fibaro.
Must be v2 related, because my Fibaro Dimmer 2 works as expected in Homekit using v1.5.
I assume that the state of the devices in the Homey app is being updated properly? Also, you could try and test the current beta (v3.0.6) to see if that works better.
In Homey they look to be okay indeed. I'll try 3.0.6 and let you know.
Yup, same issue in 3.0.6.
I tried to look in the log, but the whole thing is empty.
The log isn't actually implemented. I'll remove it from the settings page as it confuses people.
As for the state not updating: no idea why it doesn't work. I know that there are some issues with the Fibaro app itself, but I cannot definitively say that that's the cause of your problems.
@nhassink, do you have Fibaro devices?
This won’t help identify the issue, but I don’t recall having the issue when I was using the Homey “built-in experimental HomeKit app”.
You should be able to run both Homeykit and the built-in HK app simultaneously (each providing a separate "Woning"), if you want to check if it still works there.
@robertklep nope sorry no fibaro here
Well, I was using the “built-in” one for a while and I never noticed it (since 2.0.0 came out). It was the first thing I noticed after switched to this one.
Since it's not inherent to Homeykit that this shouldn't work, we have to rule things out.
If it currently works with the built-in experimental HK version in your situation, but it doesn't in Homeykit, it's likely something on our end. If it also doesn't work with the experimental app, it could be something in the Fibaro app.
I'm not on v2, @nhassink doesn't have Fibaro devices, so our ability to replicate your problems are limited.
Well, I can tell you that it’s not specific to Fibaro. I have the same issue with my Zipato lights, Netatmo devices, Rituals, Toon, everything as far as I can tell. Control wise, you can still turn everything off and on, but the states are never updated. Temperatures never updated. Alarms not updated, etc etc.
Can I not enable the log somehow so that I could at least see if these is an error?
If it happens with all your devices, it seems to be something specific to either your Homey or your iOS device.
As for logging, there isn't a setting that you can enable that will show more info, but it wouldn't do much good anyway because practically speaking, everything is working (in the sense that there aren't any errors being generated, because otherwise the app would be crashing).
Have you tried the built-in experimental HK already to see if the problem occurs with that as well?
The problem doesn’t happen with the “built-in” one, however that one does not have all of the device types etc and just blindly adds all of my devices, otherwise I would have used it.
In that case, all I can suggest is to do a reset (remove the Homey "woning" from iOS, and tap "Clear HomeKit storage and start over" on the settings page).
States not being updated isn't an issue that happens for other users (at least, that I know of), so there's not much that we can debug on our end.
It does seem to work initially... I have the feeling that it semi-dies somewhere along the way...
If it does, I would suspect a Homey-core issue. When it happens next time, try and see if your Homey is using a large amount of memory. There have been issues with people seeing the Homey "app" itself taking up more and more memory, until things start failing and a reboot is required.
Well I don’t know what’s normal for memory, but this is how it was when the issue started again. Just restarting the HomeKit app seems to fix it though.
That memory usage seems acceptable to me.
More importantly, I had assumed that the states were never updated for you, but now I understand that you can fix that by restarting the Homeykit app? Does that mean that it works for a while and then stops working?
If that's the case: do you reboot your Homey often?
Correct, it does initially work, but stops after a while. Restarting the HomeyKit app seems to fix it for a while.
I hardly ever reboot Homey, unless it installs an update.
If it stops working, it suggests that Homey's realtime updates stop working for some reason. Once I get my Homey back, I'll have to look into that a bit closer.
Any chance you've been able to have a look in more detail yet?
No, even though I got my Homey back it's not doing much because I moved all of my home automation to Home Assistant. Not sure when (/if) I'll reinstate my Homey.
I will install it via CLI and see what pops up in the error logs.
...takes a day or two to appear...
Seems t be a bit of a pain getting the logs.... My Athom CLI seems to quit after about a day running with:
✖ Connection has been lost, exiting...
Which is too short to reproduce the error..... will keep trying....
I occasionally have the same problem, the CLI connection just gets dropped. With other apps too, so unrelated to Homeykit.
I understand, I'm just saying, it will therefore take some time to try find anything in the logs :)
Coincidentally, I now have the issue again.
In the logs for HomeyKit, I don't see any errors or anything. It just stops registering state changes... not for specific devices, but for all devices...
Turning the devices off/on in HomeKit still work, but even these are not shown in the log anymore.
So it stops logging "State Change - ..."?
That would mean that Homey's core stops sending state change events, which is rather worrisome.
Correct, it stops logging "State Change - ..." Restarting the app seems to fix it (i don't restart Homey)
@Veldkornet when the state changes stop being logged, does it happen randomly? Or does it only happen when you make changes to Homey (specifically, adding or deleting apps or devices)?
It just happens randomly, there’s no changes to devices etc that’s happening.
What I saw today, is that it logged that I opened a door, but it didn’t log closing it a few seconds later or anything after.
Is that repeatable?
Well, I haven’t figured out anything specific to trigger it, but it usually happens within a day or so of usage. Although I’ve seen that it could sometimes take a bit longer.
After some testing today, my felling is that once the problem starts, even though restarting the app fixes it temporarily, it seems to occur more quickly after the app restart.
I may even say that it just keeps getting worse. A reboot of Homey seems to keep the problem away for longer...
So it may indeed be something Homey related...
Andy ideas on where to look? Otherwise maybe an option for a “debug build” with a bunch of extra logging for that part?
If the realtime updates stop working, there's not much to log. The updates themselves are all logged already, and we can't add additional logging inside Homey core.
Is it normal for the memory usage by the app to jump up and down by so much?
It's not excessive, and the garbage collector kicks in periodically to clean up unused memory.
I checked today in the Heimdall app, and I saw there that it was still seeing the state changes for devices.
I know it not quite the same as a HomeKit app, but at least it shows that apps are still able to see the state changes of devices in Homey.
I can't debug Homey's core. If it stops sending realtime updates for some reason, there's not much I can do about that.
Each app runs in a separate process, with a separate set of communication channels to Homey. After restarting Homeykit, it starts working again because it's a new process with a new set of comm channels.
From an app developer standpoint, it doesn't make sense that without doing anything, Homey's core suddenly decides to stop sending realtime events. I have no idea what could be causing this, nor do I have any possibilities to debug this problem other than logging when a realtime event is received. When those stop being received, I can't dig any further.
It appears as though I’ve fixed it! Or at the very least, this is the longest its run in a long time without breaking. Usually it broke within a day, now it's been running for a couple of days already without any issues.
I downloaded the current beta version, updated the athom-api in the app from version 2.1.140 -> 2.1.179 and installed the app via cli. Since then, I've not experienced any issues.
That's an interesting find! Any reason why you're using 2.1.179 and not the latest (2.1.185)?
Only because I didn’t know where to download it from, and 2.1.179 was easy to find from another app (Heimdall, since this was detecting the state changes). No idea why they chose that version.
So I have no idea what the changelog is even. But I’m happy to test with the latest if you put it in the beta.
The app actually crashes immediately with 2.1.185 😖 so I'll use 2.1.179 as well, will try and upload a beta today.
I just published v3.0.11 as a beta on the Homey app store.
Great! The app was still running without any issues, and I've now installed the beta.
I'll confirm in a couple of days if it still looks good now in the beta.
Still running since last week without any issues FYI
Looks to be resolved.
HomeyKit v3.0.4 Homey v2.0.2
My device states are not being updated in HomeyKit.
For example, if a flow turned off a light, the light should be turned off in HomeKit too... but it’s not. The device still shows as being on. You then need to “turn it off” (which does nothing), and then you can turn it back on as usual.