Page 1 of 1

[BUG] ReferenceError http header 500

Posted: 03 Jul 2016 23:07
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?

Re: [BUG] ReferenceError http header 500

Posted: 04 Jul 2016 15:09
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

Re: [BUG] ReferenceError http header 500

Posted: 04 Jul 2016 18:40
by Wikibear
But if you are not logged in you get an error with login. Not 500 this is an internal server error.

Re: [BUG] ReferenceError http header 500

Posted: 04 Jul 2016 20:45
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

Re: [BUG] ReferenceError http header 500

Posted: 04 Jul 2016 20:51
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.

Re: [BUG] ReferenceError http header 500

Posted: 31 Jul 2016 01:43
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