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

zones not calling channelLinked #46

Closed
boc-tothefuture opened this issue Jun 25, 2017 · 11 comments
Closed

zones not calling channelLinked #46

boc-tothefuture opened this issue Jun 25, 2017 · 11 comments

Comments

@boc-tothefuture
Copy link

@digitaldan (I think you wrote the zone code? if not maybe its @craigham )-
I am not sure if this is an actual issue or I just need a second set of eyes here. I am NEVER seeing channelLinked called for zones. I set the breakpoint, add a zone using things and items config. It looks like this:

Bridge omnilink:controller:home [ ipAddress=“baz”, port=4369, key1=“foo”, key2=“bar” ] {
   omnilink:thermostat:downstairs "Downstairs Thermostat" @ "Foyer" [ number=1 ]
   //Doors
   omnilink:zone:23 "Garage Door 1" @ "Garage" [number=23]
}

In items I have this

//Doors
Contact Zones_Garage_Door1_Status  "Status: [%s]" { channel="omnilink:zone:23:zone_contact" }

Do either of you see the same behavior? I don't see this behavior in thermostats or audio zones (only things I have migrated so far). The net result is that when openhab is restarted I have no status for my zones.

When the state of the door changes, the event is fired and the handler does get called to update the status.

@craigham
Copy link

@boc-tothefuture i won't be able to check before Sat.

@boc-tothefuture
Copy link
Author

No problem. Maybe @digitaldan can validate my sanity. :-)

@digitaldan
Copy link

I'll take a look, my zones all load fine, but I don't manage my Things in files, only items and sitemaps, so that might be a clue why its working different.

@boc-tothefuture
Copy link
Author

Took another look at this. channelLinked is called when the item is added from the paper UI but not from a things file. I will try and understand what could/would be different about that behavior.

@boc-tothefuture
Copy link
Author

So this works:

omnilink:zone:home:23 "Garage Door 1" @ "Garage" [number=23]

But adding that third element is not required for thermostats or rooms. Still looking at why it is for zones.

@boc-tothefuture
Copy link
Author

I am going to rescind my previous comment, even with the third element in its not calling channelLinked - there was some leftover cruft from when I was messing with paperUI that was confusing me.

@digitaldan
Copy link

When adding things within a bridge, should it not look like:

Bridge omnilink:controller:home [ ipAddress=“baz”, port=4369, key1=“foo”, key2=“bar” ] {
  thermostat downstairs "Downstairs Thermostat" @ "Foyer" [ number=1 ]
   //Doors
  zone 23 "Garage Door 1" @ "Garage" [number=23]
}

@boc-tothefuture
Copy link
Author

@digitaldan -
I gave that a try, the issue still persists.

@digitaldan
Copy link

So strange, I'm sure there's a typo somewhere, I'll take a look at it on Thursday or Friday when I have a free moment.

@boc-tothefuture
Copy link
Author

Ok, I also opened a thread on the community forum to ask.

@boc-tothefuture
Copy link
Author

Ok. So there were a couple of issues that I tracked down by stepping through the linking of objects.
The error was in the items file, I was referencing the type_id not the channel id. I had to change it from zone_contact to contact.
This works as expected:
Contact Zones_Garage_Door1_Status "Status: [%s]" { channel="omnilink:zone:home:garage1:contact" }

Closing this issue.

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

No branches or pull requests

3 participants