[BUG] ReferenceError http header 500

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
Wikibear
Posts: 102
Joined: 01 Jul 2016 14:10

[BUG] ReferenceError http header 500

Post by Wikibear »

I try to access via curl like your faq told me on your website:

http://192.168.0.5:8083/ZWaveAPI/Run/de ... y_3-0-49-3

I get: "ReferenceError: ZWayVDev_zway_3 is not defined"
The header response is 500 Internal Server Error.

How can i solve this?
Greatings from the noob
añep
Posts: 64
Joined: 10 May 2016 13:53

Re: [BUG] ReferenceError http header 500

Post by añep »

Wikibear wrote:I try to access via curl like your faq told me on your website:

http://192.168.0.5:8083/ZWaveAPI/Run/de ... y_3-0-49-3

I get: "ReferenceError: ZWayVDev_zway_3 is not defined"
The header response is 500 Internal Server Error.

How can i solve this?
It's possible you needs first login:

LOGIN:

Code: Select all

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"form":true,"login":"youruserlogin","password":"yourpassword.","keepme":false,"default_ui":1}' http://192.168.0.5:8083/ZAutomation/api/v1/login -c cookie.txt
YOUR REQUEST:

Code: Select all

curl -s -LN --globoff http://192.168.0.5:8083/ZWaveAPI/Run/devices/ZWayVDev_zway_3-0-49-3 -b cookie.txt
Wikibear
Posts: 102
Joined: 01 Jul 2016 14:10

Re: [BUG] ReferenceError http header 500

Post by Wikibear »

But if you are not logged in you get an error with login. Not 500 this is an internal server error.
Greatings from the noob
añep
Posts: 64
Joined: 10 May 2016 13:53

Re: [BUG] ReferenceError http header 500

Post by añep »

Wikibear wrote:But if you are not logged in you get an error with login. Not 500 this is an internal server error.

You try:

Code: Select all

http://192.168.0.5:8083/ZAutomation/api/v1/devices/ZWayVDev_zway_3-0-49-3
Wikibear
Posts: 102
Joined: 01 Jul 2016 14:10

Re: [BUG] ReferenceError http header 500

Post by Wikibear »

Jep, then there is truly a bug. Than i must get an error not Logged In not an 500 message. ;) If i'm not logged in i get 401 error normally.
Greatings from the noob
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: [BUG] ReferenceError http header 500

Post by PoltoS »

The problem was that /ZWaveAPI/Run/devices/ZWayVDev_zway_3-0-49-3 was a worng URL. Even logged it it is worng.

As stated above, use /ZAutomation/api/v1/devices/ZWayVDev_zway_3-0-49-3
Post Reply