Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No creating und writing of values in object list #139

Open
holgerble opened this issue Sep 28, 2023 · 5 comments
Open

No creating und writing of values in object list #139

holgerble opened this issue Sep 28, 2023 · 5 comments
Labels

Comments

@holgerble
Copy link

Since the last update of the systeminfo adapter, the system values are no longer read out or entered in the adapter's object list.
Even after installing a second systeminfo adapter, no more objects are created.
It is a Raspi 4, everything is up to date.
Iobroker, node-js and npm are the latest version recommended for PI 4.
Does anyone have a tip for me?

Last protokoll
2023-09-28 17:54:00.012 - debug: systeminfo.1 (20550) Aussentemp received '21.2'
2023-09-28 17:54:00.014 - debug: systeminfo.1 (20550) MS TypeError: this._extendObject is not a function at MyAdapter.extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2051:21) at /opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:431:96 at new Promise () at MyAdapter.extendObject (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:430:20) at MyAdapter.makeState (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:667:21) at setItem (/opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:467:14) at /opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:594:58 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@mcm1957
Copy link
Member

mcm1957 commented Sep 29, 2023

Please add version information:

adapter:
js-controller:
admin:
node:
O/S:

@holgerble
Copy link
Author

system-info 1.1.0
js-controller 5.0.12
admin 6.10.1
node 18.18.0
Raspi 4 with 4 gb
OK:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
OK:3 http://giteduberger.fr rpimonitor/ InRelease
OK:4 https://apt.grafana.com stable InRelease
OK:5 https://deb.nodesource.com/node_18.x nodistro InRelease
OK:6 https://repos.influxdata.com/debian stable InRelease

@holgerble holgerble changed the title No reading off No reading/writing of values in object list Sep 29, 2023
@holgerble holgerble changed the title No reading/writing of values in object list No creating und writing of values in object list Oct 1, 2023
@holgerble
Copy link
Author

No tip for me ???
Adapter worked for several years..
Start is locking o.k... found several items...
but NO OBJECTS ARE CREATED !!!


