Closed Heinz9 closed 4 months ago
Please test the GitHub version
Just installed v0.0.15. I need two or three days to give you feedback. Meanwhile many thanks Heinz
Installed v0.0.15 of the myStrom adapter. Problem unfortunately remains the same / no success. To backup my original post; I get (I measure every 3 seconds and build "max | min | average” over the last 10 measurements (30 seconds):
status | min | max | average |
---|---|---|---|
after restart of myStrom adapter | 23% | 51% | 41% |
~12h after restart of adapter | 49% | 99% | 74% |
~18h after restart of adapter | 59% | 99% | 80% |
~30h after restart of adapter | 52% | 105% | 95% |
I did the same several times and always got similar numbers back. This includes complete restart of a) the complete system and b) ioBroker. As stated, only restarting the myStrom adapter is required and makes a difference... (however only for a certain time) Aside; When comparing the io.mystrom.0 vs iobroker.js-con load and other ioBroker processes, myStrom typically consumes the highest load (apart from the ioBroker.js-con process), even when comparing with e.g. io.hm-rega.0 or alike. All smartswitches and buttons are configured for update every 60 seconds (mystrom.0.xxxxxxxxxxxxxxxx.localUpdateInterval). The myStrom process remains about at the same level over time.
Any help / any thoughts / additional input to further investigate?
Thanks Heinz
Please activate debug log to check if somethings happen when cpu is high
I tried to analyse the log (including debugging info) below. I also attach the debug log for 15 minutes (generated about now when the overall cpu consumption of the “iobroker.js-con” process alone exceeds 80% on average and the certitude that ioBroker will stop working within the next four to six hours… In addition I attach the errors since I enabled debug mode this morning where you can follow the increase of all error messages. My considerations when looking at the log-entries: Four devices are MyStrom buttons. These are only very seldomly online and for a short moment, when a button is pressed. I got initially every minute warnings in the log for those buttons asking me to add hostnames (No Ip for: MAC_ADDRESS. Please add an ipAddress to fetch local information). This however doesn’t really make sense for buttons, that are not always online. However, I added them and now get errors, that these devices aren’t reachable (the case for devices within the address range 192.168.11.45 .. 48), which is obvious. And adding them had no influence on the increasing CPU load. I now get an error instead of the previous warning… My general observation regarding the CPU consumption looks to be somewhere related to the fact, that the amount of identical error messages issued per minute increases over time even if myStrom devices and ioBroker are completely left “untouched”. Below are some samples that illustrate the increase of errors over time (you can follow these also in the error log) Errors seen (with the adapter started around midnight (00:00): Error: socket hang up errors are issued several times per minute (all within one second). When enabling debug mode
Error: read ECONNRESET are shown about every 3 minutes. If so then just before or between the messages Error: socket hang up
Error: connect EHOSTUNREACH 192.168.11.xxx:80 are issued for every myStrom button per minute. Also the amount of these messages increases. Following examples:
Error: connect EPIPE 192.168.11.xxx:80
Warning: No commands found for: wbpuse defaults warnings are very seldom and where they appear, there are always four of them (think that these are associated with the buttons)
Any help that brings me a step further is more than appreciated Thanks Heinz mystrom_debug_20240420_1845-1900.log
I did a fix in the GitHub version please retest
Hello and thanks for your prompt response. Somehow I'm stuck with getting the latest version. As I did not see it on GitHub, I simply tried to install (after removing adapter version 0.0.15):
install iobroker.mystrom@0.0.16
If I interprete the response (below) correctly, then I lack pulling the right adapter.... Sorry to out myself obviously as still a novice lacking the knowhow to pull your latest version. Please point me to the correct command that installs the fixed version.
Thanks for your patience Heinz
Response provided when trying to install the above:
NPM version: 10.2.4
Installing iobroker.mystrom@0.0.16... (System call)
npm ERR! code ETARGET
npm ERR! notarget No matching version found for iobroker.mystrom@0.0.16.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in: /opt/iobroker/.npm/_logs/2024-04-20T19_02_49_491Z-debug-0.log
host.iobroker Cannot install iobroker.mystrom@0.0.16: 1
version is still 0.0.15 commit hash 8ec685e6c7e65525640b47443f90bc83c574f635
Reinstalll via GitHub and you are fine
Thanks for the directions. Installed and being observed. Do you again need the debug log or are you fine with warnings / errors? I will get back with feedback either Tomorrow late or during Monday.
Meanwhile thanks for your super fast and speedy response :-) Heinz
Debug is better
Attached is the debugging report of the last 15’ with your fix of yesterday installed. As you can see, the many error messages disappeared. And I can confirm, that the CPU load of the [iobroker.js-con] process did no longer increase since I implemented the fix. Super job done in almost no time. Thanks a lot.
As an aside: I see about every 30’ the following three entries in the log (see below), which seem to be associated with myStrom buttons. These messages (in particular the warning) and the logic that is executed behind make in my view no sense, as buttons are normally never online (unless they provide their status update to the cloud or when a button is pressed). Should we simply ignore these messages or do you want me to open a separate issue?
Thanks again and have a nice weekend mystrom.log
Heinz (sent from Switzerland with snow everywhere around the house...)
instance | timestamp | level | message |
---|---|---|---|
mystrom.0 | 2024-04-21 12:18:47.700 | warn | No commands found for: wbpuse defaults |
mystrom.0 | 2024-04-21 12:18:47.490 | info | Device Offline. To bring buttons online press double and hold for 8 seconds until it blinks green. |
mystrom.0 | 2024-04-21 12:18:47.489 | debug | {"status":"error","error":"device.offline"} |
This error should appear only once with v0.1.0
That's perfect. Then I'll wait for v0.1.0 and say thanks again. Heinz
Hello all I’m running a ioBroker in a Docker environment on a small Ubuntu system. My problem is, that ioBroker (within 1-2 days) gets extremely slow (web access response times of over 1' become the norm). Only remedial action is then to stop and restart ioBroker manually (as after a certain time no reaction over the web was given at all. The diagnosis of ioBroker is "unremarkable". Only thing strange in my eyes is the process "iobroker.js-con", whose CPU "consumption" increases continuously after a restart and after a certain time on average (not peak) hijacks around 100% CPU performance for this single process. Without a running myStrom instance, the CPU share of “ iobroker.js-con” remains around 30% on average (between approx. 10% and with peaks of approx. 100%). With the myStrom adapter turned on, this value climbs continuously until "nothing works". Attempts to stop the instance or display the status of ioBroker may fail with various error messages but NOT always. It seems to be a timeout question Below the errors (if I get them; sorry, I could not pack everything between code-tags...):
Connection is closed. Uncaught Rejection: Error: Objects DB is not allowed to start in the current Multihost environment at Redis.<anonymous> (/opt/iobroker/node_modules/@iobroker/db-objects-redis/build/lib/objects/objectsInRedisClient.js:493:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Unable to subscribe to evicted Keyspace events from Redis Server: Connection is closed. Unable to subscribe to meta namespace "meta." changes: Connection is closed. Server Cannot start inMem-objects on port 9001: Failed to lock DB file "/opt/iobroker/iobroker-data/objects.jsonl"! root@iobroker:/opt/iobroker# iobroker stop mystrom No connection to databases possible ... /opt/iobroker/node_modules/standard-as-callback/built/index.js:6
throw e; ^Error: Connection is closed. at close (/opt/iobroker/node_modules/ioredis/built/redis/event_handler.js:184:25) at Socket.<anonymous> (/opt/iobroker/node_modules/ioredis/built/redis/event_handler.js:151:20) at Object.onceWrapper (node:events:632:26) at Socket.emit (node:events:517:28) at TCP.<anonymous> (node:net:350:12)
Emitted 'error' event on ScanStream instance at: at /opt/iobroker/node_modules/ioredis/built/ScanStream.js:38:22 at tryCatcher (/opt/iobroker/node_modules/standard-as-callback/built/utils.js:12:23) at /opt/iobroker/node_modules/standard-as-callback/built/index.js:33:51 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v18.19.1
It took me a while to find the suspect in the MyStrom adapter. I can stop it (or kill it); then restart it; afterwards the system runs smoothly again for a while and the CPU "consumption" stays within normal range first. As long as the system is still responding, I can restart the instance via the GUI. If not, only killing / restarting the io.mystrom.0 process helps. With this "half-knowledge" I built a simple Blockly, which stops and restarts this instance every night. This works and keeps ioBroker happy. But that's not supposed to be the definitive solution... In total I have 10 MyStrom smartswitches and 4 MyStrom buttons installed. I have already massively reduced the refresh times (switches every 3' and buttons only every 5' down from the default). What additional information do you need to be able to help me? Below is the "DIAG" information: Details
Summary