Problem with openhub.cfg

Hi,
could you please post your item definition and more information about OS and JAVA version.

Wow thanks for the quick reply! Yes, this is it, I assume.

Group All

Group Bed (All)

Switch Light_Bed “Bed” (Bed) {milight=“bridge;6;brightness”}
Switch Light_Bed2 “Bed?” (Bed) {milight=“bridge;7;brightness;27”}

I’m running it on a Raspberry Pi Model B (I think? The first one) with raspbian jessie and java 1.8.0_65.

Is this Oracle JAVA or openJDK ?

If it is not Oracle, please change to that.

How would I go about finding that out? I have not changed anything myself, everything is as it came with the latest raspbian jessie I downloaded today from their website.

What’s the complete output of java -version?

This:
java version "1.8.0_65"
Java™ SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot™ Client VM (build 25.65-b01, mixed mode)

OK, fine it’s oracle.

Just for a try, can you change your config to

milight:bridge1.host=192.168.178.123
milight:bridge1.port=8899

and your items to
Switch Light_Bed “Bed” (Bed) {milight=“bridge1;6;brightness”}
Switch Light_Bed2 “Bed?” (Bed) {milight=“bridge1;7;brightness;27”}

and see what happens.

Another question,
did you remove the brackets around “bridge” ???

See here:

All that’s changed is the bridge1 part, right? That’s what I had initially, but since I only have one bridge I just renamed it (for now). But I changed it to bridge1 now and am getting the same logs:

2016-03-24 23:34:52.234 [DEBUG] [.io.net.http.SecureHttpContext] - security is disabled - processing aborted!
2016-03-24 23:34:52.246 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: item is of type brightness
2016-03-24 23:34:52.258 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: sendOn
2016-03-24 23:34:52.266 [DEBUG] [.o.b.m.internal.MilightBinding] - milight: messageBytes to transform: '42:00:55’
2016-03-24 23:34:52.271 [DEBUG] [.o.b.m.internal.MilightBinding] - Sent packet ‘42:00:55’ to bridge ‘bridge1’ (null:50000)

And do you mean the <> brackets? In that case yes.

OK, it is definitely a problem within your openhab.cfg file, preventing the binding to read your bridge config.
Did you copy the openhab_default.cfg to openhab.cfg and made your changes there.
No typo in the name, as your topic for this thread has a typo (it is not openhub.cfg) ?

By copy it is just meant to duplicate and rename it right? Because that’s what I did, and yes I named it correctly though I frequently mess that up :smiley: All the changes are in a file called openhab.cfg that’s sitting in the configurations folder.

Now I am running out of ideas.
Could you please check if your user running openhab has sufficient rights to access the openhab.cfg file.
If you duplicated and changed it as a different user, this could be a problem.

I am just guessing.

How would I go about checking that? The guide I used said to write
sudo chown -hR openhab:openhab /usr/share/openhab
and from what I got that deals with the rights? this is the guide that I followed, I realize now that I maybe shouldn’t have done it through a 3rd party website. I followed it line for line up until when it began dealing with the Hue

As I understand, openhab is running under user openhab.
So you could login as user openhab and try to edit openhab.cfg. If you get a permission denied error on saving, then you have an issue with the rights.

What I’ve been doing is access my Pi via my network, using my MacBook. So I type commands through a Terminal Remote Connection and can access and update files through the finder, as shown in the tutorial. I can access and change the file using both ways, so I assume I have all the rights, right?

For a try, you could ssh into your raspi, navigate to your configurations folder and type ls -lia openhab.cfg.
You will then see the permissions and the owner.
Please post the output.

This is what I get:
260645 -rwxrw-rw- 1 openhab openhab 84151 Mar 24 23:34 openhab.cfg

From what I’ve gathered, this output means that openhab has all the rights it should, right?

It just worked! I have absolutely no idea why as I didn’t change anything, maybe it was because I shut down my Pi overnight, though I’m pretty sure I’ve restarted it before. Anyway, I’m really glad it works now, thanks for your support! :slight_smile: Now off to create all kinds of rules!

Great to hear, as I was really running out of ideas.