question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Manual status update/synch?

See original GitHub issue

Is your feature request related to a problem? Please describe.

First, some background… I already have a homebridge instance set up (which I’ve been using for around a year now) but I’ve had many issues with it. I suspect its problems may be the communication between iOS and homebridge or the problems are just from iOS in general, so I installed node-red-contrib-homekit-bridged and node-red-contrib-homebridge-automation in order to try and rule out a communication issue between iOS and homebridge. My hope is that the next time I start having an issue with homebridge devices not responding or not being found, I can try out using a node-red-contrib-homekit-bridged copy of the unresponsive device and if it doesn’t exhibit the same problematic behavior, I can conclude that iOS/homebridge communication is the source of my problems (and just completely switch over the node-red-contrib-homekit-bridged and uninstall homebridge). I added a node-red-contrib-homebridge-automation node for each device and connected each one to a node-red-contrib-homekit-bridged node so that I can control my homebridge devices from node-red.

Everything seems to be working now, but I had an issue with initial states of the devices. I had to create an inject node (which I must trigger manually after deploy/restart) to query homebridge for its current state and send it to your homekit node so that the device states for the node-red-contrib-homekit-bridged devices and the homebirdge devices in the home app are synchronized (because without doing that, all the node-red-contrib-homekit-bridged devices in the home app all start in the off state regardless of the actual state of the device). I didn’t expect to have to do this…

Following the garage door example, I tried creating an inject-once node (after 2 seconds) to initialize the home app state (before I created the manual synch portion of the flow), but every device in the flow started in an error state and was only fixed by my manual synch. Honestly, I don’t understand how the initial state of each node (and the buttons in the home app) is supposed to work. Maybe I’m doing it wrong.

So my problem is either a documentation issue (where I wasn’t able to understand how to set things up so that the initial state of each device reflects that actual state of the physical device) or it’s a bug where the state of each device’s node is in error.

Describe the solution you’d like

First, I think the documentation should describe how a device’s state is synchronized with the node-red representation (both in node red and in the home app) so that users know how to handle the case where the state of the home app button does not reflect the state of the actual device.

Second, it seems to me like there is no mechanism(?) for polling the device state so that it can stay synchronized with the actual device state. If a device’s state is changed via some external means (outside of node-red or the home app, such as an RF remote for an RF outlet). Homebridge devices’ states do stay synchronized regardless of how the device’s state is changed because I can define a “powerstate get” method for each device, which is then polled at some interval. For my RF outlets for example, I can set up a receiver on my breadboard that can listen for the RF remote signal and update a state file I keep for each device when that outlet’s on/off signal is detected, and my “powerstate get” method for homebridge just cats that file. It’s not clear to me that that’s possible with node-red-contrib-homekit-bridged or if it is, I couldn’t find it in the documentation.

Describe alternatives you’ve considered

My work-around is to use node-red-contrib-homekit-bridged in conjunction with homebridge and use the hb event node from node-red-contrib-homebridge-automation to update node-red-contrib-homekit-bridged nodes. The hb event node gets triggered when homebridge’s polling detects a state change, which doesn’t seem possible with node-red-contrib-homekit-bridged. I could certainly monitor state changes with my RF receiver, but I don’t know how to trigger that state change in node red without the hb event homebridge node.

I haven’t played around with other devices to see if their states are updated when changes happen outside of node-red/the home app. E.g. if I use the wemo app to turn on/off a wemo outlet, does the state in node red and the home app update?

Additional context

It’s entirely possible that I’m just not understanding how things are supposed to work or my issue is related to some some newbie mistake. Perhaps I just need a longer delay for the inject-once node in order to get the correct initial state? Note that if the initial state is wrong, I had trouble controlling the device from the home app. A manual synch using the inject node seems to fix it. Here’s how I currently have things set up:

homekitnoderedexample

I have roughly 2 dozen devices set up in homebridge.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:31 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
hepcat72commented, Jan 29, 2020

Incidentally, regarding the slowness in responding, I recently discovered a potential cause: the pilight-daemon sometimes takes a ton of processor because it may be processing background RF. I have a plan to turn off the receiver. Just haven’t implemented it yet.

1reaction
radokristofcommented, Sep 25, 2019

This has happened with multiple accounts/also with my friend on a completely different setup. It looked like me that Apple doesnt want to allow to use older devices for this. It just said when sending the invitation that this email is not associated with an Apple ID…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizations tracked by update sets
Update sets can track customizations to application tables, fields, and records.
Read more >
Manage software updates synchronization - Microsoft Learn
Use these steps to schedule software updates synchronization, manually start software updates synchronization, and monitor software updates ...
Read more >
Updating Synchronization Status (GDSN Only)
Click More Actions > Update synch status. The Update Synch Status screen is displayed. Specify the following fields in the Update Synch Status...
Read more >
What are Skipped Status Updates? - Simple In/Out - Help Scout
Skipped Status Updates is a feature designed to prevent automatic status updates from overwriting a recent, previous manual status update.
Read more >
Automatic Status Change - Salesforce Help
Required Editions and User Permissions · Manual—A prompt appears to suggest a status update. · Timed—A prompt appears to suggest a status update,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found