Closed mcm1957 closed 11 months ago
According zu other feedback the adapter seems to work
https://forum.iobroker.net/topic/68290/js-controller-5-0-x-jetzt-f%C3%BCr-alle-user-im-stable/86
Hi, I tested and make some try with different and no data incoming.. The adapter crash here too, if no data from the Fitbit is coming, example: I have no Fitbit device, but select the option on in the settings, than the adapter crash with the faults above..
So as a workaround for everybody, select in the adapter settings only what you have on devices and data can be coming in... ( in my config is only weight selected, this works fine)
For me, it crashes, as soon as I enable syncing the activity data. I have a device and the battery state is shown correctly, even my weight is synced and this is imported from another service. But without the actual activity data, it is failed the main goal for my understanding. I would be thankful for a fix.
Es scheint an den "Aktivitäten" zu liegen. Deaktiviert man diese. Läuft es. Sobald man sie wieder rein nimmt:
`
fitbit-fitness.0 | 2023-09-26 07:35:05.299 | error | undefined is not a valid state value -- | -- | -- | -- fitbit-fitness.0 | 2023-09-26 07:35:05.299 | error | Error: undefined is not a valid state value at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17) at FitBit._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5439:49) at FitBit.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5400:21) at FitBit.setActivityStates (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:321:9) at FitBit.getActivityRecords (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:305:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async FitBit.getFitbitRecords (/opt/iobroker/node_modules/iobroker.fitbit-fitness/main.js:87:5) fitbit-fitness.0 | 2023-09-26 07:35:05.297 | error | unhandled promise rejection: undefined is not a valid state value fitbit-fitness.0 | 2023-09-26 07:35:05.297 | error | Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().`
Wenn einer der Werte noch leer ist (zum Beispiel die Stockwerke), dann crasht es. Scheinbar sendet Fitbit die Daten in dem Fall einfach nicht. In meinem Pull request (#14) ist das Problem abgefangen
Ok. Wie bekommt man den zum Test auf sein System? Github Installation vom Adapter?
Du müsstest ihn direkt aus der URL (https://github.com/boergegrunicke/ioBroker.fitbit-fitness/tree/main) installieren können, denke ich.
Hallo zusammen, Ich werde mir das ansehen. Werde alsbald neue Release mit den Korrekturen absetzen. lG Chris
New version 0.4.11 released please check, thx to @boergegrunicke
Thanks for release. Should be available at latrs repo this afternoon.
Please create a stable PR if tests are successful and mention js-controller 5 fix to process it at fadt kane if desired.
@Chris-656 0.4.11 will be in stable soon, or have i to install it from the github link in iobroker?
Please comment if problem still exists with 0.4.11. Oterhwise I will close this issue in end of october.
Problem still existent with 0.4.11
@BenAhrdt In this case, please post some logs, to make understandable, what is going wrong. For me, everything is fine now.
`
fitbit-fitness.0 | 2023-10-25 04:49:43.469 | error | Adapter Connection: Error: AxiosError: Request failed with status code 401 -- | -- | -- | -- fitbit-fitness.0 | 2023-10-25 04:49:43.177 | info | starting. Version 0.4.11 in /opt/iobroker/node_modules/iobroker.fitbit-fitness, node: v18.18.2, js-controller: 5.0.12 fitbit-fitness.0 | 2023-10-25 04:49:42.811 | debug | States connected to redis: 127.0.0.1:9000 fitbit-fitness.0 | 2023-10-25 04:49:42.748 | debug | States create User PubSub Client fitbit-fitness.0 | 2023-10-25 04:49:42.747 | debug | States create System PubSub Client fitbit-fitness.0 | 2023-10-25 04:49:42.734 | debug | Redis States: Use Redis connection: 127.0.0.1:9000 fitbit-fitness.0 | 2023-10-25 04:49:42.704 | debug | Objects connected to redis: 127.0.0.1:9001 fitbit-fitness.0 | 2023-10-25 04:49:42.700 | debug | Objects client initialize lua scripts fitbit-fitness.0 | 2023-10-25 04:49:42.658 | debug | Objects create User PubSub Client fitbit-fitness.0 | 2023-10-25 04:49:42.657 | debug | Objects create System PubSub Client fitbit-fitness.0 | 2023-10-25 04:49:42.655 | debug | Objects client ready ... initialize now fitbit-fitness.0 | 2023-10-25 04:49:42.585 | debug | Redis Objects: Use Redis connection: 127.0.0.1:9001`
I do not see an error.
@mcm1957 doch der erste Eintrag. Axios error 401. Es werden keine Daten aktualisiert, der Adapter bleibt gelb. Die ist seit js. 5.x so
Ups richtig. Das ist aber offensichtlich ein anderer Fehler als in 0.4.10. Mal abwarten was @boergegrunicke dazu sagt. 4xx sind normalerweise Berechtigungsfehler.
401 ist nicht autorisiert und deutet wohl darauf hin, dass die Anmeldung nicht mehr gültig ist. In den Adaptereinstellungen einmal "Update Token" sollte das Problem beheben.
@boergegrunicke ich habe es schon mal aktualisiert. Lief ca. 3 Tag…. Habe es jetzt wieder gemacht. Adapter ohne Fehler…. Allerdings immer noch kein Eintrag beim Puls… ich weiß anderes issue. ![Uploading 7D05F976-DB1F-47C4-AB98-89CA407DB598.jpeg…]()
Ist diese Problem mit 0.5.0 gefixet ?
Feedback at PR https://github.com/ioBroker/ioBroker.repositories/pull/2960
In my environment:
starting. Version 0.4.10 in /opt/iobroker/node_modules/iobroker.fitbit-fitness, node: v16.20.2, js-controller: 5.0.12
it works fine without any issues
regards Chris
So lets close here
Scheint gefixt zu sein, aber wurde auch deinstalliert
This adapter seems to be incompatible with js-controller 5
See https://forum.iobroker.net/topic/68328/fitbit-app-l%C3%A4uft-mit-js-controller-5-0-12-nicht-mehr