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

GPIOs are not working with systeminfo #153

Open
Tottback opened this issue Oct 18, 2023 · 0 comments
Open

GPIOs are not working with systeminfo #153

Tottback opened this issue Oct 18, 2023 · 0 comments
Labels

Comments

@Tottback
Copy link

Tottback commented Oct 18, 2023

Hello, I'm using systeminfo adapter long time for GPIO usage.
Now there is an issue with old version 1.0.0 and also new 1.1.0 which suddenly appears, maybe when updating js-controller to version >4. Sometime systeminfo even crashes (2nd log)
GPIO was installed and gpio commands are working fine on command line. The GPIO objects still exists in systeminfo.
Rasperry 3 (master of mutli-host), bullseye, node: v18.17.1, js-controller: 5.0.12

2023-10-18 20:32:26.660 - info: host.raspi3 instance system.adapter.systeminfo.0 started with pid 1164
2023-10-18 20:32:32.561 - info: systeminfo.0 (1164) starting. Version 1.1.0 in /opt/iobroker/node_modules/iobroker.systeminfo, node: v18.17.1, js-controller: 5.0.12
2023-10-18 20:32:36.892 - info: systeminfo.0 (1164) Startup Systeminfo Adapter systeminfo.0: { startup: '#\n' + 'gpio write 1 1\n' + 'gpio mode 1 output\n' + 'gpio write 4 1\n' + 'gpio mode 4 output\n' + 'gpio write 5 1\n' + 'gpio mode 5 output\n' + 'gpio write 6 1\n' + 'gpio mode 6 output\n' + 'gpio write 7 1\n' + 'gpio mode 7 output\n' + 'gpio write 8 1\n' + 'gpio mode 8 output\n' + 'gpio write 9 1\n' + 'gpio mode 9 output\n' + 'gpio write 0 1\n' + 'gpio mode 0 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: '-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: 'GPIO.1', type: 'exec', source: 'gpio read 1', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 1 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'UWZ', type: 'web', source: 'http://feed.alertspro.meteogroup.com/AlertsPro/AlertsProPollService.php?method=getWarning&language=de&areaID=UWZAT02402', regexp: '..translationsShortText.DE', conv: 'json', role: 'json', 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.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: 'GPIO.4', type: 'exec', source: 'gpio read 4', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 4 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.5', type: 'exec', source: 'gpio read 5', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 5 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.6', type: 'exec', source: 'gpio read 6', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 6 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.RL_OG_UP', type: 'exec', source: 'gpio read 8', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 8 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.RL_OG_DOWN', type: 'exec', source: 'gpio read 9', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 9 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.RL_EG_UP', type: 'exec', source: 'gpio read 7', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 7 @(@ ? '0' : '1')", sched: '*/20 * * * * *' }, { name: 'GPIO.RL_EG_DOWN', type: 'exec', source: 'gpio read 0', regexp: '', conv: '!parseInt(@)', role: 'switch', write: "gpio write 0 @(@ ? '0' : '1')", sched: '*/20 * * * * *' } ], lang: 'de', latitude: 51.6260524, longitude: 8.30889330860722}
2023-10-18 20:32:43.516 - warn: systeminfo.0 (1164) Unhandled error in main: TypeError: Cannot read properties of undefined (reading '_delState')
2023-10-18 20:32:54.628 - warn: systeminfo.0 (1164) Error in StateChange for GPIO.6: TypeError: Cannot read properties of undefined (reading 'validateId') at MyAdapter.getObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2496:25) at /opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:431:96 at new Promise () at MyAdapter.getObject (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:430:20) at A.stateChange (/opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:231:18) at AdapterClass. (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:161:23) at AdapterClass.emit (node:events:514:28) at Immediate. (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8466:53) at process.processImmediate (node:internal/timers:476:21)
2023-10-18 20:41:08.740 - warn: systeminfo.0 (1164) Error in StateChange for GPIO.6: TypeError: Cannot read properties of undefined (reading 'validateId') at MyAdapter.getObject (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:2496:25) at /opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:431:96 at new Promise () at MyAdapter.getObject (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:430:20) at A.stateChange (/opt/iobroker/node_modules/iobroker.systeminfo/systeminfo.js:231:18) at AdapterClass. (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:161:23) at AdapterClass.emit (node:events:514:28) at Immediate. (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8466:53) at process.processImmediate (node:internal/timers:476:21)
--
2023-10-18 20:41:13.453 - error: systeminfo.0 (1164) uncaught exception: Cannot read properties of undefined (reading 'then')
2023-10-18 20:41:13.454 - error: systeminfo.0 (1164) TypeError: Cannot read properties of undefined (reading 'then')
at AdapterClass. (/opt/iobroker/node_modules/iobroker.systeminfo/myAdapter.js:161:104)
at AdapterClass.emit (node:events:514:28)
at Immediate. (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:8466:53)
at process.processImmediate (node:internal/timers:476:21)
2023-10-18 20:41:13.456 - error: systeminfo.0 (1164) Cannot read properties of undefined (reading 'then')
2023-10-18 20:41:13.467 - info: systeminfo.0 (1164) terminating
2023-10-18 20:41:13.470 - warn: systeminfo.0 (1164) Terminated (UNCAUGHT_EXCEPTION): Without reason
2023-10-18 20:41:13.967 - info: systeminfo.0 (1164) terminating
2023-10-18 20:41:14.355 - error: host.raspi3 instance system.adapter.systeminfo.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2023-10-18 20:41:14.356 - info: host.raspi3 Rebuild for adapter system.adapter.systeminfo.0 not successful in 3 tries. Adapter will not be restarted again. Please execute "npm install --production" in adapter directory manually.
@mcm1957 mcm1957 added the bug label Oct 18, 2023
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

2 participants