Nefit Easy: Error: INVALID_RESPONSE [solved]

For heating/cooling related questions in Domoticz

Moderator: leecollings

Post Reply
dewagt
Posts: 10
Joined: Thursday 19 February 2015 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by dewagt »

I installed the nefit server

npm i nefit-easy-http-server -g

started it

created the Nefit Easy HTTP server over LAN interface

But when checking:

curl http://127.0.0.1:3000/bridge/ecus/rrc/uiStatus

I got the next messages:
Error: INVALID_RESPONSE
at pending.(anonymous function).send.then.e (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:211:21)
at tryCatcher (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)

I unplugged the nefit easy, (reset) but this didn't work.

In domoticz I got the next messages in the log:
2017-02-09 21:29:38.890 Error: NefitEasy: Invalid data received (main)!
2017-02-09 21:30:09.088 Error: NefitEasy: Invalid data received! (Press)
2017-02-09 21:30:09.285 Error: NefitEasy: Invalid data received! (Gas)
2017-02-09 21:31:09.592 Error: NefitEasy: Invalid data received (main)!

Someone ideas how to solve this?

I have another question. According to Nefit, they don't save anything on their server, only some information about me, and the installation. So if some information is requested it should come from the easy. Some people got the information after resetting the easy, so seems to be right. But don't I need the IP adres of the easy in the settings? Or is that handled by the nefit server?
Last edited by dewagt on Friday 10 February 2017 10:47, edited 1 time in total.
1x RPi B+
1x RFXcom433e
KAKU: 1x APA3-1500R (3 switches), 4x AMST-606, 1x ASUN-650, 1x AFR-060, 1x AFR-100
ELRO: 4x AB400
ELRO: 4x COCO GDR2-1000R
Wether: 3x Xiron outdoormeters, Alecto 4500, Alecto 1700
Doorbells: 2x action
LG-tv, Yamaha-receiver
SweetPants

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by SweetPants »

Posting your question in two topic's won't speedup the process :D :D :D

Sure you have set your environment variables?

NEFIT_PASSWORD=<password>
NEFIT_ACCESS_KEY=<your access key>
NEFIT_SERIAL_NUMBER=<your nefit serialnumber>
jannl
Posts: 625
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by jannl »

And if you start the server through a script, make sure the variables are set in the script, as well as the correct path to the needed binaries
dewagt
Posts: 10
Joined: Thursday 19 February 2015 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by dewagt »

I didn't use the environment variables, but a script with:

#!/bin/bash
/usr/bin/easy-server --serial=your-serial --access-key=your-access --password=your-password --host=127.0.0.1 >/dev/null
1x RPi B+
1x RFXcom433e
KAKU: 1x APA3-1500R (3 switches), 4x AMST-606, 1x ASUN-650, 1x AFR-060, 1x AFR-100
ELRO: 4x AB400
ELRO: 4x COCO GDR2-1000R
Wether: 3x Xiron outdoormeters, Alecto 4500, Alecto 1700
Doorbells: 2x action
LG-tv, Yamaha-receiver
dewagt
Posts: 10
Joined: Thursday 19 February 2015 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by dewagt »

I saw I had an typo in my password. It didn't change the message on the curl, but the strange thing is, I see now in my domoticz log the next message:

Error: NefitEasy: Error getting http data!
1x RPi B+
1x RFXcom433e
KAKU: 1x APA3-1500R (3 switches), 4x AMST-606, 1x ASUN-650, 1x AFR-060, 1x AFR-100
ELRO: 4x AB400
ELRO: 4x COCO GDR2-1000R
Wether: 3x Xiron outdoormeters, Alecto 4500, Alecto 1700
Doorbells: 2x action
LG-tv, Yamaha-receiver
dewagt
Posts: 10
Joined: Thursday 19 February 2015 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by dewagt »

After some trial and error I managed to get more error information.

127.0.0.1 - - [10/Feb/2017:09:11:03 +0000] "GET /bridge/ecus/rrc/uiStatus HTTP/1.1" 500 1597 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/602.38 (KHTML, like Gecko) Chrome/55.0.44959.0 Safari/602.37"
Error: Invalid character in statusMessage.
at ServerResponse.writeHead (_http_server.js:195:11)
at ServerResponse.writeHead (/usr/lib/node_modules/nefit-easy-http-server/node_modules/on-headers/index.js:55:19)
at ServerResponse._implicitHeader (_http_server.js:157:8)
at ServerResponse.OutgoingMessage.end (_http_outgoing.js:571:10)
at ServerResponse.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/response.js:205:10)
at app.use (/usr/lib/node_modules/nefit-easy-http-server/lib/cli/server.js:46:18)
at Layer.handle_error (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/layer.js:71:5)
at trim_prefix (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/index.js:310:13)
at /usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/index.js:280:7
at Function.process_params (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/index.js:330:12)
at Immediate.next (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/index.js:271:10)
at Immediate.<anonymous> (/usr/lib/node_modules/nefit-easy-http-server/node_modules/express/lib/router/index.js:618:15)
at runCallback (timers.js:651:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
SyntaxError: Unexpected token � in JSON at position 0
at Object.parse (native)
at pending.(anonymous function).send.then.e (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:222:28)
at tryCatcher (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:510:31)
at Promise._settlePromise (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:567:18)
at Promise._settlePromise0 (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:612:10)
at Promise._settlePromises (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/promise.js:691:18)
at Async._drainQueue (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues (/usr/lib/node_modules/nefit-easy-http-server/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
1x RPi B+
1x RFXcom433e
KAKU: 1x APA3-1500R (3 switches), 4x AMST-606, 1x ASUN-650, 1x AFR-060, 1x AFR-100
ELRO: 4x AB400
ELRO: 4x COCO GDR2-1000R
Wether: 3x Xiron outdoormeters, Alecto 4500, Alecto 1700
Doorbells: 2x action
LG-tv, Yamaha-receiver
dewagt
Posts: 10
Joined: Thursday 19 February 2015 10:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE

Post by dewagt »

After some trial and error I retyped the complete script. Now it's working. Probably there was some character which can't be seen in the code. Now it's working correctly in domoticz.

The curl still gives a INVALID_RESPONSE. So maybe that's not the correct way to test your connection. :D
1x RPi B+
1x RFXcom433e
KAKU: 1x APA3-1500R (3 switches), 4x AMST-606, 1x ASUN-650, 1x AFR-060, 1x AFR-100
ELRO: 4x AB400
ELRO: 4x COCO GDR2-1000R
Wether: 3x Xiron outdoormeters, Alecto 4500, Alecto 1700
Doorbells: 2x action
LG-tv, Yamaha-receiver
SweetPants

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by SweetPants »

Nothing wrong with the curl command when i execute it on my system

curl http://127.0.0.1:3000/bridge/ecus/rrc/uiStatus

{"id":"/ecus/rrc/uiStatus","type":"uiUpdate","recordable":0,"writeable":0,"value":{"CTD":"2017-02-10T11:17:35+00:00 Fr","CTR":"room","UMD":"clock","MMT":"20.0","CPM":"auto","CSP":"31","TOR":"off","TOD":"0","TOT":"17.0","TSP":"21.0","IHT":"20.80","IHS":"ok","DAS":"off","TAS":"off","HMD":"off","ARS":"init","FPA":"off","ESI":"off","BAI":"CH","BLE":"false","BBE":"false","BMR":"false","PMR":"false","RS":"off","DHW":"on","HED_EN":"false","HED_DEV":"false","FAH":"false","DOT":"false","HED_DB":""}}
Joost996me
Posts: 18
Joined: Sunday 12 February 2017 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by Joost996me »

Same problem here...Followed all the steps in https://www.domoticz.com/wiki/NefitEasy

but he pm2 logs remain empty... And also no data in Domoticz

2017-02-12 15:20:03.542 Error: NefitEasy: Error getting http data!


The script nefiteasyhttpserver.sh. No typo's...

#!/bin/bash
/usr/bin/easy-server --serial=xx --access-key=xx --password=xxx --host=127.0.0.1 >/dev/null

help is much appreciated!!!
SweetPants

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by SweetPants »

Joost996me wrote: #!/bin/bash
/usr/bin/easy-server --serial=xx --access-key=xx --password=xxx --host=127.0.0.1 >/dev/null
Assume you did a chmod +x /usr/bin/easy-server and the same for your start-script??
Joost996me
Posts: 18
Joined: Sunday 12 February 2017 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by Joost996me »

Works like a charm here!
Joost996me
Posts: 18
Joined: Sunday 12 February 2017 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by Joost996me »

Unfortunately no connection again for more than a week now. Nothing changed in the configuration but in the log is see a lot of: Error: NefitEasy: Error getting http data!

Reboots did not solve the problem. Am I the only one with this sudden problem? The easy can be reached with to iPhone app so it doesn't seem a Easy connection problem.

Thanks
Geitje
Posts: 170
Joined: Monday 22 January 2018 21:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy: Error: INVALID_RESPONSE [solved]

Post by Geitje »

I get an http error now and then, but not often.

What version of Debian do you use? Seems the newest version (Buster) has issues with the nefit Easy HTTP server, due to SSL changes. Check here. And then paragraph on "Problems on recent Linux distributions".

Else: can you check the output of the server using the terminal?

Code: Select all

curl http://127.0.0.1:3000/bridge/ecus/rrc/uiStatus
Domoticz beta, on Raspberry Pi 3B, Raspian Buster
Zwave, Zigate, RFlink etc.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest