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

warn, error: [[createDataOfAllAdapter]] error: Cannot read properties of undefined (reading 'de') #67

Closed
crunchip77 opened this issue Nov 6, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@crunchip77
Copy link

iobroker Update device-watcher from @1.1.0 to @2.0.1
seit dem Update habe ich kontinuierlich diese Meldung
`

warn Error catched and sent to Sentry, error: [[createDataOfAllAdapter]] error: Cannot read properties of undefined (reading 'de')
`
@crunchip77 crunchip77 added the bug Something isn't working label Nov 6, 2022
@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Kannst du in einer der Listen sehen welches Gerät bzw. Adapter es betrifft? Der Name müsste dann 'undefined' sein. Eigentlich sollte der Fehler seit dem letzten Update behoben sein. Magst du die Instanz auf Debug stellen den Log hier posten?

@crunchip77
Copy link
Author

crunchip77 commented Nov 6, 2022

@ciddi89 hab kein undefined gefunden oder habs übersehen
auch habe ich die blacklist komplett gelöscht, Meldung bleibt weiterhin
`

2022-11-06 14:54:12.679 - info: device-watcher.0 (1253983) starting. Version 2.0.1 in /opt/iobroker/node_modules/iobroker.device-watcher, node: v16.17.0, js-controller: 4.0.23

2022-11-06 14:54:12.714 - debug: device-watcher.0 (1253983) Adapter device-watcher was started
2022-11-06 14:54:12.717 - debug: device-watcher.0 (1253983) [{"Selektor":"ble..rssi","adapter":"ble","battery":".battery","rssiState":".rssi","reach":"none","isLowBat":"none"},{"Selektor":"ping..alive","adapter":"ping","battery":"none","reach":".alive","isLowBat":"none"},{"Selektor":"shelly..uptime","adapter":"shelly","rssiState":".rssi","battery":".sensor.battery","reach":".online","isLowBat":"none"},{"Selektor":"sonoff..alive","adapter":"sonoff","rssiState":".Wifi_RSSI","battery":".battery","reach":".alive","uptime":".Uptime","isLowBat":"none"},{"Selektor":"unifi..state","adapter":"unifi","battery":"none","reach":".state","isLowBat":"none","id":"none"},{"Selektor":"wled.._online","adapter":"wled","rssiState":".wifi.rssi","battery":"none","reach":"._online","isLowBat":"none","id":"none"},{"Selektor":"zigbee.*.link_quality","adapter":"zigbee","battery":".battery","rssiState":"link_quality","reach":".available","isLowBat":".battery_low"}]
2022-11-06 14:54:12.719 - info: device-watcher.0 (1253983) Number of selected adapters: 7. Loading data from: Ble, Ping, Shelly, Sonoff, Unifi, Wled, Zigbee ...
2022-11-06 14:54:12.721 - debug: device-watcher.0 (1253983) Function started: createBlacklist
2022-11-06 14:54:12.723 - warn: device-watcher.0 (1253983) Error catched and sent to Sentry, error: [[onReady - create blacklist]] error: Unexpected token u in JSON at position 0
2022-11-06 14:54:12.838 - debug: device-watcher.0 (1253983) Created datapoints for Ble
2022-11-06 14:54:12.851 - debug: device-watcher.0 (1253983) Created datapoints for Ping
2022-11-06 14:54:12.868 - debug: device-watcher.0 (1253983) Created datapoints for Shelly
2022-11-06 14:54:12.939 - debug: device-watcher.0 (1253983) Created datapoints for Sonoff
2022-11-06 14:54:12.951 - debug: device-watcher.0 (1253983) Created datapoints for Unifi
2022-11-06 14:54:12.964 - debug: device-watcher.0 (1253983) Created datapoints for Wled
2022-11-06 14:54:12.975 - debug: device-watcher.0 (1253983) Created datapoints for Zigbee
2022-11-06 14:54:12.977 - debug: device-watcher.0 (1253983) Function started: main
2022-11-06 14:54:12.978 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:12.979 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:12.980 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:12.999 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:13.230 - warn: device-watcher.0 (1253983) Error catched and sent to Sentry, error: [[createDataForEachAdapter]] error: Cannot read properties of undefined (reading 'de')
2022-11-06 14:54:13.234 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:13.236 - debug: device-watcher.0 (1253983) Created and filled data for Ble
2022-11-06 14:54:13.237 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:13.237 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:13.238 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:13.258 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:13.357 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:13.524 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:13.526 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:13.527 - debug: device-watcher.0 (1253983) Created and filled data for Ping
2022-11-06 14:54:13.528 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:13.529 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:13.530 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:13.543 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:13.887 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:14.484 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:14.485 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:14.486 - debug: device-watcher.0 (1253983) Created and filled data for Shelly
2022-11-06 14:54:14.487 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:14.488 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:14.488 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:14.503 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:15.131 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:15.269 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:15.270 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:15.270 - debug: device-watcher.0 (1253983) Created and filled data for Sonoff
2022-11-06 14:54:15.271 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:15.271 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:15.272 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:15.294 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:15.389 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:15.485 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:15.486 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:15.487 - debug: device-watcher.0 (1253983) Created and filled data for Unifi
2022-11-06 14:54:15.487 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:15.488 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:15.488 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:15.497 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:15.674 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:15.781 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:15.782 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:15.783 - debug: device-watcher.0 (1253983) Created and filled data for Wled
2022-11-06 14:54:15.784 - debug: device-watcher.0 (1253983) Function started: createDataForEachAdapter
2022-11-06 14:54:15.784 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:15.785 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:15.797 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:16.681 - debug: device-watcher.0 (1253983) Start the function: writeDatapoints
2022-11-06 14:54:16.831 - debug: device-watcher.0 (1253983) Function finished: writeDatapoints
2022-11-06 14:54:16.832 - debug: device-watcher.0 (1253983) Function finished: createDataForEachAdapter
2022-11-06 14:54:16.832 - debug: device-watcher.0 (1253983) Created and filled data for Zigbee
2022-11-06 14:54:16.833 - debug: device-watcher.0 (1253983) Function started: createDataOfAllAdapter
2022-11-06 14:54:16.833 - debug: device-watcher.0 (1253983) Function started: resetVars
2022-11-06 14:54:16.834 - debug: device-watcher.0 (1253983) Function finished: resetVars
2022-11-06 14:54:16.902 - debug: device-watcher.0 (1253983) Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
2022-11-06 14:54:17.300 - warn: device-watcher.0 (1253983) Error catched and sent to Sentry, error: [[createDataOfAllAdapter]] error: Cannot read properties of undefined (reading 'de')
2022-11-06 14:54:17.304 - debug: device-watcher.0 (1253983) Function finished: createDataOfAllAdapter
2022-11-06 14:54:17.305 - debug: device-watcher.0 (1253983) Created and filled data for all adapters
2022-11-06 14:54:17.305 - debug: device-watcher.0 (1253983) Function finished: main
2022-11-06 14:54:17.307 - debug: device-watcher.0 (1253983) Number of selected days for daily battery message: 7. Send Message on: 1, 2, 3, 4, 5, 6, 0 ...
2022-11-06 14:54:17.358 - debug: device-watcher.0 (1253983) Number of selected days for daily offline message: 7. Send Message on: 1, 2, 3, 4, 5, 6, 0 ...

`

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Also als erstes sehe ich ein Fehler bezüglich der blacklist. Du musst alle Werte die da derzeit drin stehen erst löschen. Speichern, Instanz neu starten und die Blacklist neu erstellen. Leider ist das so da es ein anderes system intern ist und er so nichts mehr mit den werten anfragen kann. Wenn das nicht hilft muss leider wohl die Instanz gelöscht werden und neu erstellt werden. Am besten ist es wenn du den adapter komplett löscht und noch mal neu installierst, Evtl sind wir dann die Fehler los.

@crunchip77
Copy link
Author

die blacklist hatte ich ja schon gelöscht, dann werd ich wohl nochmal neu installieren, wenn der Fehler weg ist schließe ich hier wieder

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

@crunchip77 am besten die gitversion erstmal installieren es gibt nämlich mehr mit dem Fehler. Habe gerade was verändert in der Hoffnung das es nun weg ist,

@crunchip77
Copy link
Author

crunchip77 commented Nov 6, 2022

@ciddi89 die hatte ich gerade installiert, allerdings dachte ich, der Fehler kommt nicht wieder, wenn ich meine config wieder rein lade, dem ist aber nicht so, weil die blackliste zwar wieder vorhanden, jedoch wieder leer ist, dem zu folge taucht die Meldung wieder auf. kann es aber gern nochmal probieren, vllt hat sich es überschnitten.

@FoGBaV
Copy link

FoGBaV commented Nov 6, 2022

@crunchip77 - hast du die Yeelight Option aktiviert ? Falls ja mach mal raus ...

@crunchip77
Copy link
Author

@ciddi89 Die Meldung kommt jetzt nicht mehr, zeigt mir nun meine "nicht erreichbaren" Geräte wieder an(muss ich halt nur wieder in die blacklist einfügen. Allerdings stimmt nun die Anzahl der Geräte nicht mehr. Batteriebetrieben hatte ich 43 nun 46. Gesamtgeräte hatte ich 93 nun 112.

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Wenn die Geräte vorher in der Blacklist waren wurden sie nicht mit gezählt. Evtl passt die Anzahl nach dem einsetzen wieder?

@crunchip77
Copy link
Author

@ciddi89 dachte ich auch erst, allerdings würde die Summe nicht stimmen. ich fülle jetzt mal die blacklist und schau was raus kommt, danach zähl ich die Geräte auch mal durch

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

ja wenn die gezählt werden, sollten die auch in der liste auftauchen. evtl siehst du da schon Unstimmigkeiten. Oder vorher wurden Geräte nicht richtig gefunden?

@crunchip77
Copy link
Author

@ciddi89 also mir fällt jetzt nix auf, und vorher dachte ich auch das die Anzahl passt. Die device-watcher.0.countAll hat ja nix mit der blacklist zu tun, das sind ja alle erkannten Geräte. Jedenfalls sieht man den alten Stand noch in Grafana, vor dem Update. Es war auch nur 1 Gerät offline sowie jetzt auch, muss also vorher doch was falsch gewesen sein, zwecks Anzahl, Allerdings die anderen 17 "offline" stehn mittlerweile in der blacklist, trotzdem werden sie als offline angezeigt, seit mehr als einer Stunde und auch Neustart der Instanz.
image

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Die device-watcher.0.countAll hat ja nix mit der blacklist zu tun, das sind ja alle erkannten Geräte.

Im ersten moment ja, aber sobald sie auf der Blacklist stehen tauchen sie nicht mehr in den Daten auf die der User sehen kann. nur intern gibt es eine raw liste mit allen Geräten.

Hast du Ignorieren in der Liste in den Einstellungen mit angehakt?

@crunchip77
Copy link
Author

Hast du Ignorieren in der Liste in den Einstellungen mit angehakt?

nein, nur die Geräte eingetragen

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Um sie zu ignorieren müssen die punkte auch angehakt werden wo diese ignoriert werden sollen.

@crunchip77
Copy link
Author

wo diese ignoriert werden sollen

achso, jetzt komm ich mit, darauf hatte ich gar nicht geachtet, in der Regel setz ich ja ein Gerät auf die blacklist damit es eben nicht aufgelistet bzw darüber nicht benachrichtigt werde. Habe nun den Haken gesetzt bei Ignorieren in der Liste , nun sind sie weg und tauchen auch nicht mehr in der Benachrichtigung auf. Daher stellt sich die Frage, für was ist der Haken In Benachrichtigungen ignorieren

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

Ja es gibt Leute die möchten diese gerne in den Listen haben aber keine Benachrichtigung und andersrum. Deswegen die zusätzliche Möglichkeit dies auszuwählen...

Aber warum die dann in beiden bei dir raus sind obwohl du nur Liste gewählt hast muss ich mal prüfen

@ciddi89
Copy link
Collaborator

ciddi89 commented Nov 6, 2022

okay mit commit 77465ad sollte das letzte problem auch gefixt sein.

@crunchip77
Copy link
Author

@ciddi89 schaut jetzt gut aus und prima für den schnellen fix 👍, dann schliesse ich hier mal

ciddi89 added a commit that referenced this issue Nov 12, 2022
-   added status to battery list
-   batt devices which are offline are now still included in the battery list
-   small improvements of translations
-   offline time settings: you can use 0 instead of -1 (it will be the new standard)
-   improvements of adaptername
-   fixed issues [#66](#66) & [#67](#67)
-   repaired blacklist notifications
-   added handling for blacklist object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants