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

Batterystatus always return -1 #84

Open
osos opened this issue Mar 20, 2019 · 5 comments
Open

Batterystatus always return -1 #84

osos opened this issue Mar 20, 2019 · 5 comments

Comments

@osos
Copy link

osos commented Mar 20, 2019

I have implemented the new batterystatus, however, the batterystatus event always returns -1.

I am running the flicd linux 64-bit version on a raspberry pi 3.

Could it be that my flic buttons does not support batterystatus? If so can they be firmware updated?

Please advise.

@osos
Copy link
Author

osos commented Mar 20, 2019

From the flic.sqlite3: (partly anonymised)

sqlite> select * from buttons; my_bdaddr|my_bdaddr_type|bdaddr|button_uuid|serial_number|color|curvekey|curvekey_signature|h1|h3|last_values|button_counter|boot_counter|battery_samples|next_battery_index|battery_timestamp b8:27:eb:d0:xx:xx|0|80:e4:da:71:f2:11|085fdd0237fcaf0cf36d313f9c5121b0|AF25-B04264|black|xxxx|xxxx|xxxx|xxxx|1|612|3||0|0

It seems that colums "battery_samples", "next_battery_index" and "battery_timestamp" are always void or zero, which indicates that the "flicd" server never receives or updates the batterystatus.

@aboulfad
Copy link

aboulfad commented May 5, 2019

Bump... I've tested few different flic's (old and recent) and none return battery status and return -1. It's too bad there is no traction or follow-up on most issues.

@osos
Copy link
Author

osos commented Jan 14, 2020

@Emill, any change of an answer on this one?

The problem is, I have some buttons which re rarely used and the event to be triggered is happening in a remote location, so the one pushing the flic button must rely on the button to work. Thus, I need to monitor the buttons to ensure battery is sufficient.

Or, is it possible to ping the buttons?

@Emill
Copy link
Collaborator

Emill commented Jan 14, 2020

How do you mean ping the buttons?
If a button is disconnected and it's not advertising, then the radio is off. If you want to monitor the battery level the button must be connected.

@osos
Copy link
Author

osos commented Jan 14, 2020

So how will I ensure that the button remains connected to advertise its battery status?
The buttons event does all get through until out of battery.
Battery status seems not to be advertised during button events.

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

3 participants