Nefit Easy™

Others (MiLight, Hue, Toon etc...)
Geitje
Posts: 7
Joined: Monday 22 January 2018 22:52
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by Geitje » Monday 09 July 2018 9:28

Any solutions to this problem? I have this issue for some weeks now, and follow these threads curiously. However solving seems to stagnate now? I experience the CPU spikes now and then, and every half hour or so the "nefit hardware thread has stopped" message in log. Every 2-3 weeks domoticz crashes.
I have updated Node, Nefit server and latest beta of Domoticz. Anyone working on this issue still?
Domoticz latest beta, on Raspberry Pi

peerke72
Posts: 9
Joined: Sunday 17 June 2018 17:59
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by peerke72 » Monday 16 July 2018 21:49

i (temporay) removed nefit easy http server from my raspberry pi and disabled it also in domoticz in the hardware menu.
domoticz is running as smooth as before ...

but i still wonder why this problem only seems to occur with the combination of
- domoticz
- nefit easy http server
- raspberry pi

and further based on the information of robert klep (see https://github.com/robertklep/nefit-easy-core/issues/14)
it could also depends on how often a Nefit Easy is offline.

maybe it's depending on the (in)stability of the internet/modem connection
so users with a very stable internet connection maybe don't have any issues.

btw my ziggo ubee wifi modem isn't known for it's stability ...
my nefit easy is connected to a seperate wifi router
but maybe there is a relationship with the issue.

for now i don't need to use my heating (today 30 degrees celcius outside pfff) so i can disable nefit easy server
that way domoticz stays running very stable without strange behaviour caused by nefit easy
but before we now it it's freezing again ...

i'm out of options ...
who can help?

mickmack82
Posts: 2
Joined: Wednesday 31 January 2018 16:04
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by mickmack82 » Wednesday 25 July 2018 10:03

Maybe I've found something in the errorlog of PM2 we can use to solve the issue.
The errorlog of PM2 is flooded with the following message:

Code: Select all

(node:29044) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'write' of null
    at Promise (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:307:19)
    at new Promise (<anonymous>)
    at Client.write (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:305:12)
    at Client.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:292:17)
    at Client.Connection.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:15:15)
    at Client.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/client-core/lib/Client.js:18:18)
    at Object.queue.add [as promiseGenerator] (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:125:19)
    at Queue._dequeue (/usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:153:30)
    at /usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:109:18
    at new Promise (<anonymous>)
    at Queue.add (/usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:94:16)
    at NefitEasyCommands.queueMessage (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:122:23)
    at NefitEasyCommands.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:197:17)
    at queueMessage.catch.e (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:201:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:29044) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3088)
No Idea what the problem is... but something isn't going as expected.
I also experience more and more CPU and memory usage over time with domoticz. Maybe nodejs is encoutering a loop which takes more and more resources like a memory leak?

-Update-
Currently running a modified debug version of nefit-easy-core as provided by Robert. I'll let it know if things improve.

peerke72
Posts: 9
Joined: Sunday 17 June 2018 17:59
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by peerke72 » Friday 10 August 2018 18:39

i've been on holiday for a few weeks.
did installing the 'debug version' improve things or give some usefull log information ?

i see on robert klep's site https://github.com/robertklep/nefit-easy-core/issues/14
that he's still looking into some issues.
maybe they are related to our problem.

martk
Posts: 29
Joined: Monday 14 March 2016 14:10
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by martk » Wednesday 15 August 2018 21:36

My memory and cpu usage is also extreme lately.

I use a workaround to fix this until robert or domoticz has a solution.

Every night at 03:00 I start a script to restart the nefit easy server with LUA:

(script_time_blabla)

Code: Select all

if (os.date("%H:%M") == "03:00") then
	print("Nefit Easy Server wordt opnieuw gestart!")
	os.execute("/home/pi/domoticz/scripts/restarteasy.sh")
end
The script contains:

Code: Select all

sudo -u pi /usr/bin/pm2 restart nefiteasy

This way my domoticz won't hang after 2-3 weeks.

peerke72
Posts: 9
Joined: Sunday 17 June 2018 17:59
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by peerke72 » Monday 20 August 2018 21:24

Robert Klep released a new beta version.

This seems to make cpu consumption and memory consumption stable again.
It's still a beta version but it works a lot better for me.

More details can be found on: https://github.com/robertklep/nefit-eas ... -414141929

edit1: 21-8-2018, version 5.02 is now final and released, so @all please check if it solves also your problems.

edit2: 26-8-2018, i'm running the new version about week now and it's still running stable

jurgen
Posts: 36
Joined: Friday 02 October 2015 19:09
Target OS: NAS (Synology & others)
Domoticz version: stable
Contact:

Re: Nefit Easy™

Post by jurgen » Sunday 16 September 2018 17:02

Hi All,

Previously i had some issues with Nefit on my synology with version DSM 6.1.7-15284 Update 2 while my old DSM version 6.0.2 has no issues.

XMPP Authentication failure, so i decided to update nefit with npm update neftit-easy-http-server -g but it get's worse.

After that Nefit won't even start anymore.

Then updated NODE JS and NPM to the following versions

node -v v8.9.4
npm -v 5.6.0

but without any luck.

Then i decided to remove everything, NPM,node and nefit and rebooted the NAS.

Then i installted node js 8.9.4 and NPM 5.6.0 and installed nefit again. The installation seems fine, but nefit won't start.

-ash: ./easy-server: No such file or directory

So i went to /usr/local/bin and saw that the symbolic link was not removed during the uninstallation process. Normally this is not a problem but the link linked to something does not exist anymore.

root@DS411:/usr/local/bin# ls -l
total 12
lrwxrwxrwx 1 root root 58 Sep 14 15:25 easy-server -> ../lib/node_modules/nefit-easy-http-server/bin/easy-server

So i removed the symbolic link and created a new one.

root@DS411:/usr/local/bin# ln -s /volume1/@appstore/Node.js_v8/usr/local/bin/easy-server easy-server

and Nefit is started again!

root@DS411:/usr/local/etc/rc.d# netstat -a|grep 3000
tcp 0 0 localhost:3000 0.0.0.0:* LISTEN

Hopefully this will help other people.


For further information see my old tutorial:
https://www.domoticz.com/wiki/Synology# ... _DSM_6.0.2

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests