miband4 icon indicating copy to clipboard operation
miband4 copied to clipboard

Can be used for home automation

Open ricardojlrufino opened this issue 6 years ago • 9 comments

It is possible to listen for click / navigation events ?

ricardojlrufino avatar Dec 11 '19 23:12 ricardojlrufino

Yes, it is possible to listen to events from the music player in the band.

satcar77 avatar Dec 12 '19 04:12 satcar77

Hi, it is possible to listen to sleep detection event ? Thank you

MrVinceZ avatar Feb 24 '20 20:02 MrVinceZ

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.

satcar77 avatar Feb 25 '20 04:02 satcar77

Do you know where I can found the signification of every value ? Thank you

MrVinceZ avatar Jun 02 '20 17:06 MrVinceZ

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...

ricardojlrufino avatar Jun 02 '20 18:06 ricardojlrufino

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.

satcar77 avatar Jun 03 '20 05:06 satcar77

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;

satcar77 avatar Jun 03 '20 05:06 satcar77

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 avatar Jun 05 '20 06:06 vcuculo

@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

ricardojlrufino avatar Jun 05 '20 15:06 ricardojlrufino