Nefit Easy™

Others (MiLight, Hue, Toon etc...)
SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Thursday 07 June 2018 20:56

What easy-server version are you running? easy-server -v should give 4.0.1
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

JoeneH
Posts: 17
Joined: Saturday 24 February 2018 14:43
Target OS: NAS (Synology & others)
Domoticz version: v3.8153
Location: NL
Contact:

Re: Nefit Easy™

Post by JoeneH » Thursday 07 June 2018 22:21

easy-server -v gives the following

module.js:540
throw err;
^

Error: Cannot find module '@xmpp/connection'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-commands/node_modules/nefit-easy-core/lib/index.js:6:25)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-commands/node_modules/nefit-easy-core/index.js:1:80)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)

JoeneH
Posts: 17
Joined: Saturday 24 February 2018 14:43
Target OS: NAS (Synology & others)
Domoticz version: v3.8153
Location: NL
Contact:

Re: Nefit Easy™

Post by JoeneH » Friday 08 June 2018 18:10

There seems to be another / multiple problems.

checking the npm version by typing npm config get prefix
gave the following message
/volume1/@appstore/Node.js_v8/usr/local


╭─────────────────────────────────────╮
│ │
│ Update available 5.6.0 → 6.1.0 │
│ Run npm i npm to update │
│ │
╰─────────────────────────────────────╯

So, running the npm i npm
gave the following error:

npm WARN saveError ENOENT: no such file or directory, open '/volume1/homes/admin/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/volume1/homes/admin/package.json'
npm WARN admin No description
npm WARN admin No repository field.
npm WARN admin No README data
npm WARN admin No license field.

+ npm@6.1.0
added 682 packages in 144.545s

Probably I have messed up some things?

JoeneH
Posts: 17
Joined: Saturday 24 February 2018 14:43
Target OS: NAS (Synology & others)
Domoticz version: v3.8153
Location: NL
Contact:

Re: Nefit Easy™

Post by JoeneH » Friday 08 June 2018 22:26

I removed the nefit easy http server, pm2 and npm (all via Putty access) and removed Node.js V8 (via synology package center)
checking with node -v, npm -v, nothing there.

Install Node.js V8 via package center
node -v v8.9.4
npm -v v5.6.0

Then npm i nefit-easy-http-server -g
gives
npm WARN checkPermissions Missing write access to /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules
and telling me to try run it as root/Administrator

so it try sudo npm i nefit-easy-http-server -g
gives
/volume1/@appstore/Node.js_v8/usr/local/bin/easy-server -> /volume1/@appstore/Node.js_v8/usr/local/lib/node_modules/nefit-easy-http-server/bin/easy-server
+ nefit-easy-http-server@4.0.1
added 122 packages in 51.474s

checking:
easy-server -v
Command not found

:shock:

Any ideas what went wrong?

ps the same goes for npm i pm2 -g
will nt install due to write access
using sudo it installs into /volume1/@appstore/Node.js_v8/usr/local/bin/
and checking says command not found...

SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Sunday 10 June 2018 12:45

I'm afraid i can't help you anymore as I do not use/own a Synology NAS but Ubuntu 16.04. In general removing all old node, npm and easy-server stuff and re-installing it should fix the problem.
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

pa3gmi
Posts: 10
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Dinteloord Netherlands
Contact:

Re: Nefit Easy™

Post by pa3gmi » Monday 11 June 2018 21:03

Hi I have the following problem I use a Raspberry B with msata disk running Domoticz so far no problem. But when I install Nefit Easy(it works great, all 10 sensors) the processor activity is higher and higher beginning with 1.5 % and every day 1 % higher. I have looked to the tasks and the Node task is making the high activity. I am not a Unix expert, and 69 years old, never to old to learn something. But I would ask, have someone an idea?

SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Tuesday 12 June 2018 13:39

pa3gmi wrote:
Monday 11 June 2018 21:03
Hi I have the following problem I use a Raspberry B with msata disk running Domoticz so far no problem. But when I install Nefit Easy(it works great, all 10 sensors) the processor activity is higher and higher beginning with 1.5 % and every day 1 % higher. I have looked to the tasks and the Node task is making the high activity. I am not a Unix expert, and 69 years old, never to old to learn something. But I would ask, have someone an idea?
node is Java based and Java based applications are "famous" of taking a lot of CPU and memory. But I run on Ubuntu and have 4Gb memory and 2 Atom CPU's. I have been running the easy-server for as long as it exists, but do not see any significant CPU increase for days/weeks/months. Maybe search the internet or node user forums if this is a known issue. At least is does not sound as a Domoticz issue.
My 2cents, Harry
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

pa3gmi
Posts: 10
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Dinteloord Netherlands
Contact:

Re: Nefit Easy™

Post by pa3gmi » Wednesday 13 June 2018 8:13

