[Solved] Configure logitech Harmony Hub things file

Hi there,

I’m trying to configure my harmony hub with a .things file e.g. harmony.things

I read the latest information on the bindings documentation page saying:

To manually configure a Harmony Hub thing you may specify its host name (“host”) as well as an optional search timeout value in seconds (“discoveryTimeout”) and optional heart beat interval (heartBeatInterval) in seconds.

In the thing file, this looks e.g. like

Bridge harmonyhub:hub:GreatRoom [ host="192.168.1.100"]

To manually configure a Harmony device thing you may specify its numeric id (“id”) or its name (“name”), but not both. Note that this is prefixed by the hub the device is controlled from.

In the thing file, this looks e.g. like

Bridge harmonyhub:hub:great [ name="Great Room"] {
    device denon [ name="Denon AV Receiver"]
}

or

Bridge harmonyhub:hub:great [ name="Great Room"] {
    device denon [ id=176254]
}

My approach:

In PaperUI I grabbed the hubs name and the id’s belonging to my auto-discovered devices and hub.
After removing the auto-discovered stuff in PaperUI I tried all 3 described ways to fill my harmony.things file with my auto-discovered data, but none of them worked… the log throws:

[INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'harmony.things'
[WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'harmony.things' is either empty or cannot be parsed correctly!

maybe the documentation entry is not up to date?

I even tried it some other ways like:

Bridge harmonyhub:hub:HarmonyHub [
    host="192.168.xxx.xxx"
]
{
    Thing   device  shieldtv    [ id="654xxxxx" ] {
        Channels:
            String : buttonPress
            Player : player
    }
}

or am I getting something wrong??

the documentation looks very confusing to me …the “ip” is used in the first example but then the “name” is used in the other 2 examples ???

anyone managed textual configuration of harmony things and got it working like described in the documentation?? Or maybe any hints?

cheers Dan

Can you share the exact things file that you think should work for you? The one that gave those log entries?

1 Like

Hi @hafniumzinc thanks for your interest…

I tried:

Bridge harmonyhub:hub:HarmonyHub [
    host="192.168.xxx.xxx"
]
{
     device  shieldtv    [ id="654xxxxx" ]
}

and

Bridge harmonyhub:hub:HarmonyHub [
    name="HarmonyHub"
]
{
     device  shieldtv    [ id="654xxxxx" ]
}

and the one I mentioned last in my initial post…
all of them result in the same parsing error

I have no idea

My immediate thought is that you should use the word Thing in front of device, as per all the examples in the documentation for Things. However, looking at the Harmony binding documentation it indeed does not use the word Thing at all. Strange.

Yes that was my first thought too, but even trying that leads to the error parsing the file…
Sometimes it’s hard to get things done with OH :wink:

Edit think I tried without “” but I will give it another try and be back in a minute

The binding documentation does show to use the ID number without the " " though. Does this work?

Bridge harmonyhub:hub:HarmonyHub [
    host="192.168.xxx.xxx"
]
{
     device  shieldtv    [ id=654xxxxx ]
}
1 Like

Ok, tried both without “”
error remains the same

Bridge harmonyhub:hub:HarmonyHub [
    host="192.168.xxx.xxx"
]
{
     device  shieldtv    [ id=654xxxxx ]
}

and

Bridge harmonyhub:hub:HarmonyHub [
    name="HarmonyHub"
]
{
     device  shieldtv    [ id=654xxxxx ]
}

host definitely needs the ", but id doesn’t seem to. And just to confirm: your are filling in the xxx bits with real data?

I presume there’s a reason your trying to do this using files, rather than the recommended discovery via PaperUI?

Yes because it fu*ks me up that I am not able to use textual adding.
I think it’s more flexible with files, all my other bindings are in things files.
I know it works the PaperUI way, but I can’t believe that it’s impossible to get this working.

I am of the same opinion as you.

Hopefully someone will come along and show us the light…

WORD!

Maybe the author of the harmony binding :wink:

Try this one:

Bridge harmonyhub:hub:great [ host="192.168.xxx.xxx", name="Great Room"] {
    device denon [ id=176254, name="Denon AV Receiver"]
}
1 Like
Bridge harmonyhub:hub:HarmonyHub [ host="192.168.xxx.xxx", name="Living Room"] {
    device shieldtv [ id=654xxxxx, name="ShieldTV" ]
}

same error…

@Wolfgang_S do you use it that way, or just guessing?

I use the search function - found this thread and tried to adapt it to your setting. The difference is that in the above mentioned thread the DNS name of the hub is used.

2 Likes

Ok thanks for your help

Reading the thread @Wolfgang_S used your rather WARN message in the log is suggest a bigger problem in parsing the file. I’d try to recreate that file from scratch.
Which editor are you using?

2 Likes

I’m hacking with VSCode

Which should not cause problems. I’d try a new file anyway.

1 Like

Call me stupid - this did the trick - still can’t believe it
everything caused by a corrupt file :see_no_evil:

anyway this is the syntax I finally used:

Bridge harmonyhub:hub:HarmonyHub [ host="192.168.xxx.xxx", name="Living Room"] {
    device  shieldtv     [ id=654xxxxx ]
    device  tv           [ id=585xxxxx ]
    device  cdplayer     [ id=585xxxxx ]
    device  ps3          [ id=585xxxxx ]
    device  avr          [ id=585xxxxx ]
}

thanks to you all for trying to help me :+1:

i’ll go to bed now - it’s late here already…

Dan

1 Like