That fixed it in the simulator, if I run into issues on the device I will let you know!
Thanks for the quick fix!
That fixed it in the simulator, if I run into issues on the device I will let you know!
Thanks for the quick fix!
Hi, I am now also trying to integrate a weather information in my home page.
I did own an older darksky API key and I thus used the darksky plugin.
So far so good, I can get all the information related to my location.
But since I am living in France, I changed the units indication to si, meaning metric units.
The point is that wind speed shows as MPH whereas I would like to get it in kmh.
How would I proceed to change the displayed unit?
Thanks,
Daniel
It currently is not possible to override the units for certain attributes in a Plugin. I know this is something that is needed & is definitely coming.
For the time being you have a few options:
In your XAML pages, use the unitless value & then manually add your kmh
units to it. Appending “.Value” to any device binding will give you the unitless value. For example, bind your Label’s Text
property to @Device.Wind.Value
In the plugin, create a new attribute. Call it WindSpeedKMH
or something like that. Replace all of the Wind
references in the plugin with your new attribute WindSpeedKMH
.
Thanks, this made it. I used the unitless value and appended a label with the unit.
Thanks,
Daniel
Tile Problem - Bug or Function?
For my Android tablet, I have created an OpenWeather app, and there is an area (1280X400 dpi) that is intended for a Tile with a weekly forecast.
I therefore created my Tile 394x179 dpi for 7 pcs would fit in that area. But as the picture shows, it only fits 5 weather tiles.
I need to reduce the size by ~ 0.75 to 296x132 dpi for them to display correctly.
Is it a bug, or have I done something wrong?
Screenshot from my Tablet with truncated Tiles
Screenshot from Designer with Tile 394x179 dpi
Screenshot from my Tablet with reduced dimensions
The Home Remote’s sizes are not necessarily DPI. If it’s an Android tablet, it’s DP pixels we want. There’s an app called “Screen Size” you can install to find those values.
Many thanks for the information, for this I did not know.
The manufacturer states the resolution 800x1280, which I used, but in Designer it should in my case be 600x962.
So now the layout is absolutely perfect!
I like Home Remote more and more, and it’s time to shut down ImperiHome!
I would like to change the units to European values. Is it easy to do?
I assume that I need to change something in the script, but not sure.
Thank you.
Which attributes in particular are you wanting to change? I think the plugin uses a generic degree symbol (°) for temperatures.
If there are some that you would like to override you can make the change on your XAML page rather than change the plugin. The raw unitless value for most attributes can be accessed by appending a “.Unit” to your bindings {Binding @Device.Temperature.Value}
.
Thanks Bill, I would like to change temperature values to Celsius instead of Fahrenheit.
I have had a
Oh, so you’re saying the numeric values themselves aren’t scaled properly. That will require a plugin change. I thought it was only the display units. I’m not too familiar with that code or the API myself. There may be a parameter that needs to be set on the HTTP request so that it returns Celsius values. If the API only returns Fahrenheit then you’ll have to add your own scaling method.
Thanks again.
I would like it to 15 instead of 59…and 0 instead of 32…ie display the Celsius value instead of the Fahrenheit value.
I have found this suggestions online, but am not sure how to incorporate in the script:-
https://api.forecast.io/forecast/APIKEY/LATITUDE,LONGITUDE?lang=zh-tw&units=si
The URL you have is not correct. That’s not the same API. You need to replace “imperial” with “metric” on line 30.
When I change from DarkSky plugin to OpenWeather plugin, now there are no values whatsoever for any parameters or icons
I assumed you were using the OpenWeatherMap API. That is the title of the discussion:)
What I sent earlier did not apply to your Dark Sky project. Do not import my changes into there because it will not work with that.
Sorry Bill, My bad!.
I don’t mind whether I use OpenWeather or Dark Sky. I really like the idea and I copied the DarkSky_Weather.hrp from gregkinney above. I naively thought that I could interchange the Dark Sky and OpenWeather info.
Is it possible to amend the units on the Dark Sky system, or is it there any info to use Openweather project system instead?
Thanks again for your help.
Neither of these plugins are officially supported. My help is going to be somewhat limited on this topic. Maybe someone else can answer your question.
I don’t know everything you’ve already tried but you can see where the URL query parameters are in the script. Try adding your si
parameter to it.
It’ll probably be easier to use a web widget. That’s another option you can look into. Or submit a feature request for an official weather integration.
Thank you again Bill.
I managed it with the Dark Sky script by changing line 26 to var forecastUrl = “https://api.darksky.net/forecast/” + apiKey + “/” + latitude + “,” + longitude + “?exclude=minutely,hourly,flag,lang=zh-tw&units=si”
Trying to set up some weather status on a page, using the openweather plugin.
I can display the current temperature in a label, but would also like to display the current weather icon. I added a webimage control with source CurrentWeather.Icon
It does not display anything, but in the log it does show “weather icon: http://openweathermap.org/img/wn/04n@4x.png”. If I put that actual URL in the source it works.
That’s the wrong attribute. You need to set the source to CurrentWeather.WeatherIcon
. CurrentWeather.Icon
is the common device object icon attribute that all objects have.