Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot see non hue Cree lights #84

Closed
asmalvi opened this issue Mar 19, 2017 · 12 comments
Closed

Cannot see non hue Cree lights #84

asmalvi opened this issue Mar 19, 2017 · 12 comments

Comments

@asmalvi
Copy link

asmalvi commented Mar 19, 2017

I have been trying to control non hue Cree lights which are added to Hue but not added to home app.

I have been following the document and tried the various options but it still does not work. Specially that the platform does'nt even load. The Wemo platform loads and adds the accessories but even that shows as not loaded. In my home add under Homebridge I only see those 2 Wemo devices and the apple pie that allows me to turn it off.

See what happens when loading homebridge as well as my config.json below:

**[3/19/2017, 2:50:29 PM] Loaded plugin: homebridge-harmonyhub
[3/19/2017, 2:50:31 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub'
[3/19/2017, 2:50:31 PM] ---
[3/19/2017, 2:50:32 PM] Loaded plugin: homebridge-hue
[3/19/2017, 2:50:32 PM] Registering platform 'homebridge-hue.Hue'
[3/19/2017, 2:50:32 PM] ---
[3/19/2017, 2:50:32 PM] Loaded plugin: homebridge-people
[3/19/2017, 2:50:32 PM] Registering accessory 'homebridge-people.people'
[3/19/2017, 2:50:32 PM] ---
[3/19/2017, 2:50:33 PM] Loaded plugin: homebridge-platform-wemo
[3/19/2017, 2:50:33 PM] Registering platform 'homebridge-platform-wemo.BelkinWeMo'
[3/19/2017, 2:50:33 PM] ---
[3/19/2017, 2:50:33 PM] Loaded plugin: homebridge-rcswitch-gpiomem
[3/19/2017, 2:50:33 PM] Registering accessory 'homebridge-rcswitch-gpiomem.RcSwitch'
[3/19/2017, 2:50:33 PM] ---
[3/19/2017, 2:50:33 PM] Loaded plugin: homebridge-server
[3/19/2017, 2:50:33 PM] Registering platform 'homebridge-server.Server'
[3/19/2017, 2:50:33 PM] ---
[3/19/2017, 2:50:33 PM] Loaded plugin: homebridge-suncalc
[3/19/2017, 2:50:33 PM] Registering accessory 'homebridge-suncalc.Suncalc'
[3/19/2017, 2:50:33 PM] ---
[3/19/2017, 2:50:33 PM] Loaded plugin: homebridge-telldus
[3/19/2017, 2:50:33 PM] Registering platform 'homebridge-telldus.Telldus'
[3/19/2017, 2:50:33 PM] ---
[3/19/2017, 2:50:34 PM] Loaded plugin: homebridge-wemo
[3/19/2017, 2:50:34 PM] Registering accessory 'homebridge-wemo.WeMo'
[3/19/2017, 2:50:34 PM] ---
[3/19/2017, 2:50:34 PM] Loaded plugin: homebridge-wol
[3/19/2017, 2:50:34 PM] Registering accessory 'homebridge-wol.Computer'
[3/19/2017, 2:50:34 PM] ---
[3/19/2017, 2:50:34 PM] Loaded config.json with 2 accessories and 0 platforms.
[3/19/2017, 2:50:34 PM] ---
[3/19/2017, 2:50:34 PM] Loading 2 accessories...
[3/19/2017, 2:50:34 PM] [Daytime] Initializing Suncalc accessory...
[3/19/2017, 2:50:34 PM] [Daytime] Currently Nighttime(0). Morning Twilight begins at 12:46:21 AM
[3/19/2017, 2:50:34 PM] [Example PC] Initializing Computer accessory...
[3/19/2017, 2:50:34 PM] [Example PC] Starting ping timer on 15000ms interval for Example PC(192.168.178.1)
Load homebridge-harmonyhub.HarmonyHub
[3/19/2017, 2:50:34 PM] [homebridge-harmonyhub.HarmonyHub] Ignoring Harmony Platform setup because it is not configured
Load homebridge-platform-wemo.BelkinWeMo
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ xxx-xx-xxx │     
└────────────┘     

[3/19/2017, 2:50:34 PM] Homebridge is running on port 51826.
[3/19/2017, 2:50:35 PM] [homebridge-platform-wemo.BelkinWeMo] Online: WeMo upstairs TV [94103ECFE316]
[3/19/2017, 2:50:35 PM] [homebridge-platform-wemo.BelkinWeMo] Online: WeMo laundry [94103ECFE45E]**

config.json:
{
"bridge": {
"name": "Homebridge",
"username": "DC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",


"platforms": [
    {
        "platform" : "Hue",
        "name" : "Hue",
    "host": "1xx.xx.x.x",
    "lights": true
    },
{
   "platform": "BelkinWeMo",
   "name": "WeMo laundry",
   "expected_accessories": "2",
   "timeout": "25"
}
]

}

@ebaauw
Copy link
Owner

ebaauw commented Mar 19, 2017

Hmm, your config.json seems valid (despite the odd formatting), but something's not right:

[3/19/2017, 2:50:34 PM] Loaded config.json with 2 accessories and 0 platforms.
[3/19/2017, 2:50:34 PM] ---
[3/19/2017, 2:50:34 PM] Loading 2 accessories...

I would expect homebridge to load 0 accessories and 2 platforms instead. Homebridge-hue announces its version as soon as it's initialised, before even trying to contact the Hue bridge:

[3/19/2017, 9:18:13 PM] Loading 2 platforms...
[3/19/2017, 9:18:13 PM] [Hue] Initializing Hue platform...
[3/19/2017, 9:18:13 PM] [Hue] homebridge-hue v0.3.11, node v6.10.0, homebridge api v2.1

It would seem homebridge is using a different config.json than the one you posted. Is the above your ~/.homebridge/config.json? How do you start homebridge? Did you specify another directory with homebridge -U?

@ebaauw
Copy link
Owner

ebaauw commented Mar 19, 2017

The Wemo platform loads and adds the accessories but even that shows as not loaded. In my home add under Homebridge I only see those 2 Wemo devices and the apple pie that allows me to turn it off.

I don't think the Wemo platform has loaded. It uses dynamic accessories (see its source code). I think the two devices are restored by homebridge from persistent storage (normally from ~/.homebridge/accessories/cachedAccessories). I have no idea what you mean by "apple pie", though.

@asmalvi
Copy link
Author

asmalvi commented Mar 19, 2017

Thanks so much for responding so promptly.

Apple pie is the name of my raspberry pie.

It could be loaded from somewhere else but where could that be? I am not specifying any -U. I did try to use the homebridge from apple store and it tried doing stuff once which i guess was loading from somewhere else. How can i find. Also the fact that its trying to load all the harmony, sun, etc makes me believe it could be using it.

I can try the find / -name config.json and see whats going on.

Anything else you want to suggest.

@asmalvi
Copy link
Author

asmalvi commented Mar 19, 2017

And yeah the config.json I posted is from /home/pi/.homebridge

@asmalvi
Copy link
Author

asmalvi commented Mar 20, 2017

Well I saw the following. How do I know which one my homebridge is using?

/home/pi/.homebridge/config.json
/usr/local/lib/node_modules/homebridge-telldus/config.json
/var/homebridge/config.json
/root/.homebridge/config.json

@asmalvi
Copy link
Author

asmalvi commented Mar 20, 2017

thanks for pointing me out about the incorrect config.json. I identified which one was being used (the one under root) and then just copied the one above in that folder. Voila... it worked after the initial hue bridge syncing. I do see the below error when running homebridge though....

[3/19/2017, 9:37:22 PM] [Hue] Phue: /lights/3: warning: unknown light model {"state":{"on":true,"bri":254,"alert":"none","reachable":false},"type":"Dimmable light","name":"Om's room","modelid":"Connected A-19 60W Equivalent ","manufacturername":"CREE ","uniqueid":"e2:0d:b9:ff:fe:00:7f:05-0a","swversion":"420 "}
[3/19/2017, 9:37:22 PM] [Hue] Phue: /lights/4: warning: unknown light model {"state":{"on":false,"bri":254,"alert":"none","reachable":false},"type":"Dimmable light","name":"Guestroom 1","modelid":"Connected A-19 60W Equivalent ","manufacturername":"CREE ","uniqueid":"e2:0d:b9:ff:fe:01:e7:4d-0a","swversion":"420 "}
[3/19/2017, 9:37:22 PM] [Hue] Phue: /lights/5: warning: unknown light model {"state":{"on":true,"bri":254,"alert":"none","reachable":false},"type":"Dimmable light","name":"Guestroom 2","modelid":"Connected A-19 60W Equivalent ","manufacturername":"CREE ","uniqueid":"e2:0d:b9:ff:fe:01:db:91-0a","swversion":"420 "}

@ebaauw
Copy link
Owner

ebaauw commented Mar 20, 2017

You're probably running homebridge as root instead of pi, maybe using sudo?

If you can confirm that the CREEs work, I'll add them to the list of known lights.

@asmalvi
Copy link
Author

asmalvi commented Mar 20, 2017

Looks like I was running as root. With multiple attempts and the failed attempt to run it on startup (which is what i suspect caused this), this got messed.

I was able to view my lights in Home, Eve and Hespereus meaning that it works. I searched cree and homebridge a lot and the only place i found was some reddit thread.
Please update that it works with your plugin so it helps others. I scored these bulbs at home depot for just 7$ rather than a hefty 15$ for a hue regular bulb.

Next is to get a garage door opened or even better use this as a bluetooth player with an output to my sengled bulb. The low energy is not helping. Shall see ....

@ebaauw
Copy link
Owner

ebaauw commented Mar 20, 2017

the failed attempt to run it on startup

This is tricky. For now, homebridge-hue uses the static platform accessory model (see issue #4), which means homebridge loads all platform accessories on startup rather than on runtime. I find that, depending on your system, homebridge could start too early, before the network is initialised. After a macOS upgrade, my homebridge-hue accessories had disappeared. I currently use autologin and start homebridge from the user login instead of from the system boot.

I scored these bulbs at home depot for just 7$ rather than a hefty 15$ for a hue regular bulb.

Indeed, the Philips bulbs are expensive, but not all bulbs are equal:

  • Different Philips lights support different colour ranges or "gamuts" (see Supported Lights on the Hue developer portal). I have no first-hand experience with non-Philips colour lights, but from what I read, colour lights by other vendors generally show different, more limited colours;
  • As for colour temperature lights, the Philips lights seem to support the widest range, 2200K to 6500K, where e.g. Osram supports only 2700K to 6500K;
  • For dimmable lights, there's fewer possibilities to differentiate, and other vendors provide viable alternatives at lower prices. Even here, lights from different vendors might dim at different speeds and the lowest light level might differ;
  • The number of groups and scenes a light supports differs per vendor (group and scene membership is actually stored in the light in persistent storage);
  • The innr lights are not firmware upgradable; Philips and Osram lights are (but you need an Osram gateway and app to upgrade the Osram firmware);
  • Osram lights allow setting the power-on default state in persistent storage (but only from the Osram gateway and app);
  • Lights can have bugs: some of the innr lights "hang" on Identify and some of the Osram lights with older firmware don't turn off, unless you explicitly specify a transitiontime of 0.

Anyway, enough reasons for homebridge-hue to issue a warning for an unknown light, even thought it doesn't necessarily mean the light won't work.

ebaauw added a commit that referenced this issue Mar 23, 2017
- Hue color candle;
- Hue ambiance candle;
- innr GU10 (#87);
- CREE A19 (#84).
@ebaauw
Copy link
Owner

ebaauw commented Mar 24, 2017

Added the CREE as known light in v0.3.12.

@asmalvi could you please check that they are recognised. From your log, there appears to be a trailing space in the manufacturername and modelid.

@asmalvi
Copy link
Author

asmalvi commented Mar 24, 2017

Good. Thanks. Hopefully others find it easily. I was also able to change the brightness level through siri.

I didn't understand what you mean by the manufacturer name and model id. It is pulld from the hue bridge where the installation was straightforward and something it pulled automatically. Can that be changed?

@ebaauw
Copy link
Owner

ebaauw commented Mar 24, 2017

Those are attributes in the Hue bridge for each light. The light reports these to the Hue bridge, you cannot change them, they're defined in the light's firmware/configuration in persistent storage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants