majki09 / lumiax_solar_bt

Scripts for getting data from Lumiax MPPT solar regulator with BT
Creative Commons Zero v1.0 Universal
1 stars 0 forks source link

timeout on connection, solved #1

Open Alana-chan opened 10 months ago

Alana-chan commented 10 months ago

have Volt Polska branded solar controler, had problems with constant timeouts on connection attempt, solved via changes to your code:

in function main

  print("adapter started")

modded by alana-chan

  while True:
   try:
    device = adapter.connect(sys.argv[2])
    break
   except pygatt.exceptions.NotConnectedError:
    print('Waiting...')

end mod

  print("connected")

platform: laptop running ubuntu22 with rtl8761b usb dongle

majki09 commented 10 months ago

Hi @Alana-chan! Thanks for your issue. Currently this project is at very early stage of it's development, so many things are missing. I'm planning to add more exceptions and updates, but currently I don't have free time to do so.

If you want to keep your credits into the project, good idea would be for you to create a Pull Request.