Hi Harry,

You are right that it is not an Domoticz item, with only Domotics and a my sensors gateway an RF-link Gateway no problems at all, so there must be something in the easy-server that make my pi upset. Is there a Nefit easy server forum? i can't find it.

wlang
Posts: 1
Joined: Thursday 14 June 2018 20:17
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Nefit Easy™

Post by wlang » Thursday 14 June 2018 20:30

SweetPants wrote:
Tuesday 12 June 2018 13:39
pa3gmi wrote:
Monday 11 June 2018 21:03
Hi I have the following problem I use a Raspberry B with msata disk running Domoticz so far no problem. But when I install Nefit Easy(it works great, all 10 sensors) the processor activity is higher and higher beginning with 1.5 % and every day 1 % higher. I have looked to the tasks and the Node task is making the high activity. I am not a Unix expert, and 69 years old, never to old to learn something. But I would ask, have someone an idea?
node is Java based and Java based applications are "famous" of taking a lot of CPU and memory. But I run on Ubuntu and have 4Gb memory and 2 Atom CPU's. I have been running the easy-server for as long as it exists, but do not see any significant CPU increase for days/weeks/months. Maybe search the internet or node user forums if this is a known issue. At least is does not sound as a Domoticz issue.
My 2cents, Harry
I have sinds last month also problems with memory ans CPU use then Nefit-easy services is running.
After 1 of 2 day the services crasht and must be restart with "PM2 restart 0"
Image
Image
(On 8 jun the services crasht, 10 jun I reboot the RBP, 14 Jun the services crasht also)

I use node v6.14.3 and easy-server 4.0.1 and pm2 v2.10.4

Have somebody a idea to resolve this problem?

SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Friday 15 June 2018 19:04

pa3gmi wrote:
Wednesday 13 June 2018 8:13
Is there a Nefit easy server forum? i can't find it.
This is the author of the easy-server, maybe he can help you https://github.com/robertklep/nefit-easy-http-server
BTW, i'm using the same node version and easy-server version as you do and have no problems on Ubuntu Linux. You are on Raspberry, maybe there is an issue there?
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

pa3gmi
Posts: 10
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Dinteloord Netherlands
Contact:

Re: Nefit Easy™

Post by pa3gmi » Saturday 16 June 2018 15:18

Hi,

I see more people having problems with that, I use node -v (versie 10.4.1)
npm -v (6.1.0) easy-server -v (4.0.1) pm2 -v=2.10.4 and Raspbian stretch kernel 4.14

Another thing I see today, in the hour gas log I see 0.012 m3 gas at 7 o clock in the morning, further no usage. In the day gas log I See 2.203 m3

Rien

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

Re: Nefit Easy™

Post by peerke72 » Sunday 17 June 2018 18:05

i have the same memory and cpu issues as mentioned above

when i open putty and connect to my rpi, and type:
pm2 logs 0 --lines 1000
i get the eror message below several times

does anybody else also see these errors?

could this be a reason why the memory and cpu consumption is increasing?

0|nefiteas | (node:571) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'write' of null
0|nefiteas | at Promise (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:307:19)
0|nefiteas | at new Promise (<anonymous>)
0|nefiteas | at Client.write (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:305:12)
0|nefiteas | at Client.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/connection/index.js:292:17)
0|nefiteas | at Client.Connection.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:15:15)
0|nefiteas | at Client.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/@xmpp/client-core/lib/Client.js:18:18)
0|nefiteas | at Object.queue.add [as promiseGenerator] (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:125:19)
0|nefiteas | at Queue._dequeue (/usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:153:30)
0|nefiteas | at /usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:109:18
0|nefiteas | at new Promise (<anonymous>)
0|nefiteas | at Queue.add (/usr/lib/node_modules/nefit-easy-http-server/node_modules/promise-queue/lib/index.js:94:16)
0|nefiteas | at NefitEasyCommands.queueMessage (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:122:23)
0|nefiteas | at NefitEasyCommands.send (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:197:17)
0|nefiteas | at queueMessage.catch.e (/usr/lib/node_modules/nefit-easy-http-server/node_modules/nefit-easy-core/lib/index.js:201:19)
0|nefiteas | at <anonymous>
0|nefiteas | (node:571) 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: 6405)

SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Sunday 17 June 2018 18:13

Can you start the easy-server without pm2? I do not use pm2 and do not experience these problem(s)
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

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

Re: Nefit Easy™

Post by peerke72 » Sunday 17 June 2018 18:25

