Nefit Easy™

Others (MiLight, Hue, Toon etc...)
SweetPants
Posts: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (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: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (source)

pa3gmi
Posts: 5
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version:
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: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (source)

pa3gmi
Posts: 5
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version:
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: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (source)

pa3gmi
Posts: 5
Joined: Monday 11 June 2018 20:48
Target OS: Raspberry Pi
Domoticz version:
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: 3
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: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (source)

peerke72
Posts: 3
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: 2084
Joined: Friday 12 July 2013 21:24
Target OS: Linux
Domoticz version: V4.9701
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 (source)

peerke72
Posts: 3
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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests