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: 7
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: 7
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests