warmsound / crystal-face

Garmin Connect IQ watch face
https://apps.garmin.com/en-GB/apps/9fd04d09-8c80-4c81-9257-17cfa0f0081b
GNU General Public License v3.0
390 stars 126 forks source link

Adding support for Tempe #74

Open ryobg opened 6 years ago

ryobg commented 6 years ago

Hi,

thank you for your great project. Got the watch recently, yours was the most appreciated from the rest. I was curious about the temperature readings, then understood these are coming from the watch itself, so I took the Garmin Tempe sensor. But it looks like the temperature field is still bound to the internal sensor?

Is it possible to add support for their device? I'm noob at this field, but this looks like Ant+ sensor, so I have digged around a bit, with the idea to help/guide somehow this request:

(scroll to the end) https://developer.garmin.com/connect-iq/programmers-guide/positioning-sensors/

https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/AntPlus.html

https://github.com/garmin/connectiq-apps/blob/71c34f7f134386901e4fff0a7292d3c3c76b28d8/device-apps/namaste/source/TempeSensor.mc

Hope these somewhat help... Thanks!

warmsound commented 6 years ago

Thanks for your kind words, and for all the research you've done into supporting the Tempe sensor.

This might be trickier than it first seems, due to the restrictions of a watch face. Your first link mentions the use of Sensor.Info, which, according to this, is only supported by widgets and apps, and unfortunately not watch faces. Your final link is of course an app.

This thread might provide some hope, in that a background process may be able to access the sensor data (I'd have to confirm this). But even then, there's a time limit on how long a background process can run, so this will require some additional experimentation.

I've recently introduced a background process for adding time zone support, so at least the foundations will already in the code. If there's any movement on this, I'll be sure to post an update here.

ryobg commented 6 years ago

Thank you for considering. I see... readings can be rare anyway. If I can help with some testing or so, later - let me know.

xtrimsky commented 6 years ago

I would also love a weather temperature reading. I know other watch faces included simply a reading from https://openweathermap.org/ which requires an API key.

warmsound commented 6 years ago

Sorry for the delay in replying, as I've been on holiday. A weather reading has been a popular request - I'll use the aforementioned background process to achieve this. #46 is the feature request.

ryobg commented 6 years ago

Yep, I believe the web weather poll is different than this request.

mestorlx commented 5 years ago

@warmsound I tried using the background service to read the Tempe sensor but it did not work. The service will last for 30 seconds or so and the Tempe sensor will broadcast data every minute or so. I will need to explore if its posible to relaunch the background service until a tempe value is received.

mestorlx commented 5 years ago

@warmsound So basically if we use Bg.registerForTemporalEvent(new Time.Duration(5 * 60)); will allow to check the Tempe sensor every 5 minutes. Because the background service only last 30 Seconds you may o may not get the temperature reading using sensorInfo.temperature since Tempe broadcast about once every minute. I will try next to implement the Ant profile from background service but I do not expect any better results.

warmsound commented 5 years ago

@mestorlx, sorry for the delay, and thanks for your detailed investigation into this - a glimmer of home, but a real shame that it doesn't work out because of timing restrictions. I'll keep my fingers crossed in the distant hope that an alternative solution exists 🤞

BartTaylor commented 5 years ago

This would be a great feature if you guys could sort out how to make it work. 👍