bigdigital / watchdrip

GNU General Public License v3.0
41 stars 13 forks source link

fake weather? #6

Open Nb-tst opened 1 year ago

Nb-tst commented 1 year ago

Hi Artem, thanks for your precious work. Having reading on the watch it's been a life changer. This is probably more of a discussion than a specific bug report/enhancement request. I was wondering if there is a specific reason because of you did not try a weather info mocking approach for providing data to mi band 5/6. Currently a watchface is loaded every 5 minutes, leading to battery consumption, risk of disconnections during the upload and a slow update when not in good range.

With band 5/6 a lot of weather data could be displayed: current temp [ range -40/40 ] day temp [same] night temp [same] weather image [ cloudy, sunny, etc ] UV [ range 0/10] wind [ range 0/30 ] humidity [ range 0/100 ]

With a proper watchface it could be rearranged as:

current blood glucose: two digits from current temp and last from UV ( max 400 ) trend arrows: changing weather images, there are far more than 7 trend number: another temp [ range -40/40, should be enough, also it has +/-] last reading time: hh:mm = wind : humidity If there is a temp value check ( I was reading about some watches doing a value checking on min/max , the trend number could be maybe rearranged to use min or max depending on bg aka current temp.

Free three app also has tried this approach. https://insulinclub.de/index.php?thread/33795-free-three-ein-xposed-lsposed-modul-f%C3%BCr-libre-3-aktueller-wert-am-sperrbildschir/&postID=673709#post673709 image image

https://amazfitwatchfaces.com/storage/mi-band-5/img/1612146130_c3cd90b75b.gif

I'm not enough skilled to accomplish this, but nonetheless I was thinking about thinkering in order to at least have a proper watchface and then try go for the app, but thinking about your expertise with these devices I was wondering if there is some major downside/feature block that I'm not aware of which prevented you to follow this way and would make all of this a waste of time.

I know that with zepp os all of this will be not needed anymore, but that applies to higher tier models as miband 7 seems not to going to be supported, and I think that it would be better to have an affordable for everyone solution.

bigdigital commented 1 year ago

This is from what i started at the beginning. But there was no weather data at the time i started this project ( miband4) . Initially i used the date to encode bg value. And this approach works well, but if you try to use your watch together with some app that also can update the info which was encoded, this can lead to a total mess. The same for fake weather. Assume the xdrip encoded the weather data and updated your watch with this data. This would work only if you use only wacthdrip to communicate with your watch. But most of the users want to use all watch features like activity monitoring, notification from the aps. So they would use some app which would communicate with the watch also. This app also would update the weather date and once it would be update, you will receive a wrong info on your watch. That's why i'm avoiding using such data interpretation.

Nb-tst commented 1 year ago

Thanks for you reply.

I understand your points. I don't know if it's possible to hack zepp app weather provider, but this could probably work with Gadgetbridge. It has a fairly complete support for mi band 5/6, and also an initial one for the new mi band 7 which hopefully will gain more features in the coming months, so it makes sense to spend time on it.

An ideal goal would be to have a fake weather app which receives blood glucose data from xDrip, maybe using your broadcast API, and it is used by GB as weather data source ( in fact the same approach of FreeThree ). GB would be the only app controlling mi bands ( it can control alarms, notifications, calls, HRM, activities and so on ) so there would be no conflicts between apps and nearly full functionality. The major downside I see is that probably not so many people would switch from Zepp app to Gadgetbridge, so this would remain a niche project. But it makes sense to me, so I think i will give at least a try to see how far I can go.

atomphil commented 1 year ago

Hello, the Gadgetbridge feature was fortunately integrated into Free Three at my request by @DecentWoodpecker67 .

It makes the old Bip (which is too slow for WatchDrip) usable for Libre3. I have created a suitable watchface here.

Currently I use Bip S and Bip S lite watches with a watchface that displays both the values from xDrip via WatchDrip, and the minutely values from the Libre3 app via Free Three/Gadgetbridge. (This wf is currently under development, I will post when it is ready.) This works quite well.

Thanks to the new editor, more values could now be displayed on the watchface, to be able to use these variables the Gadgetbridge connection of Free Three has been extended. Unfortunately the implementation of the weather data processing in Gadgetbridge is not complete and some of the possible values are not even changeable via the weather interface. I have opened an issue at Gadgetbridge. Feel free to join or ask there and show your interest in the topic.

Nb-tst commented 1 year ago

Thanks. As I don't want to hijack this repo, I created a new one for discussing about this specific topic. It 's still not more than a sketch, hopefully I will add a better explanation and structure in the next days.

https://github.com/Nb-tst/glucose-to-weather

Nb-tst commented 1 year ago

An update. I managed to send xDrip bg readings to Amazfit band 5 and display them using weather values, details are in the repo mentioned in the previous comment

Code is probably very bad, I actually cannot say as I yesterday was the first time I used Java. But still I think that maybe this could be useful as a proof of concept.