HTTP Parse Error on ZWaveAPI
Posted: 20 Feb 2016 14:26
Hi. For my homegrown domotics I need to access ZWaveAPI from node.js on the local Pi.
For example, my domotics server runs :
var request = require('request');
request.get('http://127.0.0.1:8083/ZWaveAPI/Run/devi ... 32].Set(1)', {
'auth': { 'user': 'admin', 'pass': 'xxxxx' }
},function(error,response,body){ console.log(error) }
)
The result is :
{ [Error: Parse Error] bytesParsed: 193, code: 'HPE_UNEXPECTED_CONTENT_LENGTH' } !
This is in Raspian Jessie Lite on Pi Model 2 B. Z-way version 2.2.0. (Have tried older versions, same result.) Tried both node versions 4.3.0 and 5.6.0.
The very same node.js code run from another Pi (only changing the target IP) does work fine ! So I exclude an authentication issue. That other Pi is Model B, runs Wheezy and node 0.12.6 ; those are the only differences between both systems I can think of.
An older setup on the local Pi 2 B using Wheezy and node 0.12.6 did work fine (localhost, no authentication).
Pointing the node sample code to a url on a different http server on localhost also works fine, so no issue with loopback interface. It seems specific to ZWaveAPI.
I can't figure out that error message. Does it point to anything ?
Is there a known issue with ZWaveAPI (perhaps related to localhost /Jessie ?)
For example, my domotics server runs :
var request = require('request');
request.get('http://127.0.0.1:8083/ZWaveAPI/Run/devi ... 32].Set(1)', {
'auth': { 'user': 'admin', 'pass': 'xxxxx' }
},function(error,response,body){ console.log(error) }
)
The result is :
{ [Error: Parse Error] bytesParsed: 193, code: 'HPE_UNEXPECTED_CONTENT_LENGTH' } !
This is in Raspian Jessie Lite on Pi Model 2 B. Z-way version 2.2.0. (Have tried older versions, same result.) Tried both node versions 4.3.0 and 5.6.0.
The very same node.js code run from another Pi (only changing the target IP) does work fine ! So I exclude an authentication issue. That other Pi is Model B, runs Wheezy and node 0.12.6 ; those are the only differences between both systems I can think of.
An older setup on the local Pi 2 B using Wheezy and node 0.12.6 did work fine (localhost, no authentication).
Pointing the node sample code to a url on a different http server on localhost also works fine, so no issue with loopback interface. It seems specific to ZWaveAPI.
I can't figure out that error message. Does it point to anything ?
Is there a known issue with ZWaveAPI (perhaps related to localhost /Jessie ?)