piggz / harbour-amazfish

Amazfit Bip support for SailfishOS
GNU General Public License v3.0
103 stars 51 forks source link

Weather always shows 2 degrees, instead of actual weather #266

Closed omartijn closed 11 months ago

omartijn commented 1 year ago

I cannot figure out how to get AmazFish to send the right weather data to my PineTime. I'm trying with InfiniTime 1.13.0 from a Sony XPeria 10 II running SFOS 4.5 and AmazFish 2.1.3 installed from Chum.

When I go to Weather under Settings and search for my city, it does pop up with two meaningful results. Clicking on those results then goes back to the Settings main page. It does not seem to remember any chosen option here. It also does not change the weather shown on the watch.

I have a feeling it's probably sending the weather for some other city - where it's mostly exactly two degrees, but I have no idea what exactly is going on.

piggz commented 1 year ago

You could check the logs from the daemon to check what the forcast being sent to the watch is.

Look for lines like Forecast: .........

omartijn commented 1 year ago

I'm not quite sure how to get to the logs. I can't find any log file anywhere. I've tried killing amazfishd and then starting it myself from the terminal, and it does output quite a bit, yet I don't see any lines with Forecast:.

I have checked the config file, and there I do see my city name and if I enter the coordinates from that file into OSM it dead-centers on my city. So it appears that it did store the location correctly - there's just no way to verify it in the UI.

omartijn commented 1 year ago

Output from amazfishd

typescript.txt

piggz commented 1 year ago

It only sends weather info periodically... you can force it from the UI under settings > debug, and then check the logs.

omartijn commented 1 year ago

Ah, forgot to mention that. I did indeed open the UI and tried that while capturing the output from amazfishd.

jmlich commented 11 months ago

I can see also only 2°C, but according to json it should be 12°C. Related JSON and bluetooth messages are visible in the attached log. amazfishd.log

jmlich commented 11 months ago

I can see the issue. It expects temperature in temperature in ceslius * 100. Now it gets Kelvins. which is 270 and it is shown as int, hence 2. I will prepare pull request with fix.