(SOLVED) Philips Hue - general question

Hi,

if i understand it correctly - there are two ways of bringing the Philips Hue light into OH.

manually add the code (.thing-file) or with PaperUI, right ?
what is the prefered/better way of doing this ?
what is the difference ?

thanks

There are a lot of steps you are skipping.

The more common way is to use PaperUI and automatic discovery to detect your bulbs. This will automatically configure a Thing to represent that bulb.

The steps you are missing are creating Items and linking those Items to the Channels on that Thing that you want to control on that Bulb. Then you need to add the Item(s) to your sitemap, or use them in Rules to issue ON to those Item.

Or you can manually type in the Thing definition. But those missing steps still need to be done.

Neither way is better or worse, though I personally find the autodiscovery to be much easier and take much less of my time.

The biggest difference is if you use autodiscovery or manually create a Thing from PaperUI, the Thing gets saved to a JSONDB file. If you manually create a Thing in a .things file, your Things will live in your /etc/openhab2 folder.

Things that are created in .things files cannot be modified or managed from PaperUI.

Not all bindings will allow you to manually create Things in .things files so you might be forced into PaperUI at some point.

That is all I can think of for the difference.

2 Likes

In addation to what @rlkoshak wrote and especially for your “HUE” usecase:

I just had a look in my hue app and i am not sure, where i can find the device ids, that would be needed for a textual thing configuration.
So in this case i would do the thing stuff in Paper UI and copy the channel strings that i need for my items.

I think it is hard to say “do textual” or “do paperui” as a generic proposal.
Sometimes the truth is in the middle, with combining advantages of both possible options.

I think it is way easier to let Paper UI do the discovery work for me in this case, instead of looking up the correct thing definition in the docs and then looking up the correct device id’s in the hue app.
But of course this can be totally different for other bindings.

2 Likes

I would strongly recommend PaperUI and NodeRed as rule engine - all you need to write is the sitemap.
But only with a working and tested backup in place!

I tried writing .rules but if you use groups for bulbs you have to add a lot of complicated code to get it working - rules are executed massive parallel meaning with 20 bulbs 4 are likely to be at the same line in your rule file - all types of bariers failed - at least all i found in the forums

NodeRed not even generated that mass of events, but also has a limit node to let f. e. only 1 per second pass

Next it is able to connect to hue at a more complete level - you are able to trigger scenes from a drop down list (filled with scenes of all rooms)

If you use openhabian you can install it from the config tool : openhabian-config

1 Like

thanks for the clarification @rlkoshak, @Confectrician, @ChrisW

i tried to make the question as simple as possible :slight_smile:
the “missing part” was clear for me - so i didnt mention it, but thanks anyway - its even more clear now :wink:

the question came up, because i installed my Hue Lights with Paper UI and the manual tells me on the upper half about the binding and more or less “auto discovery” from PaperUI and then changes the manual on the lower half to the “adding it manually” part - so i ended up having both solutions :smiley:

and for the backup/update purposal?
is a thing manually added more “stable” when it comes to an update/backup, than added with PaperUI, or the other way round ? or is there no difference ?
( sorry for the question :smiley: i have never done that so far - i am still beginner and in “testing mode” :smiley: )

thanks

@ChrisW i had a quick look at nodeRed a few days ago - need to look deeper into it - but no time atm :wink:

I think a lot depends on your preference (with regard to what is easier/more stable). Personally, I am using everything in textual configurations (except if the binding is only on the marketplace). All my stuff can be configured in text files and for me they are much easier to backup. In addition, I don’t struggle much anymore with an issue I had a while ago: OH2 complaining about duplicate entries in its database - a problem I ran into regularly when “playing” around with the configuration. So now, as everything is in text files, even if I start with a new install, it is very easy and predictable to setup OH2. Just my two-cents…

1 Like

No difference if you use the built in upgrade/backup/restore scripts and such. If you do this yourself, you just need to backup both /etc/openhab2 and /var/lib/openhab2/jsondb.

1 Like

thanks @rlkoshak and @lipp_markus

thats what i wanted to hear! :heart:

i also consider to set up all my things manually - just to have them always in “focus” while playing around :wink:
even the “easy backup” possibility with only 2 folders sounds clear to me

thanks guys you helped me! - this can be closed now

You can find the lightId on the “about” page (“über” in my german app.

Thanks.
I think this should be added to the docs then with an example.
I searched in the info section of the bulbs.

My thinking was:
If I want to add the living room bulb I will look for the info in the living room bulb info section.

Maybe I didn’t read the docs well.
I will have a look again and file an issue, if I think the docs could be more clear in this case.

your device-id is the serialNumber of your Bridge - you can find this info in

PaperUI → Things → PhilipsHue Bridge → EDIT
(or like Joachim said - in the Hue.app → Settings → About → PhilipsHue-ID: xxxxxxx)

The SERIALNUMBER is your “ID” to declare an item like this:

Switch	Light1_Toggle		"Stehlampe"			<stehlampe>		(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:color" }
Dimmer	Light1_Dimmer		"Helligkeit"		<sun>			(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:color" }
Color	Light1_Color		"Farbe"				<hue>			(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:color" }
Dimmer	Light1_ColorTemp	"Farbtemperatur"					(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:color_temperature" }
String	Light1_Alert		"Alert"				<alarm>			(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:alert" }
Switch	Light1_Effect		"Rainbow"			<hue>			(PhilipsHUE)	{ channel="hue:0210:SERIALNUMBER:1:effect" }

or you make the configuration manually, then you will find/see the DeviceID + Username in the LOG.
then your items should look like this:

Switch	Light1_Toggle		{ channel="hue:0210:1:bulb1:color" }
Dimmer	Light1_Dimmer		{ channel="hue:0210:1:bulb1:color" }
Color	Light1_Color		{ channel="hue:0210:1:bulb1:color" }
Dimmer	Light1_ColorTemp	{ channel="hue:0210:1:bulb1:color_temperature" }
String	Light1_Alert		{ channel="hue:0210:1:bulb1:alert" }
Switch	Light1_Effect		{ channel="hue:0210:1:bulb1:effect" }

Thanks for all the tips, but my hue setting is working fine already.

I just had a look because of this thread here.
And as I said, maybe I didn’t read the docs well.
If so: Everythings fine.
If I think the docs could be more clear, I will file an issue or do the PR myself. :slightly_smiling_face:

Is there a way to trigger the SCENES saved on the Bridge ?
like e.g. “spring blossoms”, “nightlight” or “concentration” for each/all bulbs ?

are there any other options that i am missing beside the normal ON/OFF / color-switch options, like above ?

how could i make a simple color switch automation (rule?) from e.g. red to blue , as an endless loop ?
or some “special effects” like so many apps out there can… ?

thanks

Yes there is, but as this appears to to be a different topic, I would suggest to start a separate thread on this. Also, you may want to search the forum, there have been a few solutions posted to this question, maybe they help you.

1 Like

model: LCT016
ZigBee DeviID: 0x0210
Openhab2 Thing type: 0210
Device Type: Extneded Colour Light

model: LWB014
ZigBee DeviID: 0x0100
Openhab2 Thing type: 0100
Device Type: Dimmable Light

model: LTW015
ZigBee DeviID: 0x0220
Openhab2 Thing type: 0220
Device Type: Color Temperature Light

I hope this helps