Open ricardojlrufino opened 4 years ago
Yes, it is possible to listen to events from the music player in the band.
Hi, it is possible to listen to sleep detection event ? Thank you
You would have to poll the band to receive activity data frequently and check the category value received from the band. The value for deep sleep is 11 and light sleep is 9.
Do you know where I can found the signification of every value ? Thank you
I implemented a integration with miband4 and ifttt https://www.youtube.com/watch?v=qLhn1YDUCf4 https://ricardojlrufino.wordpress.com/2020/02/26/controle-dispositivos-com-sua-mi-band-4/ sorry, portuguese language...
I implemented a integration with miband4 and ifttt https://www.youtube.com/watch?v=qLhn1YDUCf4 https://ricardojlrufino.wordpress.com/2020/02/26/controle-dispositivos-com-sua-mi-band-4/ sorry, portuguese language...
Awesome. It was really cool.
Do you know where I can found the signification of every value ? Thank you
@MrVinceZ These were the association to the values uncovered by the gadget bridge team. I hope this helps.
// 0 = same activity kind as before
// 1 = light activity walking?
// 3 = definitely non-wear
// 9 = probably light sleep, definitely some kind of sleep
// 10 = ignore, except for hr (if valid)
// 11 = probably deep sleep
// 12 = definitely wake up
// 17 = definitely not sleep related
public static final int TYPE_UNSET = -1;
public static final int TYPE_NO_CHANGE = 0;
public static final int TYPE_ACTIVITY = 1;
public static final int TYPE_RUNNING = 2;
public static final int TYPE_NONWEAR = 3;
public static final int TYPE_RIDE_BIKE = 4;
public static final int TYPE_CHARGING = 6;
public static final int TYPE_LIGHT_SLEEP = 9;
public static final int TYPE_IGNORE = 10;
public static final int TYPE_DEEP_SLEEP = 11;
public static final int TYPE_WAKE_UP = 12;
I implemented a integration with miband4 and ifttt https://www.youtube.com/watch?v=qLhn1YDUCf4 https://ricardojlrufino.wordpress.com/2020/02/26/controle-dispositivos-com-sua-mi-band-4/ sorry, portuguese language...
Nice @ricardojlrufino , but the music player functionality still works or is disabled?
@vcuculo , works ... if you open a music player, it will work normally again ... when you close the player, the system will take control again, some times fail, I'm still testing
It is possible to listen for click / navigation events ?