systeminfo.1 2023-10-01 16:05:48.871 info Adapter systeminfo.1 started and found 14/109 items/states to process.
systeminfo.1 2023-10-01 16:05:38.330 info Startup Systeminfo Adapter systeminfo.1: { startup: '#\n' + '#gpio mode 1 output\n' + '#rpi: echo none >/sys/class/leds/led0/trigger\n' + '#echo none >/sys/class/leds/green_led/trigger', items: [ { name: 'System.Temperature', type: 'file', source: '/sys/class/thermal/thermal_zone0/temp', regexp: '', conv: 'number', role: 'value.temperature|°C', write: '', sched: ':/2' }, { name: '-System.Memory_[used, free, available]', type: 'exec', source: 'free -k', regexp: 'Mem\:\s+\d+\s+(\d+)\s+(\d+)\s+\d+\s+\d+\s+(\d+)', conv: '@/1000', role: 'number|MB', write: '', sched: '1 * * * * ' }, { name: '-TestSystem.processes.[command/pcpu]', type: 'info', source: 'processes', regexp: "list[?(@.user == 'pi')]", conv: '', role: '', write: '', sched: ':2' }, { name: '-XS2.[name/value]', type: 'web', source: "http://xs1/control.html'", regexp: {"l[?(@.value !== null )]": {"l[tr]": { '![@.children()]':0, name: {_eq:1}, value: {_eq:2, _conv:"parseInt(@.slice(0,-1))"}}, _filter: ($) => $[0].childNodes.length==3}}, conv: 'html', role: '', write: '', sched: ':*:*/20' }, { name: 'MSFT.[*]', type: 'web', source: 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=MSFT&apikey=demo', regexp: '[1:2][0:1]', conv: 'json', role: 'number', write: '', sched: '19:10:10' }, { name: 'System.[Mem_used, Mem_free, Swap_used]', type: 'info', source: 'mem', regexp: '[used,free,swapused]', conv: 'parseInt(@*(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: '*:/1' }, { name: 'System.Software.[*]', type: 'info', source: 'osInfo', regexp: '', conv: '', role: 'string', write: '', sched: '*/3:58' }, { name: 'System.Software.[*]', type: 'info', source: 'versions', regexp: '', conv: '', role: 'string', write: '', sched: '*/3:58' }, { name: 'System.FileSystem.[fs/use]', type: 'info', source: 'fsSize', regexp: '*', conv: '', role: 'number|%', write: '', sched: '*/3:58' }, { name: 'System.FileSystem.IO_[Read,Write]', type: 'info', source: 'fsStats', regexp: '[rx,wx]', conv: 'parseInt(@*(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: '*:/1' }, { name: 'System.Network.[iface/]', type: 'info', source: 'networkInterfaces', regexp: '*', conv: '', role: '', write: '', sched: '*/3:58' }, { name: 'System.Network.Connections.[name/value]', type: 'info', source: 'networkConnections', regexp: "[*][!(@.localaddress == @.peeraddress ? null : {name:${@.protocol}:${@.localaddress.replace(/\./g,'')}:${@.localport}, value:${@.state}:${@.peeraddress}:${@.peerport}`})]", conv: '', role: 'string', write: '', sched: '*:/1' }, { name: 'System.Network.MB[Received,Sent]', type: 'info', source: 'networkStats', regexp: '[rx,tx]', conv: 'parseInt(@(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: ':/1' }, { name: 'System.Network.FritzBox.[]', type: 'info', source: 'inetChecksite("http://fritz.box")', regexp: '', conv: '', role: '', write: '', sched: ':/1' }, { name: 'System.Network.Latency', type: 'info', source: 'inetLatency', regexp: '', conv: '', role: 'number|ms', write: '', sched: ':/1' }, { name: 'System.Load.[Load,User,System,Idle]', type: 'info', source: 'currentLoad', regexp: '[currentload, currentload_user, currentload_system, currentload_idle]', conv: 'parseInt(@1000)/1000', role: 'number|ms', write: '', sched: '::/10' }, { name: 'Aussentemp', type: 'file', source: '/mnt/RAM/T_aussen.txt', regexp: '', conv: 'number', role: '', write: '', sched: '* * * * *' } ], lang: 'de', latitude: 52.94304, longitude: 9.09719}
systeminfo.1 2023-10-01 16:05:35.292 info starting. Version 1.1.0 in /opt/iobroker/node_modules/iobroker.systeminfo, node: v18.18.0, js-controller: 5.0.12

@mcm1957 mcm1957 added bug and removed question labels Oct 1, 2023
@xdaamg
Copy link

xdaamg commented Oct 26, 2023

Tested version 1.0.0 and 1.1.0. Installation of 0.3.0 was not even possible due to errors. No objects are created under systeminfo, but debug logfile contains information that there are valid results. Error in logfile: "err from getObjectList: TypeError: Cannot read private member from an object whose class did not declare it".

Loglevel info:
`

systeminfo.0 2023-10-26 15:39:28.114 warn Unhandled error in main: TypeError: Cannot read private member from an object whose class did not declare it
systeminfo.0 2023-10-26 15:39:20.374 info Startup Systeminfo Adapter systeminfo.0: { startup: '', items: [ { name: 'System.Temperature', type: 'file', source: '/sys/class/thermal/thermal_zone0/temp', regexp: '', conv: 'number', role: 'value.temperature|°C', write: '', sched: ':/2' }, { name: '-System.Memory_[used, free, available]', type: 'exec', source: 'free -k', regexp: 'Mem\:\s+\d+\s+(\d+)\s+(\d+)\s+\d+\s+\d+\s+(\d+)', conv: '@/1000', role: 'number|MB', write: '', sched: '1 * * * * ' }, { name: 'NAS.Space_[total, used, free]', type: 'exec', source: 'df -BK', regexp: '/lic\s+(\d+)K\s+(\d+)K\s+(\d+)/m', conv: 'parseInt(@1000/1024)/1000', role: 'number|MB', write: '', sched: '1 * * * * ' }, { name: '-TestSystem.processes.[command/pcpu]', type: 'info', source: 'processes', regexp: "list[?(@.user == 'pi')]", conv: '', role: '', write: '', sched: ':2' }, { name: 'System.[Mem_used, Mem_free, Swap_used]', type: 'info', source: 'mem', regexp: '[used,free,swapused]', conv: 'parseInt(@(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: ':/1' }, { name: 'System.Software.[]', type: 'info', source: 'osInfo', regexp: '', conv: '', role: 'string', write: '', sched: '/3:58' }, { name: 'System.Software.[]', type: 'info', source: 'versions', regexp: '', conv: '', role: 'string', write: '', sched: '/3:58' }, { name: 'System.FileSystem.[fs/use]', type: 'info', source: 'fsSize', regexp: '', conv: '', role: 'number|%', write: '', sched: '/3:58' }, { name: 'System.FileSystem.IO_[Read,Write]', type: 'info', source: 'fsStats', regexp: '[rx,wx]', conv: 'parseInt(@(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: ':/1' }, { name: 'System.Network.[iface/]', type: 'info', source: 'networkInterfaces', regexp: '', conv: '', role: '', write: '', sched: '/3:58' }, { name: 'System.Network.Connections.[name/value]', type: 'info', source: 'networkConnections', regexp: "[][!(@.localaddress == @.peeraddress ? null : {name:${@.protocol}:${@.localaddress.replace(/\\./g,'_')}:${@.localport}, value:${@.state}:${@.peeraddress}:${@.peerport}})]", conv: '', role: 'string', write: '', sched: ':/1' }, { name: 'System.Network.MB_[Received,Sent]', type: 'info', source: 'networkStats', regexp: '[rx,tx]', conv: 'parseInt(@(1000/1024/1024))/1000', role: 'number|MB', write: '', sched: ':/1' }, { name: 'System.Network.FritzBox.[]', type: 'info', source: 'inetChecksite("http://192.168.1.1")', regexp: '', conv: '', role: '', write: '', sched: ':/1' }, { name: 'System.Network.Latency', type: 'info', source: 'inetLatency', regexp: '', conv: '', role: 'number|ms', write: '', sched: ':/1' }, { name: 'System.Load.[Load,User,System,Idle]', type: 'info', source: 'currentLoad', regexp: '[currentload, currentload_user, currentload_system, currentload_idle]', conv: 'parseInt(@1000)/1000', role: 'number|ms', write: '', sched: ':*:/10' } ]}
systeminfo.0 2023-10-26 15:39:20.351 error err from getObjectList: TypeError: Cannot read private member from an object whose class did not declare it
systeminfo.0 2023-10-26 15:39:20.297 info starting. Version 1.1.0 in /opt/iobroker/node_modules/iobroker.systeminfo, node: v18.17.1, js-controller: 5.0.14
systeminfo.0 2023-10-26 15:39:14.625 info terminating
`

Example of debug logfile:
`

ysteminfo.0 2023-10-26 15:45:45.764 warn Unhandled error in main: TypeError: Cannot read private member from an object whose class did not declare it
systeminfo.0 2023-10-26 15:45:38.063 debug System.Temperature received '50114'
systeminfo.0 2023-10-26 15:45:38.010 debug TypeError [ERR_INVALID_ARG_VALUE]: The argument 'file' cannot be empty. Received ''
systeminfo.0 2023-10-26 15:45:43.658 debug System.Network.MB_[Received,Sent] received [ { iface: 'eth0', operstate: 'up', rx_bytes: 1769097207, rx_dropped: 0, rx_errors: 0, tx_bytes: 1157809532, tx_dropped: 0, tx_errors: 0, rx_sec: null, tx_sec: null, ms: 0 }]
systeminfo.0 2023-10-26 15:45:43.594 debug MS TypeError: this._extendObject is not a function at MyAdapter.extendObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2068:21) at /opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:431:96 at new Promise () at MyAdapter.extendObject (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:430:20) at MyAdapter.makeState (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:667:21) at setItem (/opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:467:14) at /opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:595:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
`

@capitaenz
Copy link

same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants