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 be used for home automation #5

Open
ricardojlrufino opened this issue Dec 11, 2019 · 9 comments
Open

Can be used for home automation #5

ricardojlrufino opened this issue Dec 11, 2019 · 9 comments

Comments

@ricardojlrufino
Copy link

It is possible to listen for click / navigation events ?

@satcar77
Copy link
Owner

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

@MrVinceZ
Copy link

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

@satcar77
Copy link
Owner

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.

@MrVinceZ
Copy link

MrVinceZ commented Jun 2, 2020

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

@ricardojlrufino
Copy link
Author

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

@satcar77
Copy link
Owner

satcar77 commented Jun 3, 2020

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
Copy link
Owner

satcar77 commented Jun 3, 2020

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;

@vcuculo
Copy link

vcuculo commented Jun 5, 2020

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?

@ricardojlrufino
Copy link
Author

@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

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

4 participants