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

Think about to fix the issues found by adapter checker #15

Closed
5 tasks
ioBrokerChecker opened this issue Feb 1, 2019 · 42 comments
Closed
5 tasks

Think about to fix the issues found by adapter checker #15

ioBrokerChecker opened this issue Feb 1, 2019 · 42 comments
Labels

Comments

@ioBrokerChecker
Copy link

ioBrokerChecker commented Feb 1, 2019

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/Matten-Matten/ioBroker.enigma2

  • [E301] Tests on Travis-ci.org are broken. Please fix.
  • [E605] No actual year found in copyright. Please add "Copyright (c) 2022 Matten-Matten matten-matten@web.de" at the end of README.md

I have also found warnings that may be fixed if possible.

  • [W113] Adapter should support compact mode
  • [W400] Cannot find "enigma2" in latest repository
  • [W505] setTimeout found in "main.js", but no clearTimeout detected

Thanks,
your automatic adapter checker.

P.S.: There is a community in Github, which supports the maintenance and further development of adapters. There you will find many experienced developers who are always ready to assist anyone. New developers are always welcome there. For more informations visit: https://github.com/iobroker-community-adapters/info

@Scrounger
Copy link
Collaborator

[E130] No news found in io-package.json in fc34255

@Scrounger
Copy link
Collaborator

Scrounger commented Dec 9, 2019

Ok hab jetzt alles gemacht, was ich machen kann.
Du musst noch Topic einrichten, kannst z.B. so wie beim meinem Adapter machen
https://github.com/Scrounger/ioBroker.linkeddevices

grafik

Und bei Travis anmelden und die Testruns aktivieren. Anmelden mit github account und dann freigabe aufs repository einrichten. Dann müsste der Test laufen. Falls da was nicht geht, frag am besten @Apollon77, der hilft einem da immer weiter.

@Matten-Matten
Copy link
Collaborator

Topic ist im prinip ein link wo der Adapter im Forum getetstet wurde?

Und bei Travis anmelden und die Testruns aktivieren. hatte ich schonmal gemacht sonst muss ich das nochmal tun

@Matten-Matten
Copy link
Collaborator

ich lasse gerade alles durch Appveyor und Travis durchlaufen...

@Matten-Matten
Copy link
Collaborator

Was mache ich bei folgendem?

Travis CI - Test and Deploy with Confidence-09 12 2019_23_33_59

@Apollon77
Copy link
Member

Ok, in travis und appveyor bitte node 4 und 6 wegwerfen (js-controller ist nur ab nodejs 8 ...) und dafür 10 und 12 hinzufügen

@Matten-Matten
Copy link
Collaborator

wird gemacht.

@Apollon77
Copy link
Member

Und naja ansonsten fehlt das "test" Verzeichnis :-) Damit kann testing nicht tun ... DU kannst (wenn DU nicht alles neu auf Basis des Creators aufbauen willst) ggf unter https://github.com/ioBroker/ioBroker.template/tree/master/JavaScript anleihen nehmen und Teile kopieren

@Matten-Matten
Copy link
Collaborator

ok, hab ich auch erledigt.

@Matten-Matten
Copy link
Collaborator

ich gehe mal schwer davon aus das das immer noch nicht gut ist...
Build #160 - Matten-Matten_ioBroker enigma2 - Travis CI-09 12 2019_23_58_39

@Apollon77
Copy link
Member

Na klick doch mal rein ... :-)
https://travis-ci.com/Matten-Matten/ioBroker.enigma2/jobs/265400391#L434

DU musst dann auch das testing modul in den devDependencies mit rein nehmen und ggf noch paar mehr.

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 10, 2019

ich habe jetzt
"@iobroker/testing": "^1.3.0",
"@types/chai": "^4.2.5",
"@types/chai-as-promised": "^7.1.2",
"@types/gulp": "^4.0.6",
"@types/mocha": "^5.2.7",
"@types/node": "^10.17.6",
"@types/proxyquire": "^1.3.28",
"@types/sinon": "^7.5.1",
"@types/sinon-chai": "^3.2.3",
"axios": "^0.19.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"eslint": "^6.7.1",
"gulp": "^4.0.2",
"mocha": "^6.2.2",
"proxyquire": "^2.1.3",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0"

zu geschrieben.... aber ob das alles richtig ist weiß ich nicht....

@Matten-Matten
Copy link
Collaborator

Worker information
0.14s0.01s0.00s0.01s
system_info
Build system information
0.01s0.01s0.38s0.21s0.05s0.00s0.04s0.00s0.01s0.01s0.01s0.01s0.01s0.00s0.00s0.02s0.00s0.01s0.30s0.00s0.00s0.00s0.01s0.00s0.09s0.01s0.79s0.00s0.00s3.04s0.00s2.25s0.00s2.13s
docker_mtu
resolvconf
apt
Adding APT Sources
0.00s
git.checkout
0.74s$ git clone --depth=50 --branch=master https://github.com/Matten-Matten/ioBroker.enigma2.git Matten-Matten/ioBroker.enigma2
0.01s
Setting environment variables from .travis.yml
$ export CXX=g++-4.8
nvm.install
2.93s$ nvm install 10
cache.1
Setting up build cache
cache.npm
$ node --version
v10.17.0
$ npm --version
6.11.3
$ nvm --version
0.35.1
install.npm
10.93s$ npm install 
before_script.1
4.26s$ npm install winston@2.3.1
before_script.2
21.57s$ npm install https://github.com/ioBroker/ioBroker.js-controller/tarball/master --production
37.83s$ npm test
> iobroker.enigma2@1.2.9 test /home/travis/build/Matten-Matten/ioBroker.enigma2
> node node_modules/mocha/bin/mocha --exit
Running tests in /tmp/test-iobroker.enigma2
  Test the adapter (in a live environment)
> iobroker.js-controller@2.2.0 preinstall /tmp/test-iobroker.enigma2/node_modules/iobroker.js-controller
> node lib/preinstallCheck.js
NPM version: 6.11.3
> iobroker.js-controller@2.2.0 preinstall /tmp/test-iobroker.enigma2/node_modules/iobroker.enigma2/node_modules/iobroker.js-controller
> node lib/preinstallCheck.js
NPM version: 6.11.3
> diskusage@1.1.3 install /tmp/test-iobroker.enigma2/node_modules/diskusage
> node-gyp rebuild
make: Entering directory '/tmp/test-iobroker.enigma2/node_modules/diskusage/build'
  CXX(target) Release/obj.target/diskusage/src/main.o
  CXX(target) Release/obj.target/diskusage/src/diskusage_posix.o
../src/diskusage_posix.cpp: In function ‘DiskUsage GetDiskUsage(const char*)’:
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bsize’ [-Wmissing-field-initializers]
     struct statvfs info = {};
                            ^
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_frsize’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_blocks’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bfree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_bavail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_files’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_ffree’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_favail’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_fsid’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_flag’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::f_namemax’ [-Wmissing-field-initializers]
../src/diskusage_posix.cpp:10:28: warning: missing initializer for member ‘statvfs::__f_spare’ [-Wmissing-field-initializers]
  SOLINK_MODULE(target) Release/obj.target/diskusage.node
  COPY Release/diskusage.node
make: Leaving directory '/tmp/test-iobroker.enigma2/node_modules/diskusage/build'
> unix-dgram@2.0.2 install /tmp/test-iobroker.enigma2/node_modules/unix-dgram
> node-gyp rebuild
make: Entering directory '/tmp/test-iobroker.enigma2/node_modules/unix-dgram/build'
  CXX(target) Release/obj.target/unix_dgram/src/unix_dgram.o
../src/unix_dgram.cc: In function ‘void {anonymous}::OnRecv({anonymous}::SocketContext*)’:
../src/unix_dgram.cc:121:25: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:1024) [-Wdeprecated-declarations]
                     argv);
                         ^
../src/unix_dgram.cc: In function ‘void {anonymous}::OnWritable({anonymous}::SocketContext*)’:
../src/unix_dgram.cc:129:28: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at ../../nan/nan.h:1024) [-Wdeprecated-declarations]
                     0, NULL);
                            ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Socket(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:189:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   domain      = info[0]->Int32Value();
                                     ^
../src/unix_dgram.cc:190:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   type        = info[1]->Int32Value();
                                     ^
../src/unix_dgram.cc:191:37: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   protocol    = info[2]->Int32Value();
                                     ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Bind(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:230:28: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   fd = info[0]->Int32Value();
                            ^
../src/unix_dgram.cc:231:33: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2891): Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value path(info[1]);
                                 ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::SendTo(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:258:28: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   fd = info[0]->Int32Value();
                            ^
../src/unix_dgram.cc:259:27: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
   buf = info[1]->ToObject();
                           ^
../src/unix_dgram.cc:260:33: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
   offset = info[2]->Uint32Value();
                                 ^
../src/unix_dgram.cc:261:33: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2477): Use maybe version [-Wdeprecated-declarations]
   length = info[3]->Uint32Value();
                                 ^
../src/unix_dgram.cc:262:33: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2891): Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value path(info[4]);
                                 ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Send(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:302:28: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   fd = info[0]->Int32Value();
                            ^
../src/unix_dgram.cc:303:27: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:10046): Use maybe version [-Wdeprecated-declarations]
   buf = info[1]->ToObject();
                           ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Connect(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:340:28: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   fd = info[0]->Int32Value();
                            ^
../src/unix_dgram.cc:341:33: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2891): Use Isolate version [-Wdeprecated-declarations]
   String::Utf8Value path(info[1]);
                                 ^
../src/unix_dgram.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::Close(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/unix_dgram.cc:361:28: warning: ‘int32_t v8::Value::Int32Value() const’ is deprecated (declared at /home/travis/.cache/node-gyp/10.17.0/include/node/v8.h:2478): Use maybe version [-Wdeprecated-declarations]
   fd = info[0]->Int32Value();
                            ^
  SOLINK_MODULE(target) Release/obj.target/unix_dgram.node
  COPY Release/unix_dgram.node
make: Leaving directory '/tmp/test-iobroker.enigma2/node_modules/unix-dgram/build'
> ursa-optional@0.9.10 install /tmp/test-iobroker.enigma2/node_modules/ursa-optional
> node rebuild.js
> iobroker.js-controller@2.2.0 install /tmp/test-iobroker.enigma2/node_modules/iobroker.enigma2/node_modules/iobroker.js-controller
> node iobroker.js setup first
> iobroker.js-controller@2.2.0 install /tmp/test-iobroker.enigma2/node_modules/iobroker.js-controller
> node iobroker.js setup first
creating conf/iobroker.json
object 0_userdata.0.example_state created
object 0_userdata.0 created
object alias.0 created
object system.certificates created
object system.repositories created
object system.config created
object enum.functions created
object enum.rooms created
object system.group.user created
object system.group.administrator created
object _design/system created
object system.meta.uuid created: 36144ba3-f6f9-8bb8-fa21-b141dc52ec52
object system.user.admin created
{
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
> acme-v2@1.8.6 postinstall /tmp/test-iobroker.enigma2/node_modules/acme-v2
> node scripts/postinstall
Greenlock and ACME.js v3 are on the way!
Watch for updates at https://indiegogo.com/at/greenlock
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN winston-daily-rotate-file@4.3.1 requires a peer of winston@^3 but none is installed. You must install peer dependencies yourself.
npm WARN winston-syslog@2.3.0 requires a peer of winston@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN test-iobroker.enigma2@1.0.0 No description
npm WARN test-iobroker.enigma2@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 320 packages from 351 contributors and audited 1273 packages in 22.702s
found 0 vulnerabilities
  Redis inMem-objects listening on port 19001
  Redis inMem-states listening on port 19000
2019-12-10 09:31:10.443  - info: enigma2.0 (6657) starting. Version 1.2.9 in /tmp/test-iobroker.enigma2/node_modules/iobroker.enigma2, node: v10.17.0
2019-12-10 09:31:10.455  - debug: enigma2.0 (6657) config IPAddress: 192.168.0.1
2019-12-10 09:31:10.456  - debug: enigma2.0 (6657) config Port: 80
2019-12-10 09:31:10.456  - debug: enigma2.0 (6657) config Username: root
2019-12-10 09:31:10.456  - debug: enigma2.0 (6657) config Passworddreambox
2019-12-10 09:31:10.459  - info: enigma2.0 (6657) starting Polling every 5000 ms
 memory publish system.adapter.enigma2.0.logLevel {"val":"debug","ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 Redis Publish State system.adapter.enigma2.0.logLevel={"val":"debug","ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 memory publish system.adapter.enigma2.0.alive {"val":true,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462,"expire":true}
 memory publish system.adapter.enigma2.0.connected {"val":true,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462,"expire":true}
 memory publish system.adapter.enigma2.0.memRss {"val":63.8,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 memory publish system.adapter.enigma2.0.memHeapTotal {"val":38.88,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 memory publish system.adapter.enigma2.0.memHeapUsed {"val":17.4,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 memory publish system.adapter.enigma2.0.uptime {"val":2,"ack":true,"ts":1575970270462,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270462}
 memory publish system.adapter.enigma2.0.inputCount {"val":2,"ack":true,"ts":1575970270463,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270463}
 memory publish system.adapter.enigma2.0.outputCount {"val":8,"ack":true,"ts":1575970270463,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270463}
 memory publish system.adapter.enigma2.0.compactMode {"val":false,"ack":true,"ts":1575970270463,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270463}
 memory publish enigma2.0.Message.Type {"val":1,"ack":true,"ts":1575970270463,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270463}
 Redis Publish State enigma2.0.Message.Type={"val":1,"ack":true,"ts":1575970270463,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270463}
 memory publish enigma2.0.Message.Timeout {"val":15,"ack":true,"ts":1575970270470,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270470}
 Redis Publish State enigma2.0.Message.Timeout={"val":15,"ack":true,"ts":1575970270470,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270470}
 memory publish enigma2.0.enigma2-CONNECTION {"val":false,"ack":true,"ts":1575970270470,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270470}
 Redis Publish State enigma2.0.enigma2-CONNECTION={"val":false,"ack":true,"ts":1575970270470,"q":0,"from":"system.adapter.enigma2.0","user":"system.user.admin","lc":1575970270470}
 memory publish system.adapter.enigma2.0.cpu {"val":0,"ack":true,"ts":1575970270479,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270479}
 memory publish system.adapter.enigma2.0.cputime {"val":0.00055,"ack":true,"ts":1575970270479,"q":0,"from":"system.adapter.enigma2.0","lc":1575970270479}
2019-12-10 09:31:15.460  - debug: enigma2.0 (6657) creating request for command 'GETSTANDBY' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/powerstate')
2019-12-10 09:31:15.463  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.466  - debug: enigma2.0 (6657) creating request for command 'MESSAGEANSWER' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/messageanswer?getanswer=now')
2019-12-10 09:31:15.466  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.467  - debug: enigma2.0 (6657) creating request for command 'GETINFO' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/about')
2019-12-10 09:31:15.467  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.467  - debug: enigma2.0 (6657) creating request for command 'GETVOLUME' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/vol')
2019-12-10 09:31:15.468  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.468  - debug: enigma2.0 (6657) creating request for command 'GETCURRENT' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/getcurrent')
2019-12-10 09:31:15.468  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.468  - debug: enigma2.0 (6657) creating request for command 'ISRECORD' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/timerlist')
2019-12-10 09:31:15.469  - debug: enigma2.0 (6657) using authorization with user 'root'
2019-12-10 09:31:15.469  - debug: enigma2.0 (6657) creating request for command 'TIMERLIST' (deviceId: 1, host: 192.168.0.1, port: 80, path: '/web/timerlist')
2019-12-10 09:31:15.469  - debug: enigma2.0 (6657) using authorization with user 'root'
The adapter started successfully.
    ✓ The adapter starts (7411ms)
 memory publish system.adapter.enigma2.0.alive {"val":false,"ack":true,"ts":1575970275974,"q":0,"from":"system.adapter.enigma2.0","lc":1575970275974}
2019-12-10 09:31:15.976  - info: enigma2.0 (6657) Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason
 Redis QUIT received, close connection
 States 127.0.0.1:49822 close Redis connection
 Redis QUIT received, close connection
 States 127.0.0.1:49824 close Redis connection
 Redis QUIT received, close connection
undefined Objects 127.0.0.1:51346 close Redis connection
 Redis QUIT received, close connection
undefined Objects 127.0.0.1:51348 close Redis connection
  Validate the package files
    Ensure they are readable
      package.json
        ✓ exists
        ✓ contains valid JSON
        ✓ is an object
      io-package.json
        ✓ exists
        ✓ contains valid JSON
        ✓ is an object
    Check contents of package.json
      ✓ The property "name" exists
      ✓ The property "version" exists
      ✓ The property "description" exists
      ✓ The property "author" exists
      ✓ The property "license" exists
      1) The property "main" exists
      ✓ The property "repository" exists
      ✓ The property "repository.type" exists
      ✓ The package name is correct
      ✓ The repository type is "git"
    Check contents of io-package.json
      ✓ The property "common.name" exists
      ✓ The property "common.title" exists
      ✓ The property "common.version" exists
      ✓ The property "common.news" exists
      ✓ The property "common.desc" exists
      ✓ The property "common.icon" exists
      ✓ The property "common.extIcon" exists
      ✓ The property "common.license" exists
      ✓ The property "common.type" exists
      ✓ The property "common.authors" exists
      ✓ The property "native" exists
      2) The title does not contain "adapter" or "iobroker"
      ✓ The description is an object to support multiple languages
      ✓ common.authors is an array that is not empty
      ✓ common.news is an object that contains maximum 20 entries
      ✓ Materialize is supported
    Compare contents of package.json and io-package.json
      ✓ The name matches
      ✓ The version matches
      ✓ The license matches
  Test the adapter (in a mocked environment)
Cannot find js-controller
    3) The adapter starts in normal mode
Cannot find js-controller
    4) The adapter starts in compact mode
  34 passing (37s)
  4 failing
  1) Validate the package files
       Check contents of package.json
         The property "main" exists:
     AssertionError: expected undefined not to be undefined
      at Context.it (node_modules/@iobroker/testing/build/tests/packageFiles/index.js:46:52)
  2) Validate the package files
       Check contents of io-package.json
         The title does not contain "adapter" or "iobroker":
     AssertionError: expected 'enigma2 Adapter' not to match /iobroker|adapter/i
      at Context.it (node_modules/@iobroker/testing/build/tests/packageFiles/index.js:124:66)
  3) Test the adapter (in a mocked environment)
       The adapter starts in normal mode:
     AssertionError: process.exit was called with the unexpected exit code 10!: expected [] to include 10
      at assertValidExitCode (node_modules/@iobroker/testing/build/tests/unit/index.js:32:41)
      at Context.<anonymous> (node_modules/@iobroker/testing/build/tests/unit/index.js:67:17)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/@iobroker/testing/build/tests/unit/index.js:7:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)
  4) Test the adapter (in a mocked environment)
       The adapter starts in compact mode:
     AssertionError: In compact mode, process.exit() must not be called!: expected 10 to be undefined
      at Context.<anonymous> (node_modules/@iobroker/testing/build/tests/unit/index.js:83:112)
      at Generator.next (<anonymous>)
      at fulfilled (node_modules/@iobroker/testing/build/tests/unit/index.js:7:58)
      at process._tickCallback (internal/process/next_tick.js:68:7)
npm ERR! Test failed.  See above for more details.
The command "npm test" exited with 1.
cache.2
store build cache
Done. Your build exited with 1.

@Apollon77
Copy link
Member

Adapter etsting ist ok, die Fehler bedeuten:

  • package.json muss ein "main" entry haben mit dem js namen des Main Files (main.js bei dir)
  • io-package.sjon title sollte nicht das Wort "Adapter" enthalten :-)
  • unit testing: adapter beednet sich mit exit code 10 was unerwartet ist. Wenn das für deinen Adapter normal ist dann https://github.com/ioBroker/testing#adapter-startup-unit-test und schau mal bei "allowedExitCodes"
  • process.exit ist falsch. bitte adapter.terminate nutzen

@Matten-Matten
Copy link
Collaborator

ok punkt 1 und 2 hab ich schon erledigt.
punkt 3 und 4 muss ich jetzt erst mal schauen...

@Matten-Matten
Copy link
Collaborator

punkt 4 hab ich hoffentlich richtig gemacht .... 8b269f0

@Apollon77
Copy link
Member

Ja ist korrekt, dann hast Du aber eine Abhängigkeit zum controller 1.5.14 (unter dem geht es nicht).
Die Alterative ist ein Konstrukt wie:

adapter.terminate ? adapter.terminate(1) : process.exit(1);

@Matten-Matten
Copy link
Collaborator

also müsste ich es so schreiben?
if (!latest) adapter.terminate ? adapter.terminate(1) : process.exit(1);

@Apollon77
Copy link
Member

beispielsweise

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 10, 2019

Sorry das ich immer so doof nachfrage, ist leider nicht mein tagesgeschäft so ein adapter zu programieren... JAVA usw.

Ich hoffe nur ich stelle mich nicht zu blöde an...
84d46ec

@Apollon77
Copy link
Member

sollte so tun ... und wir helfen immer gern

@Matten-Matten
Copy link
Collaborator

Ja das hab ich schon oft bemerkt, bin auch sehr dankbar dafür 👍

@Matten-Matten
Copy link
Collaborator

Kann es denn jetzt ins repository?
😅

@Apollon77
Copy link
Member

Irgendwie ist travis aber immer noch rot und dinge offen die du an sich gesagt hast gefixt zu haben ?!

https://travis-ci.org/Matten-Matten/ioBroker.enigma2/jobs/623124650#L706

@Matten-Matten
Copy link
Collaborator

Ich glaube ich weiß warum, ich muss das bestimmt erst alles nach npm Portieren oder?

@Apollon77
Copy link
Member

ne travis läuft mit der github version

@Apollon77
Copy link
Member

Ok, mal ein bissl Review-Kommentare:

  • adapter.subscribeState('*') is doppelt
  • alle "setInterval" musst Du dir in einer eigenen variable speichern und im on('unload') mit einem clearInterval sauber beenden bitte
  • Dein code mit dem "adapter.terminate" geht so nicht weil Da wie du es nutzt "adapter" nie definiert ist (in build.js als beispiel) und effektiv ist das auch nichts was zum adapter gehört ... da muss das raus. das ist "Npm build" was automatisch ausgeführt wird bei der installation oder beim bauen.
  • im code finde ich aktuell nichts was ich in Think about to fix the issues found by adapter checker #15 (comment) beschrieben hab wegen dem allowedExitocdes und package.json hat scheinbar auch kein main

@Matten-Matten
Copy link
Collaborator

punkt 1 keine ahnung was du damit meinst.... sry.
punkt 2 muss ich auf das know how von @Scrounger zurückgreifen vielleicht hat der ne idee dazu.
punkt 3 ach ich lasse das lieber ..... ich komme da einfach nicht weiter mit meinem gefärlichen halbwissen sowie so nicht... mir fehlen auch zeitlich die Kapazitäten mich da intensiv zu beschäftigen.
Eigendlich bin ich auch eher der kreative, also was Visualisierung betrifft. Und nicht Adapter bauen.
Wenn man mal überlegt das ich den adapter nur für den eigenbedarf aus dem VU+ adapter zusammen gefriggelt hab. und das anderen usern nicht vorenthalten wollte. Letztendlich bin ich auch nur ein User und weit ab vom Entwickler. Ich will jetzt nicht das Handtuch werfen, aber für mich ist das einfach noch viel zu viel Arbeit bei meinem know how diesen adapter bis in die repository zu bekommen.
Trotzdem großen Dank an allen Helfern hier!!!!

@Garfonso
Copy link

Garfonso commented Dec 11, 2019

Hey, nicht den Kopf hängen lassen. Sieht doch gut aus der Adapter. Das mit den Tests kann etwas fummelig sein, da hatte ich auch ein bisschen zu kämpfen. 🔨

Darf ich noch ein paar Kommentare geben, die vielleicht bei der Klärung helfen?

  • zu Punkt 1 / subscribeStates("*") ist doppelt: das meint @Apollon77 damit: Zeile 1246 und Zeile 1376.
    In beiden rufst du adapter.subscribeStates("*") auf jeweils in den Funktionen main() und main2(). Beide werden auf jedenfall ausgeführt. Du brauchst diese Zeile aber nur einmal.
    Mit dem Befehl sagst du dem ioBroker Bescheid, dass du gerne über Änderungen an "deinen" States informiert werden willst und der ruft dann deine Funktion dafür auf. Das musst du natürlich nur einmal machen.
  • zu Punkt 3/ process.exit Thema: Da hat @Apollon77 im Eifer des Gefechts die Fehlermeldung zu wörtlich interpretiert... der Adapter scheint den compact mode gar nicht zu unterstützen. Zumindest habe ich keinen Code dafür gefunden. Daher wird das exit vermutlich irgendwo anders her kommen und nicht von deinem Adapter.
    Als quickfix würde ich empfehlen in der io-package.json compact auf false zu ändern (dann sollte das hoffentlich auch nicht getestet werden, sonst darfst du dich beschweren).
    Auf lange Sicht könnte dann so etwas im Adapter hinzugefügt werden, wenn du compact mode unterstützen möchtest: https://github.com/ioBroker/ioBroker.template/blob/master/JavaScript/main.js#L147
  • zu Punkt 3 / build.js: egal, wie du dich zum compact mode entscheidest, würde ich ganz dringend empfehlen die Änderungen an der build.js zurückzudrehen... das war nicht Ursache des Problems und... weiß nicht. Ich würde an der einfach nix ändern und hast du ja auch sonst nichts mit zu tun, oder? 🙈
  • zu Punkt 4 / package.json: so sollte das in der package.json aussehen: "main": "main.js",. Die Zeile gibt es bei dir in der package.json noch nicht (in der io-package.json ist das richtig drinnen).
  • zu Punkt 4 / exitcode: da bin ich mir nicht ganz sicher, wo das her kommt... aber vermutlich eher aus den intervallen (Punkt 2). Denn der Adapter gibt ja aus, dass er ohne Fehler beendet:

2019-12-10 11:02:27.614 - info: enigma2.0 (6935) Terminated (NO_ERROR): Without reason

  • zu Punkt 2: Das ist vermutlich der, wo nochmal etwas arbeit auf dich zukommt und der ein paar der anderen Merkwürdigkeiten, für die du keine Verantwortung trägst, beheben sollte (meine starke Vermutung im Moment).
    Bei setInterval muss man beachten, dass es einfach stur weiterläuft. Das ist dann blöd, wenn es a) zu Verzögerungen kommen kann und dann hinterher X Intervalle abgelaufen aber noch nicht fertig sind, dann wird das auch X-mal ausgeführt (und dann ggf. auf einmal, wenn es wieder weiter geht) und b) beim beenden vom Adapter läuft es auch stur weiter und kann da zu vielen Problemen führen. Beenden kann man das interval indem man sich die Id merkt, so: var id = setInterval(...); und dann mit der Id dann clearInterval aufruft, so: clearInterval(id);.
    Du brauchst die id in deinem Fall in zwei verschiedenen Funktionen, daher würde ich empfehlen, dass du dir "oben" für jedes setInterval (warum sind das eigentlich 3? Geht das nicht in einem?) eine variable für die id anlegst.
    Dann irgendwo als ganz neuen Block:
adapter.on("unload", function () {
    if (pollIntervalId1) {
        clearInterval(pollIntervalId1);
    }
    ...
}

(Bei ... müsste dann das gleiche nochmal für die anderen beiden setInterval-ids gemacht werden, falls du die beibehälst, und natürlich den Variablennamen anpassen).

Ich hoffe, das war jetzt nicht zu übergriffig. Ich finde du hast dir doch schon viel Arbeit gemacht und aus meiner Sicht fehlt doch gar nicht mehr viel. Daher fände ich es schön, wenn du jetzt die Kleinigkeiten auch noch gefixt bekommst und würde gerne dabei helfen. 😃

@ldittmar81
Copy link
Member

@Matten-Matten - Ich finde es auch toll dass du dich da engagierst. Es ist noch kein Meister vom Himmel gefallen und hey... scheinbar macht dir sowas Spaß, sonst hättest du es gar nicht angefangen. 😃 Klar.... die Hürden damit was aufgenommen wird sind schon hoch, was manchmal nervig ist, aber es hat alles ein Sinn. Wir wollen ioBroker stabil halten und da muss Kontrolliert werden. Aber dafür haben wir die Entwickler-Community: https://github.com/iobroker-community-adapters/info - hier bekommt man immer Unterstützung. Schau doch mal rein! Wir freuen uns immer über Zuwachs... :-)

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 11, 2019

OK, OK, OK,.....
bei so aufbauende Worte und Hilfe, kann ich ja gar nicht anders😅

@Garfonso
gleich mal eine frage: wenn ich das richtig verstanden hab würde ich es wie folgt machen:

function main() { ...
... am ende dann:

var event_interval = setInterval(function () {
	getResponse('GETSTANDBY', deviceId, PATH['POWERSTATE'], evaluateCommandResponse);
	getResponse('MESSAGEANSWER', deviceId, PATH['MESSAGEANSWER'], evaluateCommandResponse);
	getResponse('GETINFO', deviceId, PATH['ABOUT'], evaluateCommandResponse);
	getResponse('GETVOLUME', deviceId, PATH['VOLUME'], evaluateCommandResponse);
	getResponse('GETCURRENT', deviceId, PATH['GET_CURRENT'], evaluateCommandResponse);
	getResponse('ISRECORD', deviceId, PATH['ISRECORD'], ISRECORD);
	getResponse('TIMERLIST', deviceId, PATH['TIMERLIST'], evaluateCommandResponse);
}, adapter.config.PollingInterval);

var deviceinfo_interval = setInterval(function () {
	if (isConnected) {
		getResponse('DEVICEINFO_HDD', deviceId, PATH['DEVICEINFO'], evaluateCommandResponse);
	}
}, 30000);

var movielist_interval = setInterval(function () {
	if (isConnected) {
		getResponse('GETMOVIELIST', deviceId, PATH['GETLOCATIONS'], evaluateCommandResponse);
	}
}, 60000 * 30);
}

adapter.on("unload", function () {
    if (event_interval) {
        clearInterval(event_interval);
    }
    if (deviceinfo_interval) {
        clearInterval(deviceinfo_interval);
    }
	if (movielist_interval) {
        clearInterval(movielist_interval);
    }
});

ist das so richtig?

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 11, 2019

wenn ich den adapter mit den änderungen stoppe kommt volgendes als Warnmeldung:

`

host.ioBroker 2019-12-11 11:23:23.978 info instance system.adapter.enigma2.0 terminated with code null ()
host.ioBroker 2019-12-11 11:23:23.978 warn instance system.adapter.enigma2.0 terminated due to SIGTERM
host.ioBroker 2019-12-11 11:23:23.922 info stopInstance system.adapter.enigma2.0 killing pid 10476
enigma2.0 2019-12-11 11:23:22.927 warn at processImmediate (timers.js:658:5)
enigma2.0 2019-12-11 11:23:22.927 warn at tryOnImmediate (timers.js:676:5)
enigma2.0 2019-12-11 11:23:22.927 warn at runCallback (timers.js:705:18)
enigma2.0 2019-12-11 11:23:22.927 warn at Immediate.setImmediate [as _onImmediate] (C:\ioBroker\node_modules\iobroker.js-controller\lib\states\statesInRedis.js:226:41)
enigma2.0 2019-12-11 11:23:22.927 warn at change (C:\ioBroker\node_modules\iobroker.js-controller\lib\adapter.js:4610:25)
enigma2.0 2019-12-11 11:23:22.927 warn at stop (C:\ioBroker\node_modules\iobroker.js-controller\lib\adapter.js:7171:22)
enigma2.0 2019-12-11 11:23:22.927 warn at Adapter.emit (events.js:198:13)
enigma2.0 2019-12-11 11:23:22.927 warn at Adapter. (C:\ioBroker\node_modules\iobroker.enigma2\main.js:1555:5)
enigma2.0 2019-12-11 11:23:22.927 warn (10476) ReferenceError: event_interval is not defined
enigma2.0 2019-12-11 11:23:22.925 warn (10476) States pmessage system.adapter.enigma2.0.sigKill {"val":-1,"ack":false,"ts":1576059802902,"q":0,"from":"system.host.ioBroker","lc":1576059802902} event_interval is not defined
enigma2.0 2019-12-11 11:23:22.923 info (10476) Got terminate signal TERMINATE_YOURSELF
host.ioBroker 2019-12-11 11:23:22.903 info stopInstance system.adapter.enigma2.0 send kill signal
host.ioBroker 2019-12-11 11:23:22.902 info stopInstance system.adapter.enigma2.0 (force=false, process=true)
host.ioBroker 2019-12-11 11:23:22.901 info "system.adapter.enigma2.0" disabled

`

was ich nicht verstehe ist er sagt ja event_interval is not defined aber er ist doch mit var definiert.... oder liegt das daran das er in einer funktion definiert ist. muss ich ihn jetzt außerhalb der funktion definieren?

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 11, 2019

EDIT

habs jetzt so erstellt:

var event_interval;
var deviceinfo_interval;
var movielist_interval;

function main() { ...
... am ende dann:

event_interval = setInterval(function () {
	getResponse('GETSTANDBY', deviceId, PATH['POWERSTATE'], evaluateCommandResponse);
	getResponse('MESSAGEANSWER', deviceId, PATH['MESSAGEANSWER'], evaluateCommandResponse);
	getResponse('GETINFO', deviceId, PATH['ABOUT'], evaluateCommandResponse);
	getResponse('GETVOLUME', deviceId, PATH['VOLUME'], evaluateCommandResponse);
	getResponse('GETCURRENT', deviceId, PATH['GET_CURRENT'], evaluateCommandResponse);
	getResponse('ISRECORD', deviceId, PATH['ISRECORD'], ISRECORD);
	getResponse('TIMERLIST', deviceId, PATH['TIMERLIST'], evaluateCommandResponse);
}, adapter.config.PollingInterval);

deviceinfo_interval = setInterval(function () {
	if (isConnected) {
		getResponse('DEVICEINFO_HDD', deviceId, PATH['DEVICEINFO'], evaluateCommandResponse);
	}
}, 30000);

movielist_interval = setInterval(function () {
	if (isConnected) {
		getResponse('GETMOVIELIST', deviceId, PATH['GETLOCATIONS'], evaluateCommandResponse);
	}
}, 60000 * 30);
}

adapter.on("unload", function () {
    if (event_interval) {
        clearInterval(event_interval);
    }
    if (deviceinfo_interval) {
        clearInterval(deviceinfo_interval);
    }
	if (movielist_interval) {
        clearInterval(movielist_interval);
    }
});

jetzt steht das im LOG wenn ich den Adapter stoppe:

`

host.ioBroker 2019-12-11 11:36:32.577 info instance system.adapter.enigma2.0 terminated with code null ()
host.ioBroker 2019-12-11 11:36:32.577 warn instance system.adapter.enigma2.0 terminated due to SIGTERM
host.ioBroker 2019-12-11 11:36:32.534 info stopInstance system.adapter.enigma2.0 killing pid 2580
enigma2.0 2019-12-11 11:36:32.040 info (2580) Terminated (START_IMMEDIATELY_AFTER_STOP): Without reason
enigma2.0 2019-12-11 11:36:32.037 info (2580) terminating
enigma2.0 2019-12-11 11:36:31.535 info (2580) Got terminate signal TERMINATE_YOURSELF
host.ioBroker 2019-12-11 11:36:31.517 info stopInstance system.adapter.enigma2.0 send kill signal
host.ioBroker 2019-12-11 11:36:31.517 info stopInstance system.adapter.enigma2.0 (force=false, process=true)
host.ioBroker 2019-12-11 11:36:31.515 info "system.adapter.enigma2.0" disabled

`

@Matten-Matten
Copy link
Collaborator

Matten-Matten commented Dec 11, 2019

wenn das so ok sein sollte würde ich das im Adapter übertragen.
... dann habe ich meines wissens nach auch die punkte abgearbeitet und könnte den check nochmal durchlaufen lassen.

EDIT

hab alles übertragen aber die Tests fallen trotzdem durch:
fehler: AssertionError: process.exit was called with the unexpected exit code 10!: expected [] to include 10

@Garfonso
Copy link

Garfonso commented Dec 11, 2019

Erstmal: Genau so meinte ich das (also zweite Variante). Die Variablen müssen außerhalb der Funktion sein, sonst sind sie in der anderen Funktion nicht bekannt (der Raum in dem eine Variable gilt nennt sich "scope", falls du dich weiter damit beschäftigen willst).


Hm.. wo kommt denn diese 10 her?
Ok, was ich noch sehe ist, dass bei onUnload der callback nicht aufgerufen wird. Das könntest du noch einbauen (hatte ich nicht erwähnt bzw. selber nicht im Kopf):

adapter.on("unload", function (callback) {
    try {
        if (event_interval) {
            clearInterval(event_interval);
        }
        if (deviceinfo_interval) {
            clearInterval(deviceinfo_interval);
        }
    	    if (movielist_interval) {
                clearInterval(movielist_interval);
            }
       } catch (e) {
            callback();
        }
});

@ioBrokerChecker
Copy link
Author

Do you need help fixing the bugs?

@Apollon77
Copy link
Member

@Matten-Matten remove the unit test from travis and you shoud be good

@Matten-Matten
Copy link
Collaborator

@Apollon77
Wo muss ich das entfernen?

@Apollon77
Copy link
Member

lösch einfach unit.js aus https://github.com/Matten-Matten/ioBroker.enigma2/tree/master/test ... ist zwar nicht sauber aber ok-ish

@Matten-Matten
Copy link
Collaborator

ok. Danke.

@mcm1957 mcm1957 added bug and removed wontfix labels May 4, 2023
mcm1957 added a commit that referenced this issue May 5, 2023
-   (mcm1957) The adapter has been moved into iobroker-community-adapters organisation
-   (mcm1957) changed: Testing has been added and changed to support node 16, 18 and 20
-   (mcm1957) changed: Dependencies have been updated
-   (mcm1957) changed: issues reported by adapter-checker have been fixed (#15)
@mcm1957 mcm1957 added fixed and removed bug labels May 5, 2023
@mcm1957
Copy link
Member

mcm1957 commented May 5, 2023

fixed 1.5.0

@mcm1957 mcm1957 closed this as completed May 5, 2023
@ioBrokerChecker
Copy link
Author

Thanks, that all bugs have been fixed.

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

7 participants