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

doorlock CommandClass - openHAB item not notified #1

Open
rolo2130 opened this issue Apr 28, 2017 · 5 comments
Open

doorlock CommandClass - openHAB item not notified #1

rolo2130 opened this issue Apr 28, 2017 · 5 comments

Comments

@rolo2130
Copy link

I'm having an issue with the state update commands sent to my openhab switch item.

[2017-04-28 13:05:46.113] [I] [core] Notification: warning (module): Observer not notified - openHAB item: zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98 (HTTP Status: 400 - Bad Request - State could not be parsed: close). Failed request: http://192.168.2.164:8080/rest/items/zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98/state with body: close
[2017-04-28 13:05:46.134] [I] [core] openHAB item not notified FrontDoor_Lock

My item definition is:

// front door
Switch FrontDoor_Lock (Doors) {channel="zway:zwayDevice:192_168_2_144:6:doorlock-ZWayVDev_zway_6-0-98"}

It seems that the SWITCH item will only accept ON or OFF as a state, not open or close. I tested this via the rest API and was able to reproduce the error. This issue prevents updates to my openhab item via Z-Way and eventually cause my openhab item state to change to UNDEF. I'm new to posting to git so feel free to request info. Thanks.

@pathec
Copy link
Owner

pathec commented Apr 29, 2017

This device type requires a different type: Contact instead of Switch.

Please follow the description if Items are created manually.

@rolo2130
Copy link
Author

rolo2130 commented Apr 29, 2017

Patrick

Thank you for your response, and thank you for the work you have put into the Z-Way binding. It is the core of my automated home :). In reference to my post, I tried changing the item type to CONTACT prior to posting, but the result was the same. After your post, I tried again. I changed my OpenHab item to the following:

// front door
Contact FrontDoor_Lock (Doors) {channel="zway:zwayDevice:192_168_2_144:6:doorlock-ZWayVDev_zway_6-0-98"}
I then reset my bindings through the karaf console and checked the Z-Way server OpenHAB Connector to make sure the observer was still present. It was listed as 'unknown', but it was registered. I changed the state of the lock from the Z-Way server via the SmatHome UI. The result was the same. Below is the z-way-server.log entry.
[2017-04-29 10:47:30.783] [I] [core] Notify openHAB item ... [2017-04-29 10:47:30.783] [I] [core] OpenHAB server found [2017-04-29 10:47:30.783] [I] [core] http://192.168.2.164:8080/rest/items/FrontDoor_Lock/state [2017-04-29 10:47:30.785] [I] [core] Notify openHAB item ... [2017-04-29 10:47:30.786] [I] [core] OpenHAB server found [2017-04-29 10:47:30.786] [I] [core] http://192.168.2.164:8080/rest/items/zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98/state [2017-04-29 10:47:30.825] [I] [core] openHAB item not notified FrontDoor_Lock [2017-04-29 10:47:30.834] [I] [core] Notification: warning (module): Observer not notified - openHAB item: FrontDoor_Lock (HTTP Status: 400 - Bad Request - State could not be parsed: open). Failed request: http://192.168.2.164:8080/rest/items/FrontDoor_Lock/state with body: open [2017-04-29 10:47:30.834] [I] [core] openHAB item not notified zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98 [2017-04-29 10:47:30.846] [I] [core] Notification: warning (module): Observer not notified - openHAB item: zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98 (HTTP Status: 400 - Bad Request - State could not be parsed: open). Failed request: http://192.168.2.164:8080/rest/items/zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98/state with body: open
The below image is a snapshot of the OpenHAB connector on the Z-Way server.

image

Changing the OpenHAB item to CONTACT prevents control via my OpenHAB sitemap. I would guess this is correct behavior as a CONTACT is an input device and by default should only read status. In addition, I reviewed the documentation prior to implementing the Z-Way binding and assigned the SWITCH item as referred to in the documentation. See below snapshot from the Z-Way Binding documentation for reference.

image

Let me know if you need any additional info. Again, awesome job on the binding and thank you for the time you put in.

-RoLo

pathec added a commit that referenced this issue Apr 30, 2017
@pathec
Copy link
Owner

pathec commented Apr 30, 2017

Thanks for the hint. I was wrong. I updated the Z-Way App (openHAB Connector) and loaded a new version (0.1.5) into the App Store. Can you try the new version please. Many Thanks!

@rolo2130
Copy link
Author

Awesome!! I will test today and let you know how it turns out.

@rolo2130
Copy link
Author

Great Job!! I updated the OpenHAB Connector to version 0.1.5 then restarted the Z-Way binding on my OpenHAB server. All Z-Way items successfully registered. I then sent a few commands to the Front Door lock. The OpenHAB COnnector successfully notified OpenHAB of the change. See the log snapshot below.
[2017-04-30 14:12:22.568] [I] [core] Notify openHAB item ... [2017-04-30 14:12:22.568] [D] [zway] RECEIVED ACK [2017-04-30 14:12:22.570] [I] [core] OpenHAB server found [2017-04-30 14:12:22.570] [I] [core] http://192.168.2.164:8080/rest/items/zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98/state [2017-04-30 14:12:22.572] [D] [zway] RECEIVED: ( 01 04 01 13 01 E8 ) [2017-04-30 14:12:22.573] [D] [zway] SENT ACK [2017-04-30 14:12:22.574] [I] [core] Notify openHAB item ... [2017-04-30 14:12:22.574] [I] [zway] Job 0x13 (Security, Door Lock Operation Get): Response received - transfered to encapsulated jobs [2017-04-30 14:12:22.575] [D] [zway] Delivered to Z-Wave stack [2017-04-30 14:12:22.575] [D] [zway] Delivered to Z-Wave stack [2017-04-30 14:12:22.575] [I] [core] OpenHAB server found [2017-04-30 14:12:22.576] [I] [core] http://192.168.2.164:8080/rest/items/FrontDoor_Lock/state [2017-04-30 14:12:22.643] [I] [core] openHAB item successully notified zway_zwayDevice_192_168_2_144_6_doorlock_ZWayVDev_zway_6_0_98

Again, I can't say enough, great work.

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

2 participants