Upgrade 2.1.1 Problem HTTP-Device

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
elRedeo
Posts: 15
Joined: 21 Aug 2015 14:11

Upgrade 2.1.1 Problem HTTP-Device

Post by elRedeo »

Hi,

after upgrading to 2.1.1 when I try call :
http://192.168.0.152:8083/JS/Run/contro ... cs:weather")
i got in the z-way-log:
[core] Can not make request: Forbidden

Can anybody give me a hint?


kind regards
el Redeo
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Upgrade 2.1.1 Problem HTTP-Device

Post by pz1 »

ref: Q&A

You can work around the need for authentication with the following steps:

Create a room named devices, and assign all ZWay devices to that room
Create a user named anonymous with role anonymous
Edit user anonymous and allow access to room devices

note: Obviously you can place the devices in the rooms where they really are and give anonymous rights to those rooms. Whatever suits you best
elRedeo
Posts: 15
Joined: 21 Aug 2015 14:11

Re: Upgrade 2.1.1 Problem HTTP-Device

Post by elRedeo »

OK, understood, but not reasonable to me.
To set about 36 Devices and Apps into one room ist not a very funny job and I lost the overview over the devices.
Is there another possibitliy to give the permissions?
When where this 'feature' integrated? So I can go back to the latest version without this security thing.
pz1
Posts: 2053
Joined: 08 Apr 2012 13:44

Re: Upgrade 2.1.1 Problem HTTP-Device

Post by pz1 »

This is only the quick solution. Obviously you can place them in the rooms where they really are and give anonymous rights to those rooms. Whatever suits you best
elRedeo wrote:When where this 'feature' integrated?
IIRC, authentication was introduced in v2.0.1, but it was enforced in one of the v2.0.2 release candidates. It is not just a feature, but a necessary characteristic of any serious home automation product.
elRedeo wrote:Is there another possibitliy to give the permissions?
From FAQ
How to execute API commands via HTTP API?

To use HTTP API you need to authenticate and then pass particular command to the server.

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"form": true, "login": "admin", "password": "admin", "keepme": false, "default_ui": 1}' 192.168.0.62/ZAutomation/api/v1/login -c cookie.txt


curl 192.168.0.62/ZAutomation/api/v1/devices/ZWayVDev_zway_6-0-37/command/on -b cookie.txt
elRedeo
Posts: 15
Joined: 21 Aug 2015 14:11

Re: Upgrade 2.1.1 Problem HTTP-Device

Post by elRedeo »

Ok, what IDo not understand:
Calling a module outsode of rasperry pi from my computer to the device is working fine.
Insode raspberry, calling the device to get the values will ntvwork and I got the denied messge.
This os strange for security reasons,beceause the roles are swaped! Outside should be asked and/or denied for access, not, not from onsode the maschine. Yes, I Understood, cookies.....

And for the FAQ, them the http device is useless for internal request.
Post Reply