Skip to content

Service stops randomly at some point with "Error getting handles" "Continue Comms: False" #109

Description

@Boldfor

Setting:

  • Raspberry Pi 3 B+
  • OS: Raspberry Pi OS 11 (Bullseye), 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7
  • Bluetooth adapter: Onboard
  • Bluez: 5.55
  • Pygatt: 4.0.5

BS440 set up according to this procedure: https://community.openhab.org/t/use-case-connecting-a-bathroom-body-fat-scale-e-g-medisana-bs440-via-bluetooth-mqtt-to-openhab-step-by-step-instruction/143296/1

Problem description:
Everything runs smooth, except that the script (if run as a service) stops working randomly at some point in time. The last thing I see via journalctl -l -f -u bs440:

Jan 31 12:51:03 raspberrypi sudo[29421]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Jan 31 12:51:03 raspberrypi sudo[29421]: pam_unix(sudo:session): session closed for user root
Jan 31 14:51:05 raspberrypi sudo[5545]:     root : PWD=/home/pi/BS440-HA-AD ; USER=root ; COMMAND=/usr/bin/systemctl restart bluetooth
Jan 31 14:51:05 raspberrypi sudo[5545]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Jan 31 14:51:11 raspberrypi sudo[5545]: pam_unix(sudo:session): session closed for user root
Jan 31 14:51:11 raspberrypi sudo[5568]:     root : PWD=/home/pi/BS440-HA-AD ; USER=root ; COMMAND=/usr/bin/hciconfig hci0 reset
Jan 31 14:51:11 raspberrypi sudo[5568]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=0)
Jan 31 14:51:11 raspberrypi sudo[5568]: pam_unix(sudo:session): session closed for user root
Jan 31 16:50:46 raspberrypi python[2150]: 2023-01-31 16:50:46,512 WARNING  <module> Error getting handles
Jan 31 16:50:46 raspberrypi python[2150]: 2023-01-31 16:50:46,517 INFO     <module> Continue Comms: False

Other than that, if the scale transmits data, nothing gets logged anymore. The only thing that helps is stopping the script via systemctl stop bs440 and manually starting it again either via python BS440.py or as a service via systemctl start bs440`.

Even though Restart=always is defined in the service file, the service does not seem to come up again. My current thought: The service is not stopped (otherwise it would restart) but somehow stops functioning?

What's also odd (looking at the log above: The service always stops working (probably with the last entry) some hours after having started, and while no action has been going on on the scale itself.

Anyone having a clue?

Edit: My problem seems to be identical to the one reported here: #95

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions