Open Eddie-BS opened 5 years ago
When it happens, you should check the logs for the Easy server process to see what's going on. Or, if you don't know how to find those logs (it depends on how the process gets started), you can install the nefit-easy-cli
package, which installs a command line tool to access the Nefit Easy. When Domoticz starts logging the error, run easy status
to see if that's getting an error as well.
easy status
Error: MAX_RETRIES_REACHED at queueMessage.catch.e (/usr/lib/node_modules/nefit-easy-cli/node_modules/nefit-easy-core/lib/index.js:179:51) at tryCatcher (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/promise.js:695:18) at _drainQueueStep (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/async.js:138:12) at _drainQueue (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/async.js:131:9) at Async._drainQueues (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/async.js:147:5) at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/nefit-easy-cli/node_modules/bluebird/js/release/async.js:17:14) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5)
That sounds like an issue with your internet connection, or with the internet connection of your Easy.
I am on 100MBit fiber, no problems with "normal" internet traffic as far as I can see. Any suggestion how to debug this ? I did some packet sniffing but did not see strange things.
You can run the CLI tool in "debug logging" mode:
DEBUG=* easy status
This will produce a lot of logging output, but perhaps there's a clue why it's not working.
Also, you can try and run the official (iOS/Android) Easy app to see if that works in these situations.
Robert, tnx for your fast replies ;-)
+2s nefit-easy-core message timed out, retrying... +5ms nefit-easy-core queuing request (retries = 1) +1ms nefit-easy-core sending message +2s and it starts looping until timeout ...
I could post the entire logging but I am not sure if there is any password sensitive data inside
If the iOS app also doesn't respond, and an initial connection can be made, it's most likely the connection between the Easy and the Nefit/Bosch backend that's at fault.
This is how everything is connected:
client (easy CLI or iOS app) ---> Nefit XMPP server <--- your Nefit Easy
So the client connects to the Nefit backend XMPP server, which (because of that initial connection) is working. The Easy itself also connects to the backend server, and maintains a permanent connection. The backend server relays requests and responses between the client and the Easy.
Because your Easy seems to be losing its connection to the backend server, it's not necessarily something I can help out with :(
the moment the connection works, the debug looks fine and the IOS app works... And after a couple of minutes, the connection times out again. Even if I switch my IOS to 4G, it still times out … GRRRRRR tnx for your time anyway
I would expect that when it doesn't work, the Easy shows a "broken connection" icon on its display. Perhaps it's on the edge of what your WiFi-network can reach?
I have it mostly once a day for one time, not so often as Eddie-BS has. Indeed it looks like a connection issues to the Nefit server.
No issues for me, all the graphs in Domoticz are catching up fine.
Note: When Nefit does maintenance or has problems they publish it at https://www.nefit-bosch.nl/pages/easy-actuele-meldingen
Cheers,
Steffen
Robert, I have 3 AP's in my home to make sure there is coverage. I do not see problems with any of the connected clients in the wireless registration tables, CCQ is for almost all devices more than 80%. And YES, there is a broken connection visible, it disappears as the connection gets back online @SteffenAL Sometimes the connections is stable for days, sometimes there is no connection for more than 24 hours … Eddie
Hi Robert,
Had it working for year but suddenly also got the same errors like Eddie. NefitEasy: Error getting http data! No data in domoticz for more than a week now. restart etc did not solve the problem.
Seems like a similar problem as some time ago that was fixed by an update, as I remember correctly. Are there more users with this problem?
Thank you for the support!
Joost
I can't really provide any help with the Easy losing its network connection.
However, I've run into similar issues that people are having with another device, namely Athom's Homey: it seems to be very susceptible to situations where the WiFi network is using two bands (2.4Ghz and 5Ghz) using the same SSID. Both Homey and the Easy can only use 2.4Ghz, and might get confused by WiFi band steering, where a WiFi base station is trying to encourage clients to use the 5Ghz band instead of the 2.4Ghz band (of course, this is only meant for clients that support both bands).
So a few things to try (if possible):
Of course, the first three options are only temporary, to rule out that the problems are actually caused by your particular WiFi setup. If so, the fourth option might be a more permanent solution. Or otherwise, buy a cheap 2.4Ghz WiFi base station for the sole purpose of hosting Easy's network.
Dear Robert,
Now that's a fast reaction! I don't have any issues with my WiFi. It is possible to use my iPhone app to connect to my Easy. So data is stored. Only my Pi is not able to make connection with this data, and none is integrated in Domoticz. Is seems like the same problem as almost a year ago, fixed by the update version of the easyserver. Maybe I am the only one with the current problem, if so it must be something local...
Thanks again!
@Joost996me did you update your RPi recently? If so, check out issue #35 (specifically this comment).
In the pm2 logs I see this info:
events.js:146 throw err; ^
Error: Uncaught, unspecified "error" event. (XMPP authentication failure) at Client.emit (events.js:144:17) at Client._handleAuthState (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-commands/node_modules/nefit-easy-core/node_modules/node-xmpp-client/lib/Client.js:298:10) at Client._handleStanza (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-commands/node_modules/nefit-easy-core/node_modules/node-xmpp-client/lib/Client.js:234:12) at Client.onStanza (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-commands/node_modules/nefit-easy-core/node_modules/node-xmpp-client/lib/Client.js:222:8) at emitOne (events.js:77:13)
No still use the older version Jessie, no buster here yet... Tried to use the issue 35 guide but no according values to be altered...
Where are your errors? 😁
You are too fast for this amateur! See the update message. I get an XMPP failure in the PM2 logs...
trying to learn from this in https://www.domoticz.com/forum/viewtopic.php?f=34&t=23638
nefit-easy-http-server@5.0.2 node -v v10.5.0 npm -v 6.10.3
The XMPP authentication failure points to the use of an invalid serial number or access key argument.
The issues that you're linking to had to do with some backend changes that Nefit made about a year ago, but since you're using the latest version of the Easy server package, that shouldn't be the cause of your problems.
Nothing changed in the file that is holding this values, nor did I alter any of the login variables.
Strange. Seems like the same XMPP problem as stated in the post I mentioned previously. https://www.domoticz.com/forum/viewtopic.php?f=34&t=23638
Could it be something on the sever side of Nefit/Bosch?
I doubt it's a server side issue, because it's working just fine for me. Back in 2018, it stopped working for everyone.
You could install the CLI tool on your RPi, run it in debug mode, and post the logs here. Perhaps that can provide a clue as to why it's not working for you:
npm i nefit-easy-cli -g
DEBUG=* easy --serial=XXX --access-key=YYY --password=ZZZ status
This is what I feared! All alone with my problem ;)
I ll reinstall everything, hope that will solve the problem...
Ok, it me again ... still strugling with the same problems. I discovered following :
Very strange behavior, as stated, I have 3 AP's and about 20 wifi clients, none with any problems.
I read some strange issue about disabling the 5GHz network... I did disable all 5GHz transmitters and now I am running on 2.4GHz only. I realy don't understand WHY the EASY can have problems with 5GHz transmitters but at least it is up for 25min now
let you know, Eddie
@Eddie-BS like I said in my comment: if this is the problem, the Easy isn't the only device that has it.
Of course, it's absolutely annoying, and I doubt that it's the fault of your AP. Although I have 3 AP's myself (Ubiquiti Amplifi HD with two mesh points), and a combined 2.4/5Ghz SSID, and I don't experience any issues.
@robertklep running MikroTik hardware here ... 3x hAP AC (RB962) as AP and a CCR1009 as gateway ... And yes, both frequency's use the same SSID The only thing I did to try to convince clients to go to 5GHz is decreasing the 2.4GHz transmitter power so the 5GHz signal is stronger ... For now all 5GHz still disabled and the easy is connected for 40minutes now
MicroTik is pretty well configurable, right? Perhaps you can disable band steering? Or enable band steering instead of lowering 2.4Ghz TX power?
@robertklep as far as I know MT does not implement "band steering" in ROS ...
Thank you both!
Disabled 5ghz here.
Run the CLI and I think this works.... It returns values. But still no data in domoticz. I used the same login data, so that can't be the fault...
regards j
xmpp:client:session start socket connection +0ms
xmpp:connection setup socket +0ms
xmpp:connection use lazy socket +20ms
xmpp:connection setup stream +6ms
xmpp:connection send:
@Joost996me judging by the output, the CLI is working just fine. Since the CLI and the HTTP server use the same underlying code, I don't see anything other than a configuration issue that's causing the HTTP server to fail.
Since you're using PM2, perhaps it's worthwhile to take that out of the equation and run the HTTP server manually to see if that works. It's basically the same command line as for the CLI, but easy-server
instead of easy
(make sure that you stop PM2 first, otherwise you'll get a TCP bind error).
First stopped the PM2, then started on the CLI:
DEBUG=* easy-server --serial=xxx--access-key=xxx --password=xxx status
Now I get an error message, something with a token on position 1...
internal/modules/cjs/loader.js:169 throw e; ^
SyntaxError: Error parsing /usr/lib/node_modules/nefit-easy-http-server/node_modules/aws-sign2/package.json: Unexpected token * in JSON at position 1
at JSON.parse (
I forgot that the status
argument should be left out, but that's not causing your error. I'm beginning to suspect a hardware issue with your RPi, perhaps the SD card is failing.
Also tried it without the status argument. Same result unfortunately! Can the problem be related to faulty installation of node or npm... ?
Strange because de CLI is working and returning a valid result. Right now I am tryin to reinstall all. But I get a strange fault:
pi@raspberrypi:~$ sudo npm install nefit-easy-http-server -g npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible -- are you offline? npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation. npm WARN checkPermissions Missing write access to /home/pi/nefit-easy-http-server/node_modules/@xmpp/jid
Your help is so much appreciated!
Even a version check gets the same response.
pi@raspberrypi:~$ easy-server -v module.js:130 throw e; ^
SyntaxError: Error parsing /usr/lib/node_modules/nefit-easy-http-server/node_modules/aws-sign2/package.json: Unexpected token * in JSON at position 1
at JSON.parse (
Are you using something like PiHole to block outgoing requests? The installation is failing because it can't reach the NPM repository.
As for the failing write access, try this:
sudo npm install nefit-easy-http-server -g --allow-unsafe
However, given that you're getting some very strange errors, also check out your system logs to see if you're not getting any hardware errors.
@robertklep just to make sure, I am using pi-hole too ... What do I need to whitelist ? I tried to connect my easy to a separate 2.4GHz-only network, now it is even more unstable than it was ... Back to the "normal" situation for now.
@Eddie-BS I doubt that PiHole is causing your Easy problems, because it wouldn't be intermittent (it's either blocked or not, I would assume). But just to rule it out, the Easy needs to be able to access wa2-mz36-qrmzh6.bosch.de
.
Ok, I whitelisted that one, just for sure, it was not in any blacklist I use
Works again here after a reinstall. Thanks Robert for the support!!
@Joost996me oh well, that's good enough for me 😅
@robertklep I got problems as well. Suddenly since exactly 14 days.
First I thought it might be something with my password that changed. My old password didnt fit the policy of Bosch. I adjusted it but nothing.
Whitelisted the URL in PiHole as mentioned above (thought maybe this was caused by latest update).
I can't figure out what changed....
Maybe worth mentioning: i dont use PM2. I directly run the script from a scheduled cron-job.
nodejs: v10.16.3 easy-server 5.02
@chrislader that sort of error does suggest an incorrect password. There are a few limitations to passwords, I believe a maximum length of 10 characters (but might be less) and no "special" characters (!
, #
, ?
, etc).
I know the official app accepts most of these, and longer passwords, but it might replace them with something else and truncates the password.
@chrislader that sort of error does suggest an incorrect password. There are a few limitations to passwords, I believe a maximum length of 10 characters (but might be less) and no "special" characters (
!
,#
,?
, etc).I know the official app accepts most of these, and longer passwords, but it might replace them with something else and truncates the password.
Hi Robert,
I thought this was the case. However; Nefit has a new policy which obligates to have a special caracter included in the password.
1 main capital letter; H 1 normal letter: h 1 number: 1 1 special character: !
So kinda stuck here then. I can't change the password to anything without a special character! My_Nefit site wont let me. I guess for everyone the policy is the same...
Edit: the funny story is; the Nefit easy APP (iOS) still works with the old password! So apparantly the app doesnt check either the password when you you are already 'logged in'
Have you tried changing the password from the mobile app? If that also doesn't work without special characters, try using relatively safe characters like _
, -
, @
, .
If the iOS app still works with the old password, it's actually using that old password, because it needs it to encrypt and decrypt data.
Have you tried changing the password from the mobile app? If that also doesn't work without special characters, try using relatively safe characters like
_
,-
,@
,.
If the iOS app still works with the old password, it's actually using that old password, because it needs it to encrypt and decrypt data.
Hahaha. What a joke. I got it working again.
So apparantly the app allows a LESS STRICT password policy compared to the website (where you are being directed to to change the password).
Fix was: change password by using iOS app. Stay away from My_Nefit easy website...
Thanks a lot Robert. You are a hero.
@chrislader nice :) the app hasn't been updated for ages so it's still using the old password policy.
@chrislader nice :) the app hasn't been updated for ages so it's still using the old password policy.
Yes. Actually I was hoping when they introduced the new smart thermostate Nefit 'EasyControl' to include a new app which supports Nefit Easy as well....
https://www.bosch-easycontrol.com/nl/nl/easycontrol/overzicht/
@robertklep
Again problems. I don't think it has anything to do with your script tbh. Yesterday it just quit on me. Nothing changed. Suddenly no connection anymore...
Am i the only where the nefit servers look unreliable?
I'm not seeing any problems (although I'm using the Home Assistant component, but there are some reconnect issues with that component so when the connection gets lost, I notice it straight away because the component is throwing errors, and it hasn't for a while now).
Same here ... Lots of 2019-08-29 17:43:16.131 Error: NefitEasy: Error getting http data! 2019-08-29 17:45:20.200 Error: NefitEasy: Error getting http data! 2019-08-29 17:45:50.235 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 17:45:54.259 Error: NefitEasy: Error getting http data! 2019-08-29 17:46:04.238 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 17:47:58.325 Error: NefitEasy: Error getting http data! 2019-08-29 17:48:42.383 Error: NefitEasy: Error getting http data! 2019-08-29 17:50:36.452 Error: NefitEasy: Error getting http data! 2019-08-29 17:52:40.521 Error: NefitEasy: Error getting http data! 2019-08-29 18:00:17.889 Error: NefitEasy: Error getting http data! 2019-08-29 18:01:51.959 Error: NefitEasy: Error getting http data! 2019-08-29 18:05:28.810 Error: NefitEasy: Error getting http data! 2019-08-29 18:06:32.881 Error: NefitEasy: Error getting http data! 2019-08-29 18:08:06.947 Error: NefitEasy: Error getting http data! 2019-08-29 18:10:11.035 Error: NefitEasy: Error getting http data! 2019-08-29 18:12:46.526 Error: NefitEasy: Error getting http data! 2019-08-29 18:13:50.586 Error: NefitEasy: Error getting http data! 2019-08-29 18:14:54.646 Error: NefitEasy: Error getting http data! 2019-08-29 18:16:08.709 Error: NefitEasy: Error getting http data! 2019-08-29 18:17:32.777 Error: NefitEasy: Error getting http data! 2019-08-29 18:19:36.849 Error: NefitEasy: Error getting http data! 2019-08-29 18:21:10.916 Error: NefitEasy: Error getting http data! 2019-08-29 18:23:48.276 Error: NefitEasy: Error getting http data! 2019-08-29 18:24:52.334 Error: NefitEasy: Error getting http data! 2019-08-29 18:36:53.366 Error: NefitEasy: Error getting http data! 2019-08-29 18:38:27.431 Error: NefitEasy: Error getting http data! 2019-08-29 18:40:01.496 Error: NefitEasy: Error getting http data! 2019-08-29 18:41:05.557 Error: NefitEasy: Error getting http data! 2019-08-29 18:45:16.341 Error: NefitEasy: Error getting http data! 2019-08-29 18:46:50.401 Error: NefitEasy: Error getting http data! 2019-08-29 18:47:20.790 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 18:47:24.461 Error: NefitEasy: Error getting http data! 2019-08-29 18:47:34.793 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 18:49:28.505 Error: NefitEasy: Error getting http data! 2019-08-29 18:54:36.635 Error: NefitEasy: Error getting http data! 2019-08-29 18:56:40.709 Error: NefitEasy: Error getting http data! 2019-08-29 18:58:44.778 Error: NefitEasy: Error getting http data! 2019-08-29 19:00:18.829 Error: NefitEasy: Error getting http data! 2019-08-29 19:00:52.888 Error: NefitEasy: Error getting http data! 2019-08-29 19:00:57.909 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 19:01:56.943 Error: NefitEasy: Error getting http data! 2019-08-29 19:04:01.013 Error: NefitEasy: Error getting http data! 2019-08-29 19:06:05.083 Error: NefitEasy: Error getting http data! 2019-08-29 19:08:09.150 Error: NefitEasy: Error getting http data! 2019-08-29 19:10:13.217 Error: NefitEasy: Error getting http data! 2019-08-29 19:10:57.279 Error: NefitEasy: Error getting http data! 2019-08-29 19:12:51.347 Error: NefitEasy: Error getting http data! 2019-08-29 19:14:55.417 Error: NefitEasy: Error getting http data! 2019-08-29 19:17:25.894 Error: NefitEasy: Error getting http data! 2019-08-29 19:19:29.967 Error: NefitEasy: Error getting http data! 2019-08-29 19:20:54.038 Error: NefitEasy: Error getting http data! 2019-08-29 19:22:08.101 Error: NefitEasy: Error getting http data! 2019-08-29 19:28:49.246 Error: NefitEasy: Error getting http data! 2019-08-29 19:29:53.307 Error: NefitEasy: Error getting http data! 2019-08-29 19:31:27.369 Error: NefitEasy: Error getting http data! 2019-08-29 19:33:31.434 Error: NefitEasy: Error getting http data! 2019-08-29 19:40:42.966 Error: NefitEasy: Error getting http data! 2019-08-29 19:41:47.032 Error: NefitEasy: Error getting http data! 2019-08-29 19:42:51.096 Error: NefitEasy: Error getting http data! 2019-08-29 19:44:55.163 Error: NefitEasy: Error getting http data! 2019-08-29 19:54:17.237 Error: NefitEasy: Error getting http data! 2019-08-29 19:55:21.299 Error: NefitEasy: Error getting http data! 2019-08-29 19:57:25.371 Error: NefitEasy: Error getting http data! 2019-08-29 20:00:30.644 Error: NefitEasy: Error getting http data! 2019-08-29 20:01:04.705 Error: NefitEasy: Error getting http data! 2019-08-29 20:01:04.749 Error: Nefit Easy hardware (4) thread seems to have ended unexpectedly 2019-08-29 20:02:08.768 Error: NefitEasy: Error getting http data! 2019-08-29 20:03:52.835 Error: NefitEasy: Error getting http data! 2019-08-29 20:04:46.899 Error: NefitEasy: Error getting http data! Someone suggested that we might be polling that server too much ... ??? Eddie
Hi, I see a lot of 2019-08-14 08:57:35.560 Error: NefitEasy: Error getting http data! 2019-08-14 08:58:59.636 Error: NefitEasy: Error getting http data! in my domoticz logging, sometimes they disappear after a couple of hours, sometimes they disappear after I restart the RPI. This happens a couple of times each week … Is there any way to debug this to see what is going on ? It would be nice to fix this
Eddie