lolouk44 / xiaomi_mi_scale

Connector for Xiaomi Mi Scale
MIT License
326 stars 69 forks source link

After updating to new version it stops working #55

Closed radek-kafka closed 2 years ago

radek-kafka commented 2 years ago

Hi,

I'm very new user of the mi-scale add-on.. I have started today with configuration and have sucess in tranferring data from mi-scale.. After a while it reported to me, that there is update available on 2nd Oct 2022 .. I did the update and since the time no new messages has been received from Mi Scale 2 as I can see in MQTT .. No idea what else shall be updated.

Part of my config: HCI_DEV: hci0 BLUEPY_PASSIVE_SCAN: false MISCALE_MAC: 5C:CA:D3:C7:XX:XX MISCALE_VERSION: 2 MQTT_PREFIX: miscale MQTT_HOST: core-mosquitto MQTT_USERNAME: xxxxx MQTT_PASSWORD: yyyyy MQTT_PORT: 1883 MQTT_RETAIN: false MQTT_DISCOVERY: false MQTT_DISCOVERY_PREFIX: homeassistant MQTT_TLS_CACERTS: Path to CA Cert File MQTT_TLS_INSECURE: false TIME_INTERVAL: 30 USERS:

Some ideas what could be wrong with it ?

Many thanks Radek

lolouk44 commented 2 years ago

Silly question: did you step on the scale to get your weight readings sent? Can you share the logs from the add-on? Have you tried a tool like mqtt Explorer to confirm data is being transferred to your mqtt broker? Your config doesn't look right as it's missing settings for the user. Please check the doc to ensure you have the correct config

radek-kafka commented 2 years ago

Hi .. Yes.. I have stepped on the scale (with some ballast to have different weight).. I did not posted whole config but users shall be there.. The setup of system is RBI PI 4B with Rabsbian and HA installed on top of it (not using HA OS)..

This is the log:

2022-10-02 16:18:24 - Starting Xiaomi mi Scale... 2022-10-02 16:18:24 - Loading Config From Add-On Options... 2022-10-02 16:18:24 - Config Loaded...

2022-10-02 16:18:24 - Initialization Completed, Waiting for Scale...

