[V4] Dev service Withings

Hi @euguuu ,
Sorry for not replying sooner, Docker runs on a VM on my Freebox so yes, and

Hello,

thank you for your feedback,
this display only indicates the execution of the data aggregation tasks for the charts; it has no connection with fetching the latest data (the display of « NaN ans » is a bug that has nothing to do with this integration and was fixed in the latest versions but the image I made is older than that fix).

can you check the logs to see if there is an error related to Withings?
and it seems to me that the charts that show the last 24h use the raw data and not aggregated data, do you also have this problem if you look at just the last 24h?

For your information @euguuu there is a bug in the function device.saveHistoricalState.js, the aggregation calculation doesn’t work because the value set in the device_feature is not correct.

I noticed the bug in the Enedis integration tests because I also use this function.

I am in the process of fixing this bug

Hi @euguuu,

Can you tell me which log file to provide, please?
Yes, I have the same problem in the last 24 hours, the heart rate graph on my watch isn’t displaying anything.

You need to run docker logs gladys to view the logs.

@euguuu the bug I had noticed in the aggregation of « historical » values has been fixed in Gladys Assistant v4.20, if you rebase your PR you’ll get the fixed version :slight_smile:

1 Like

I rebuilt a Docker image to test and see if the problem persists

1 Like

Hello @euguuu,
Sorry for not getting back sooner, I still have the same sync issue; on April 6 I disconnected and reconnected the integration, the data updated correctly but nothing since.
I just restarted the gladys container.
For the logs there is a way to save them to a file, I’ve lost the command to do it.

Hi,

did you properly reinstall the image with the new version?

for the logs you can do something like this: docker logs gladys >your_file.log

Hi,

Not yet, I’ll try as soon as possible.

Hello @euguuu,
I just installed the new version, for now no change, should I wait until tonight?
Here are the logs made just after the new install :

gladys@GladysTest:~$ docker logs gladys
start:prod
cross-env NODE_ENV=production node index.js

2023-04-26T18:31:10+0200 job.purge.js:17 (Job.purge) Deleting all background jobs created before = Wed Apr 19 2023 18:31:09 GMT+0200 (Central European Summer Time)
2023-04-26T18:31:31+0200 index.js:14 (Object.start) starting Alexa service
2023-04-26T18:31:32+0200 index.js:15 (Object.start) Starting enedis service
2023-04-26T18:31:32+0200 index.js:17 (Object.start) Starting LAN Manager service
2023-04-26T18:31:32+0200 lan-manager.initPresenceScanner.js:18 (LANManager.initPresenceScanner) LANManager configuration: star ting presence scanner
2023-04-26T18:31:32+0200 index.js:21 (Object.start) Starting example service
2023-04-26T18:31:33+0200 index.js:17 (Object.start) Starting Ecowatt service
2023-04-26T18:31:33+0200 index.js:88 (Object.start) Starting CalDAV service
2023-04-26T18:31:34+0200 index.js:16 (Object.start) starting Broadlink service
2023-04-26T18:31:35+0200 index.js:18 (Object.start) Starting HomeKit service
2023-04-26T18:31:36+0200 index.js:14 (Object.start) starting GoogleActions service
2023-04-26T18:31:36+0200 init.js:31 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle not attached
2023-04-26T18:31:37+0200 index.js:18 (Object.start) Starting TP-Link service
2023-04-26T18:31:37+0200 index.js:17 (Object.start) Starting eWeLink service
2023-04-26T18:31:37+0200 service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
2023-04-26T18:31:38+0200 index.js:15 (Object.start) Starting Bluetooth service
2023-04-26T18:31:39+0200 service.start.js:44 (Service.start) Unable to start service bluetooth Error: EAFNOSUPPORT, Address fa mily not supported by protocol
at new Hci (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:80:18)
at new NobleBindings (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:25:15)
at module.exports (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/resolve-bindings.js:13:12)
at Object. (/src/server/services/bluetooth/node_modules/@abandonware/noble/index.js:2:51)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Function.Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at BluetoothManager.start (/src/server/services/bluetooth/lib/commands/bluetooth.start.js:16:20)
at Object.start (/src/server/services/bluetooth/index.js:16:28)
at Service.start (/src/server/lib/service/service.start.js:33:21) {
errno: 97,
code: ‹ EAFNOSUPPORT ›,
syscall: ‹ socket ›
}
2023-04-26T18:31:40+0200 index.js:15 (Object.start) Starting Tasmota service
2023-04-26T18:31:40+0200 index.js:14 (Object.start) Starting Xiaomi service
2023-04-26T18:31:40+0200 index.js:13 (Object.start) Starting usb service
2023-04-26T18:31:41+0200 index.js:19 (Object.start) Starting Telegram service
2023-04-26T18:31:41+0200 service.start.js:40 (Service.start) Service telegram is not configured, so it was not started.
2023-04-26T18:31:41+0200 index.js:16 (Object.start) Starting RTSP service
2023-04-26T18:31:42+0200 index.js:18 (Object.start) Starting Philips Hue service
2023-04-26T18:31:42+0200 index.js:16 (Object.start) Starting MQTT service
2023-04-26T18:31:42+0200 updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes…
2023-04-26T18:31:42+0200 updateContainer.js:18 (MqttHandler.updateContainer) MQTT: update #3 of mosquitto container required…
2023-04-26T18:31:51+0200 installContainer.js:18 (MqttHandler.installContainer) MQTT broker is being installed as Docker contai ner…
2023-04-26T18:31:51+0200 installContainer.js:22 (MqttHandler.installContainer) Check Gladys network…
2023-04-26T18:31:51+0200 installContainer.js:28 (MqttHandler.installContainer) Pulling eclipse-mosquitto:2 image…
2023-04-26T18:32:08+0200 installContainer.js:32 (MqttHandler.installContainer) Preparing broker environment…
2023-04-26T18:32:08+0200 configureContainer.js:26 (MqttHandler.configureContainer) MQTT broker Docker container is being confi gured…
2023-04-26T18:32:09+0200 configureContainer.js:35 (MqttHandler.configureContainer) eclipse-mosquitto configuration file alread y exists.
2023-04-26T18:32:09+0200 installContainer.js:35 (MqttHandler.installContainer) Creating container…
2023-04-26T18:32:14+0200 installContainer.js:43 (MqttHandler.installContainer) MQTT broker successfully installed as Docker co ntainer
2023-04-26T18:32:14+0200 installContainer.js:73 (MqttHandler.installContainer) MQTT installed
2023-04-26T18:32:17+0200 updateContainer.js:39 (MqttHandler.updateContainer) MQTT: update #3 of mosquitto container done
2023-04-26T18:32:17+0200 connect.js:50 (MqttClient.) Error while connecting to MQTT - Error: Connection refused: No t authorized
2023-04-26T18:32:17+0200 index.js:20 (Object.start) Starting Open Weather service
2023-04-26T18:32:17+0200 service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2023-04-26T18:32:18+0200 scene.dailyUpdate.js:58 () Sunrise today is at 6:45 today, in your timezone = Europe/Paris
2023-04-26T18:32:18+0200 scene.dailyUpdate.js:59 () Sunset today is at 20:54 today, in your timezone = Europe/Paris
2023-04-26T18:32:18+0200 scene.dailyUpdate.js:70 () The sun rose this morning. Not scheduling for today.
2023-04-26T18:32:18+0200 scene.dailyUpdate.js:81 () Sunset is scheduled, in 2 hours.
2023-04-26T18:32:19+0200 device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feat ure state for interval hourly
2023-04-26T18:32:19+0200 index.js:63 (Server.) Server listening on port 80
2023-04-26T18:32:37+0200 device.calculateAggregate.js:105 (ChildProcess.) device.calculateAggregate: Finishing proc essing for interval hourly
2023-04-26T18:32:38+0200 device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feat ure state for interval daily
2023-04-26T18:32:48+0200 device.calculateAggregate.js:105 (ChildProcess.) device.calculateAggregate: Finishing proc essing for interval daily
2023-04-26T18:32:49+0200 device.calculateAggregate.js:38 (DeviceManager.calculateAggregate) Calculating aggregates device feat ure state for interval monthly
2023-04-26T18:33:00+0200 scene.checkCalendarTriggers.js:24 (SceneManager.checkCalendarTriggers) Checking calendar triggers at Wed, 26 Apr 2023 16:33:00 GMT
2023-04-26T18:33:00+0200 device.calculateAggregate.js:105 (ChildProcess.) device.calculateAggregate: Finishing proc essing for interval monthly

Hello,

I think I have found where the problem was,
I have just published a new image with a fix; for these tests I set the measurements to refresh every minute (you need to recreate the devices to take advantage of it)

I would welcome any feedback

Hi,

@gaelbillon would you have time to test my latest fix?

Good evening @euguuu,
Yes, available to test

Hi @euguuu,

To run the tests, do I need to delete my current instance and create a new one?

Hi,

You need to remove the existing Docker image and restart Docker with the same image, and in the Withings integration you need to disconnect your account and reconnect the account and device (polling will then run every minute)

1 Like

Hi @euguuu,

I’ve just done the update, I’ll test and get back to you.

Good evening @euguuu,

Well, no good news — after reinstalling on Wednesday there hasn’t been any data coming through since, even though I weighed myself yesterday and today.

Moreover, all the features have the same name!

Hello,
I would be interested in buying a scale but after skimming the 138 posts, I don’t know if anyone uses one and how to integrate it afterwards.
Thanks

Hi @Jluc,

Unfortunately, the Withings integration is not yet in Gladys.

I haven’t had any news beyond the last messages on this thread, and from what I can see, @euguuu’s last login to this forum was a year ago

If anyone wants to pick up the integration, or restart development, I’m still here to help as usual :slight_smile:

2 Likes