This page last changed on Nov 03, 2015 by sek.

Hi,

I am new here and I've a forbidden error.

ERROR [Polling thread for sensor: Sensor Rolluik status]: ClientProtocolException when executing HTTP method
org.apache.http.client.HttpResponseException: Forbidden
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:67)
at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:54)
at org.openremote.controller.protocol.http.HttpGetCommand.requestURL(HttpGetCommand.java:238)
at org.openremote.controller.protocol.http.HttpGetCommand.run(HttpGetCommand.java:260)
at java.lang.Thread.run(Thread.java:744)

I created a user "anonymous" and role "Anonymous User" as advised on http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Z-Wave+with+Razberry

Also I added my devices into the room "devices" and added to user "anonymous".

Part of In controller.xml:

<command id="18" protocol="http">^M
<property name="pollingInterval" value="30s" />^M
<property name="method" value="GET" />^M
<property name="url" value="http://192.168.1.195:8083/ZWaveAPI/Run/devices2.instances0.SwitchBinary.data.level.value" />^M
<property name="name" value="Rolluik status" />^M
</command>^M

Still I get the above error ?
Did I forget something ?

Regards, sek

Hi,

I think jou use the wrong url.

You should use http://IP:8083/OpenRemote/Command/N/I/param

See: https://forum.z-wave.me/viewtopic.php?f=3424&t=20819

Second you should check the role of anonymous.
Maybe it is has become admin role in stead of anonymous rule.

Succes!

Posted by sek at Nov 08, 2015 08:20

The error seems to indicate an authentication problem, which is strange since you did follow the instructions on the HowTo. What version of Zway do you use?

In addition I think you should not use SwitchBinary here. "Rolluik" sounds like something multilevel
So if used through the OpenRemote interface of Zway try:

http://192.168.1.195:8083/OpenRemote/SwitchMultilevelStatus/2

note: You may leave out the instance parameter I if the device has only one instance

Be aware there still are problems with authentication between OR and ZWay

Posted by pz1 at Nov 08, 2015 08:59

Thank you for your reply.


The user anonymous had the admin role.
Hmmm ... I don't know why but I changed it to the anonymous role.

I changed also the http requests.

Everything is now working
(well, almost everything

"Rolluik" is a window blind.


I changed the http request to "SwitchMultilevelStatus" as suggested.

But it doesn't update to the lastest status.
The polling every 30s doesn't change the status.

It is only correct after restarting "controller".

Any ideas about this ?
And how about the authentication ? Will there be an update soon ?

Posted by sek at Nov 11, 2015 16:02

Have you tried with a webbrowser the URL I gave?

Posted by pz1 at Nov 11, 2015 16:11

hi PZ1,

If I run

curl http://192.168.1.195:8083/OpenRemote/SwitchMultilevelStatus/2/0

(or from within a browser)

I do get "off" (the quotes included !). In this case "off" means closed.

The z-way-server.log does not tell anything.
So (I think) the status comes direct from the z-way memory.

When opening the blind by hand (not by openremote) I see communication between z-way-server and the device in the z-way-server.log.

curl http://192.168.1.195:8083/OpenRemote/SwitchMultilevelStatus/2/0

gives now "on" (quotes included !).

So the communication between the blind and z-way works fine.

The blind takes 24s to open and close. I changed already these device setting (time to open/time to close).

My question is why the polling in openremote does not work. What did I forget ?
I created a sensor with the command "Rolluik status".

– part of controller.xml —
...
<sensors>^M
<sensor id="107670839" name="Sensor Rolluik status" type="switch">^M
<include type="command" ref="53" />^M
<state name="on" />^M
<state name="off" />^M
</sensor>^M
<sensor id="107671936" name="Rolluik stand" type="level">^M
<include type="command" ref="54" />^M
</sensor>^M
...
<command id="53" protocol="http">^M
<property name="pollingInterval" value="30s" />^M
<property name="method" value="GET" />^M
<property name="url" value="http://192.168.1.195:8083/OpenRemote/SwitchMultilevelStatus/2/0" />^M
<property name="name" value="Rolluik status" />^M
</command>^M
...

Openremote controller doesn't give any erros when I try to debug:
export CONTROLLER_CONSOLE_THRESHOLD=ALL
export CONTROLLER_STARTUP_LOG_LEVEL=ALL

Any suggestions ? Are the quotes a problem ?

Regards.

Posted by sek at Nov 12, 2015 15:59

Since I don't have this device nor dimmers I am lost here.

Apparantly the device does return a boolean result, and not an analog value to reflect the position.

A binary switch does not accept quoted values. So in your http command use the following in the RegEx field:

on|off

One more suggestion to see if you really shutdown the security wall

Close all your browsers. Next open one again, but do not login to your smarthome. Then in the browser paste the http command:

http://192.168.1.195:8083/OpenRemote/SwitchMultilevelStatus/2/0

It should return the status values

Posted by pz1 at Nov 13, 2015 08:09

Hi PZ1,

Sorry for the very late reply.
Everything works fine now.

The problem seems to be the quotes around on an off.

I created a sensor type custom and added Name=off, Value="off" and Name=on, Value="on"
Then I created a switch which uses the above sensor with the commands "open" and "close".

Thank you for your help.

Posted by sek at Jan 17, 2016 16:03

Thanks for the feedback. I appreciate!

Posted by pz1 at Jan 17, 2016 18:36
Document generated by Confluence on Jun 05, 2016 09:33