nothing else.. the addon is terminating in few minutes w/o any message in the log file.. When I start watchdog it is trying to restart each few seconds.. (I'm sure something wrong at my desk/brain .. ) :)

Full config: HCI_DEV: hci0 BLUEPY_PASSIVE_SCAN: false MISCALE_MAC: 5C:CA:XX:XX:XX:XX MISCALE_VERSION: 2 MQTT_PREFIX: miscale MQTT_HOST: core-mosquitto MQTT_USERNAME: XXXXXXXX MQTT_PASSWORD: XXXXXXX MQTT_PORT: 1883 MQTT_RETAIN: true MQTT_DISCOVERY: true MQTT_DISCOVERY_PREFIX: homeassistant MQTT_TLS_CACERTS: Path to CA Cert File MQTT_TLS_INSECURE: false TIME_INTERVAL: 30 USERS:

(just removed some personal and device specific informations)

MQTT Explorer has got last message:

{"weight":81.45,"weight_unit":"kg","bmi":24.06,"basal_metabolism":1510.82,"visceral_fat":16.01,"timestamp":"2022-10-02T14:46:02+00:00"}

And nothing else after the update ..

lolouk44 commented 2 years ago

Thanks. 0.3.1 being published. Update when prompted pls.

radek-kafka commented 2 years ago

Trying to but something is still not complete in docker .. Receiving: Can't install lolouk44/xiaomi-mi-scale-ha-add-on:0.3.1: 404 Client Error for http+docker://localhost/v1.41/images/create?tag=0.3.1&fromImage=lolouk44%2Fxiaomi-mi-scale-ha-add-on&platform=linux%2Farm64: Not Found ("manifest for lolouk44/xiaomi-mi-scale-ha-add-on:0.3.1 not found: manifest unknown: manifest unknown")

radek-kafka commented 2 years ago

updated and and it is the same ... no sign of change ..

lolouk44 commented 2 years ago

Is the add on still rebooting ?

radek-kafka commented 2 years ago

rebooting seems to be better now . I did not see what there was before when watchdog was active ..

lolouk44 commented 2 years ago

What do the logs show when you step on the scale?

radek-kafka commented 2 years ago

Nothing .. is there some way to show debug information ? I'm afraid it is not getting any data from HCI0 internal BT on RBI PI4B .. New library ?

radek-kafka commented 2 years ago

That is all I have in log:

2022-10-02 17:02:47 - Starting Xiaomi mi Scale... 2022-10-02 17:02:47 - Loading Config From Add-On Options... 2022-10-02 17:02:47 - Config Loaded...

2022-10-02 17:02:47 - Initialization Completed, Waiting for Scale...

radek-kafka commented 2 years ago

Hmm.. restarts with WatchDog are still there .. here is the system log:

Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: ------------------------------------- Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: 2022-10-02 17:50:31 - Starting Xiaomi mi Scale... Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: 2022-10-02 17:50:31 - Loading Config From Add-On Options... Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: 2022-10-02 17:50:31 - Config Loaded... Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: ------------------------------------- Oct 2 17:50:31 homeassistant 5e5bc589d7bb[660]: 2022-10-02 17:50:31 - Initialization Completed, Waiting for Scale... Oct 2 17:50:34 homeassistant 532aaac91d03[660]: Oct 2 17:50:34 homeassistant 532aaac91d03[660]: ------------------------------------- Oct 2 17:50:34 homeassistant 532aaac91d03[660]: 2022-10-02 17:50:34 - Starting Xiaomi mi Scale... Oct 2 17:50:34 homeassistant 532aaac91d03[660]: 2022-10-02 17:50:34 - Loading Config From Add-On Options... Oct 2 17:50:34 homeassistant 532aaac91d03[660]: 2022-10-02 17:50:34 - Config Loaded... Oct 2 17:50:34 homeassistant 532aaac91d03[660]: ------------------------------------- Oct 2 17:50:34 homeassistant 532aaac91d03[660]: 2022-10-02 17:50:34 - Initialization Completed, Waiting for Scale... Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: ------------------------------------- Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: 2022-10-02 17:50:40 - Starting Xiaomi mi Scale... Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: 2022-10-02 17:50:40 - Loading Config From Add-On Options... Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: 2022-10-02 17:50:40 - Config Loaded... Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: ------------------------------------- Oct 2 17:50:40 homeassistant 3ebf2232e327[660]: 2022-10-02 17:50:40 - Initialization Completed, Waiting for Scale... Oct 2 17:50:44 homeassistant d367e62af004[660]: Oct 2 17:50:44 homeassistant d367e62af004[660]: ------------------------------------- Oct 2 17:50:44 homeassistant d367e62af004[660]: 2022-10-02 17:50:44 - Starting Xiaomi mi Scale... Oct 2 17:50:44 homeassistant d367e62af004[660]: 2022-10-02 17:50:44 - Loading Config From Add-On Options... Oct 2 17:50:44 homeassistant d367e62af004[660]: 2022-10-02 17:50:44 - Config Loaded... Oct 2 17:50:44 homeassistant d367e62af004[660]: ------------------------------------- Oct 2 17:50:44 homeassistant d367e62af004[660]: 2022-10-02 17:50:44 - Initialization Completed, Waiting for Scale...

shummo commented 2 years ago

For me the same. Everthing works until update. My log:

22-10-03 08:43:16 INFO (SyncWorker_5) [supervisor.docker.interface] Cleaning addon_79ff755f_xiaomi_mi_scale application 22-10-03 08:43:16 INFO (SyncWorker_5) [supervisor.docker.addon] Starting Docker add-on lolouk44/xiaomi-mi-scale-ha-add-on with version 0.3.1 22-10-03 08:43:17 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Xiaomi Mi Scale is stopped, restarting... 22-10-03 08:43:17 INFO (SyncWorker_0) [supervisor.docker.interface] Cleaning addon_79ff755f_xiaomi_mi_scale application

22-10-03 08:43:17 ERROR (SyncWorker_1) [supervisor.docker.interface] Can't read stats from addon_79ff755f_xiaomi_mi_scale: Expecting value: line 1 column 1 (char 0)

22-10-03 08:43:17 ERROR (SyncWorker_2) [supervisor.docker.interface] Can't read stats from addon_79ff755f_xiaomi_mi_scale: Expecting value: line 1 column 1 (char 0) 22-10-03 08:43:18 INFO (SyncWorker_7) [supervisor.docker.addon] Starting Docker add-on lolouk44/xiaomi-mi-scale-ha-add-on with version 0.3.1 22-10-03 08:43:18 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Xiaomi Mi Scale is stopped, restarting... 22-10-03 08:43:18 INFO (SyncWorker_3) [supervisor.docker.interface] Cleaning addon_79ff755f_xiaomi_mi_scale application 22-10-03 08:43:19 INFO (SyncWorker_0) [supervisor.docker.addon] Starting Docker add-on lolouk44/xiaomi-mi-scale-ha-add-on with version 0.3.1 22-10-03 08:43:19 WARNING (MainThread) [supervisor.addons.addon] Watchdog found addon Xiaomi Mi Scale is stopped, restarting...

"Running script with Docker:

Open docker-compose.yml (see below) and edit the environment to suit your configuration...
Stand up the container - docker-compose up -d"

I think that i should update this " - /var/run/dbus/:/var/run/dbus/:ro" How can i update my existing docker file? (My HA SUpervised runs on a Rasbperry Pi 4 > OS: Raspbian (debian11)

insajd commented 2 years ago

Same here, addon 0.3.1 stops working immediately after starting, I could not find any errors. Seems that common theme here is HA installation on top of debian, I have same setup as well - Supervised version.

Radlagerkok commented 2 years ago

have the same problem Screenshot_2022-10-03-13-40-38-968_io homeassistant companion android upload_2022_10_03_13_43_03_053

lolouk44 commented 2 years ago

Marking this as a duplicate of https://github.com/lolouk44/hassio-addons/issues/63 even though this issue was created prior to it, because the other issue was created in the correct repo.