Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't poll/pair for BT device if polling mode is force closed #97

Open
MrBryan opened this issue Jan 3, 2025 · 2 comments
Open

Can't poll/pair for BT device if polling mode is force closed #97

MrBryan opened this issue Jan 3, 2025 · 2 comments

Comments

@MrBryan
Copy link

MrBryan commented Jan 3, 2025

If I ever close the process that is happily polling my bt-2, it won't work when i start it up again.

Only way to fix is go to the BT-2 and plug and replug it.

I also can not use the native renogy app at this stage. It seems it ties up the BT pairing or something like this. Perhaps there is a way to flush it?

(I hid the mac address belwo)

`INFO:root:BT-HIDDEN     => {'function': 'READ', 'model': 'RNG-CTRL-RVR30', 'device_id': 16, 'battery_percentage': 42, 'battery_voltage': 12.0, 'battery_current': 0.4, 'battery_temperature
ontroller_temperature': 8, 'load_status': 'off', 'load_voltage': 0.0, 'load_current': 0.0, 'load_power': 0, 'pv_voltage': 26.4, 'pv_current': 0.18, 'pv_power': 5, 'max_charging_power_today': 7
scharging_power_today': 0, 'charging_amp_hours_today': 1, 'discharging_amp_hours_today': 0, 'power_generation_today': 12, 'power_consumption_today': 0, 'power_generation_total': 953, 'charging
 'mppt', 'battery_type': 'sealed', '__device': 'rover-li', '__client': 'RoverClient'}

pvoutput <Response [200]>

^CERROR:root:Exception occured: KeyboardInterrupt

ERROR:root:on_error: KeyboardInterrupt

^C

mrbryan@raspberrypi:~/renogy-bt $ python3 ./example.py config.ini
INFO:root:Init RoverClient: rover-li => HIDDENMAC
INFO:root:Starting discovery...
INFO:root:Devices found: 6
ERROR:root:Device not found: rover-li => HIDDENMAC, please check the details provided.`
@MrBryan
Copy link
Author

MrBryan commented Jan 3, 2025

seems if i do

sudo hciconfig hci0 reset
sudo invoke-rc.d bluetooth restart

on my raspberry pi zero 2 w

that lets it find it again.. but maybe some kind of routine to unpair should be built in when a term signal is received

Cheers

@cyrils
Copy link
Owner

cyrils commented Jan 3, 2025

Looks like it won't disconnect clean on KeyboardInterrupt, but it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants