Sengled Element Classic issues with HomeKit

We're fairly new to Hubitat, still slowly building out our smart home. I recently added 2 Sengled Classic Elements bulbs to lamps in our living room, and set up Homebridge on a Raspberry Pi so that we can use voice commands with Siri to tell it to turn on and off those lights. For the first 2-3 weeks everything worked perfectly, THEN came an iOS upgrade on our iPhones. Since then I haven't been able to get one or the other of the bulbs to consistently be recognized by HomeKit. I've tried re-pairing both of them, rebuilt the automation rules, deleted the smart hub in the Home app and re-added it. Nothing seems to work. I can tell Siri to turn on the lights, and the response might be "OK, got it." and nothing happens, other times it's "hmm, I can't find that device". I can sometimes get the lamp to reset by manually turning it on in the Home app, sometimes not. Right now both lamps are on, one of which Siri turned on and the other we turned on manually, but neither of them have "active" icons in either the Home app or in the Hubitat dashboard.

We have no other Zigbee devices, and the bulbs are about 20-25 feet from the Hubitat. Our Hubitat and router are both centrally located in the house, and we just don't have enough stuff on the network to cause this much trouble.

I am completely stumped as to how to proceed with troubleshooting and resolving. All I do know for sure is that it really seems related to the iOS upgrade, and I'm nervous about doing the Hubitat platform upgrade until I get a handle on this. Any thoughts and ideas would be so appreciated.

Start at the beginning, then work from there.

Make sure the bulb works correctly from the device driver detail page first, if the state isn't being updated after command are sent to the bulb, you're going to need to add a repeater, doesn't matter the distance from the hub to the bulbs...

2 Likes

OK I went back and redid it all from the beginning, and I think our issue is something else than originally expected. I've got all of the switches, drivers, etc set up. I've installed homebridge on a Raspberry pi, and running hubitat on my mac laptop, with our iPhones having the hubitat app and the home app. The problem is that the homebridge app keeps logging out on the pi. When it does that, everything is unresponsive. We can go a week and it works perfectly, then poof. I log back in, it runs fine, 2 hours later, I'm logged out. Is there some way to prevent homebridge from logging out after inactivity?

Likely the issue is you have not set the user privileges on the RPi correctly. Sorry, I know that's not all that helpful of an answer. It's been a long time since I've setup pure homebridge on a Pi.

To make it much easier, you might consider running Hoobs instead. It's Homebridge with a UI layer on top that is much easier to manage and install plugins. There's a complete image that includes the Raspbian OS and it's much easier to administer. I set it up on a RPi Zero W for my daughter recently and it's been running like a champ. No issues whatsoever.

Hoobs

Once you're up and running with Hoobs, go to the plugins page of their UI and search for the Hubitat plugin for HomeBridge with MakerAPI.

Thanks for the suggestion, I did go and get the HOOBS application, and got as far as getting it to run on start up, but can't get it to go past the DOS screen. I tried logging in from another system, that worked, and on the Pi it even recognized I did so and moved to the next screen, but still a DOS screen, then stayed there. Part of the problem is that I can tell the text is larger than the display, which I've adjusted and it doesn't seem to make a difference, it's still going beyond the boundaries. So I don't know if I am missing some crucial instruction on how to move ahead or not. Any suggestions on how to finish the log in on the Pi?

Updating my post. I gave up on the app and went back to installing it via terminal. I had everything running perfectly, then 2 days ago there was another Apple iOS update. A google search shows this isn't a new thing, folks get toss off the app one way or another with iOS updates. Here is where I am. I rebooted everything, and the last thing to restart was the Pi and the Homebridge app. After bringing it back up, I get an error message in Chromium telling me it can't open Homebridge UI (it "refused to connect" and says to try checking the connection, the proxy or the firewall.The connection is verified, and as far as I can see I don't have any proxy settings on the Mac, and I've turned off the firewall. I can't find a way to allow either Chromium or the Pi as an incoming item on the firewall options page when it is turned on. I've verified the IP address is correct. I've been looking for anything on the phone's iOS settings that might be preventing it from opening and just can't find it. (Using an old iPhone as my Home server.) But since this DID happen with the iOS update, it has GOT to be related to that. I just don't know what to check or change.

You lost me here. The Hoobs setup is a simple matter of choosing the right image for your version of Raspberry Pi, image that to an SD card, put it in the Pi, boot the Pi and then log in from a browser.

You mean a jail broken iPhone? If that’s what you’re talking about, then that’s maybe the cause of the oddities. I’ve seen that method out there, but giving unknown sources access to an iCloud account seems like a very bad idea to me.

Sorry, I didn't go with HOOBS because I never could get it to load. I went back to installing via terminal. I think from what I can see it's essentially the same thing, I have access to download the accessory files, etc, so I'm good there. As to the phone, no it's not jailbroken. We updated our phones a year ago and never traded in the old ones, so I still had an iPhone 6 plus laying around. No sim card in it, but don't need it for this. So I got it out, turned it back on and pulled up Home on it, got the accessories recognized and am using it as the always on server. Again, it was working perfectly for a few weeks until Apple released a security update and now BAM. Can't even open Homebridge UI on the Pi.

I'm not sure what you mean by using it as a server, unless you're talking about just doing local automations. I believe you can do that with an iPhone, but you cannot remotely access HomeKit via iCloud using Apple's Home app if you're using an iPhone as the local hub. Further, I think the Home app has to also stay open. It's just not a great solution for HomeKit automation if that's what you're trying to do. Only an iPad that can run the latest OS, and Apple TV 4 or later, or a HomePod (including HomePod Mini now).

As far as Hoobs running in the terminal, you'll just see updates to the plug-ins that are installed, nothing more.

Here's what mine looks like (I'm only experimenting with Hoobs. I run Homebridge for my regular setup).
Screen Shot 2021-01-31 at 4.41.09 PM

You won't see the QR code come up in the terminal like you do with Homebridge. That QR Code or PIN is access via the Hoobs UI which you should be able to get at by accessing the IP of the computer that is running Hoobs and using 8080 for the port (which is the Hoobs default).

For example: http://192.168.0.139:8080/

Sorry, I don't see anywhere how you're running Hoobs. If it's on a Mac, then you go to System Preference > Network to see the assigned IP to your Mac. You'll want to reserve that IP address for the Mac in your router so that it is always reachable at the IP and you should run it off of Ethernet, not WiFi since the Mac WiFi will go to sleep if you run the Mac with the lid closed.

If you're running Hoobs on a Raspberry Pi, you can look at the DHCP client tables of your router to find the MAC address (Media Access Control) of your Pi and reserve the IP for it.
Some routers will show a name of the device, so it's easier to find, but some will not so you have to look at the client table with your PI (or whatever device you're using) disconnected and then after it's connected, note which one just connected and therefore which MAC address to reserve.

Again, if you are on a Macintosh, the simplest program to image the RPi SD card is ApplePi Baker.
https://www.tweaking4all.com/downloads/betas/ApplePi-Baker-v2.2.6-(Build-3)-beta-macOS-64bit.dmg

Sorry, I'm really trying to help here, but I'm not seeing the whole picture of what you're trying to accomplish. I getting confused by why you're mentioning "iPhone as a server" for example, since that isn't a requirement at all for what you originally wrote in the first post that you wanted to accomplish.

As an example, I setup an HE hub with a Raspberry Pi Zero W running Hoobs for my daughter to use in her apartment. She cannot control it remotely using her iPhone and the Apple Home app, because she doesn't have an iPad, Apple TV 4, or a HomePod, but when she's in the apartment on her local network, it all works fine. I showed her how to add anything in Hubitat to Hoobs using the Maker API app on Hubitat and that works perfectly. I gave her a Sengled bulb in fact and that is one of the devices she's controlling.

I'm sorry I'm not as clear as I should be, I'm not a programmer, just a homeowner that's really new at this and I don't always have the right words. When I talk about how I'm using an iPhone, I am using it in lieu of an iPad or an Apple TV. It is one that was no longer in use as a phone, and was gathering dust. SO right now, it's plugged in and the ONLY thing i am using it for is to have HomeKit open at all times. That's it.
As to HOOBS, if I was understanding the application correctly there was HOOBS, which you could purchase, download and put on a card and put into your pi. It included the raspberry OS. Theoretically you then boot it up and it runs not only the pi OS but brings up the homebridge app. I tried to do this but there was something wrong and it would never load, just froze up on one of the HOOBS DOS screens so I went back to what I did know how to do, which was run my pi os off of a card, and install the Homebridge UI with commands via Terminal. I finally figured out that for some reason, even though when I looked up the IP address in Terminal, that was not the IP address that my router was showing. When I changed that today, my Homebridge UI connected perfectly. So now it's running and the last thing I need to do is to get the bulbs to re-pair with Hubitat, which they don't seem to want to do.
I hope that adds clarity, my apologies for not being clear.

Sounds like you have it mostly worked out :+1:t2:

The bulbs, are they the Sengled Bulbs you mentioned in the first post? If so, starting from off, power cycle them on and off (about a half a second each) 15 times.

The bulbs will reset and the hub should discover them. I prefer to use a plug in a socket, but some use the switch on a powerbar with nothing else plugged into the powerbar but the light.

You can only reset and pair one bulb at a time, so remove them from any fixtures or unscrew one of the bulbs if it’s a two bulb fixture from example. Although, light switches can be tough to get the timing right, so that’s why I recommend the switch on a power bar, or just a plug in and out of the socket quickly 15 times.

The bulb doesn’t stay ready to pair indefinitely, so have the discovery Zigbee devices page ready to hit “Start Zigbee Pairing” as soon as the bulb cycles through its reset flashes.

Thanks, I found out they are REALLY intermittent about behaving nicely. You're right, they are the Sengled Element Classic, and I've paired them before. Today I had to go through the pairing process about 4 times in pretty rapid succession for each one before they finally were picked up ,so now I just need to troubleshoot why they still won't turn on and off. Sigh, seems it's always something :slight_smile: but I'll eventually get it. At least I keep learning!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.