i used the instruction in the wiki to install nefiteasy (https://www.domoticz.com/wiki/NefitEasy)
how should i start it without pm2
(if pm2 is not the method to use, should the wiki be modified?)

SweetPants
Posts: 2256
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.10007
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by SweetPants » Sunday 17 June 2018 19:11

peerke72 wrote:
Sunday 17 June 2018 18:25
(if pm2 is not the method to use, should the wiki be modified?)
just start you easy-server using:

/usr/bin/easy-server --host=127.0.0.1 --serial=<your serial> --access-key=<your access key> --password=<your password>
Ubuntu 16.04.3 LTS, Intel NUC, MySensors 2.3.0-alpha, Pro Mini 3.3/8M RFM69(HW), ESP8266 (SDK2.2.0), Sonoff, RFLink, RFXcom, MQTT, NodeRed, Domoticz Beta (from source)

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

Re: Nefit Easy™

Post by peerke72 » Sunday 17 June 2018 21:03

thanks! i'll try that.

to autostart nefit easy server after a reboot i've added it to /etc/rc.local with:

sudo nano /etc/rc.local
and added the command you provided
/usr/bin/easy-server --host=127.0.0.1 --serial=<your serial> --access-key=<your access key> --password=<your password>

now fingers crossed and wait if the cpu and memory consumption get back to normal

edit:

unfortunately the memory consumption is still increasing

but the error i posted before (UnhandledPromiseRejectionWarning: Unhandled promise rejection.)
seems to be investigated by robert klep (author of the easy server)
https://github.com/robertklep/nefit-easy-core/issues/14

pa3gmi
Posts: 10
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version: 4.9700
Location: Dinteloord Netherlands
Contact:

Re: Nefit Easy™

Post by pa3gmi » Wednesday 27 June 2018 9:00

I have had contact with the author Robert Klep and he wrote me the following message:

""I'm afraid someone familiar with Domoticz internals has to take a look at this, because I'm all out of ideas.
To give an idea on where I'm at now:
• I've ruled out that merely running the HTTP-server is the problem, because I've been running one for weeks now and haven't noticed any increasing CPU-usage;
• Having the HTTP-server perform periodic (30s) updates: the HTTP-server mentioned in the previous item did just that. Not a problem.
• Running the core code for a long time on restricted hardware: I have a Homey that's running the Nefit Easy app, which also performs periodic requests to the backend (using the same core code as the HTTP server). My Homey typically has an uptime measured in weeks. Not a problem. Homey is also more restricted in terms of hardware than an RPi, so that's not a cause either.
• All issues regarding increasing CPU usage are from people running Domoticz, so I think it's fair to say that there's some weird interaction between Domoticz and the HTTP server that's causing this.
I'm not familiar with Domoticz at all, so I have no idea how it handles requests to the HTTP-server (including timeouts, scheduling, error-handling, etc).
""
So Are there more people who has the problem of getting higher an higher cpu usage? and what is your configuration.
Mine is:
Raspberrypi B with a lan connection to my router.
Raspbian stretch with desktop release 2018-04-18
node -v (versie 10.4.1)
npm -v (6.1.0)
easy-server -v (4.0.1)
libpython3.4-dev

I have pm2 completely removed.
When I disconnect the easy-server in the hardware the processor usage is getting direct to normal, for me 1.5%

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

Re: Nefit Easy™

Post by peerke72 » Wednesday 27 June 2018 21:09

I'm also still experiencing the same problems, and hoped the investigations of robert klep would fix the issue

configuration

Raspberry Pi reference 2018-04-18 (9 (stretch))
node -v v8.11.3
npm -v 6.1.0
easy-server -v (4.0.1)

as mentioned above in my previous post i don't use pm2 to run the nefit easy server (but i didn't remove pm2)



when i look at the pi memory historychart the increase of memory (and also the increased cpu usage) started around 29th may
so i asume something changed around that date in domoticz or in the nefit easy server package or at bosch/nefits webservice (or a combination of them)?

@others when started the memory and cpu increase for you?

when i look at the release date of easy-server 4.0.0 was 29th may and 4.0.1 was 30th may
it looks there could be a relation ...

maybe the reason for the new easy-server releases was a change at bosch/nefits webservice.
and somehow the fix doesn't work in combination with domoticz :cry:

what todo to get this fixed?

edit:
i also tried what happened when i disable easy server in the hardware menu.
and indeed the cpu percentage and memory consumption are returning back to normal values

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

Re: Nefit Easy™

Post by martk » Thursday 28 June 2018 11:48

My memory and cpu also goes up. I never used pm2, so that's not the problem I think. I did start to use pm2 as my internet connection isn't perfect, and when it's down I need to restart the easy server, which I'm able to do now with a lua script and pm2.

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

Re: Nefit Easy™

Post by peerke72 » Thursday 28 June 2018 17:13

i added as temporay workaround a dummy switch
with an 'on action': http://127.0.0.1:8080/json.htm?type=com ... tem_reboot
and scheduled that this switch is enabled each night at 4 o'clock to reboot my RPi
offcourse it's a uggly :oops: workaround but i hope this will avoid my RPi / domoticz run out off resources

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests