Music, Weather, Spacers, and Media Tiles

Is there a way to have Weatherstation Tiles 2.0 display time in the 12 hour format instead of 24 hour?

WARNING: The WeatherStation 2.0 will likely stop working in February 2019. It is recommended to use the SmartThings provided WeatherStation Tile instead.

Probably best suited for the developer of the Weather Station 2.0 device handler in his original thread… but I took a look at the code and it looks like you should be able to change the time format on line 399 by changing the format from 24 hour notation HH:mm to 12 hour notation hh:mm a.

From what I can tell, its using the SimpleDateFormat utility in Java which accepts the time formats noted in their documentation. Try changing Line 399 linked above to something like:

def tf = new java.text.SimpleDateFormat("hh:mm a")

Thanks for the tip, but it did not work. I will try over in the original thread to see if they can help.

You probably wouldn’t see the new format until the next time the data for that device is refreshed (or you manually ‘polled’ the device. I’m assuming you are referring to the sunset and sunrise time… is that right?

I am using this now for road conditions data and the image I am pulling is of course in landscape ratio, and it is difficult to fit inside a portrait tile. It does work though, but ideally I would like to be able to also position it horizontally as then I can better position it to the area I would like to see.

I am not sure if it would be possible to zoom into the image as well ? That could also be nice.

This is how it looks and in the red square is the area I am most intersted in having displayed.

2 Likes

Thanks for sharing the screenshot with the detailed comments. We’ve had one other request for this as can be found in the following post:

I have it tracked in our hit list… there hasn’t been a lot of interest shown for that feature yet, so we’ve been prioritizing some other highly requested features first. :slight_smile:

In the meantime, how are you generating the image? It appears to be a mix of traffic data, weather, and perhaps some other data. Some of the map generators have the ability to adjust the zoom and size directly in the URL. For example, check out this post about generating a traffic map.

In the map generator, there are options for adjusting the positioning, zoom, and resulting map size:
image

Perhaps your source has that option too?

Ah, I thought I did a good search before posting and didn’t find the links you shared.

The image is just pulled from the local road administration website, so there is only one static version of it and it contains wind, road conditions, cars travelled etc.

But nice to hear that it is on a list. I am not in a hurry, just wanted to know if this was on the radar.

2 Likes

@josh would it be possible to add a line break tile that’s super skinny or doesn’t take actual space?
I would like to make it so that no matter what my dashboard resolution is the same things are always next to each other.
Thanks!

4 Likes

Just an FYI to anyone who is using the SmartThings community developed SmartWeather Station 2.0 Tile… it will likely break in February due to API changes in the SmartThings platform. The recommended solution at this time is to switch back to the built-in SmartThings provided SmartWeather Station Tile.

Hey, so I’m having an issue with a weather media tile I created. I didn’t put any spacers under it, but it’s still creating a gap underneath. Any ideas?

@Adam_Gardner thanks for posting and sorry that things aren’t working as expected. Can you tell me more about the device you’re viewing this on? I think I found the same radar image you’re using from the Denver CBS site and I tried to reproduce the issue by creating a similar dashboard layout, but I was unable to reproduce the issue.

1287605214_lr

Weird. It’s an old Samsung Tab 4. I think it’s a 7" screen. The model number is SM-T230NU, if that helps at all.

EDIT: one thing i would add - when i turn the screen vertical, it doesn’t create a gap underneath it.

Do you have any other devices you can test on and can you reproduce the issues with those?

Just for ‘debugging’ purposes, you might also try some variations of the settings on the Media Tile. Maybe try keeping the scaling as ‘cover’, but try setting the Media Position to 100% so it aligns the bottom of the image with the tile. Or try the ‘fill’ option which appears to dimensionally work well in a 1x2 tile with that particular radar image.

What browser are you viewing the dashboard in and what Android OS version is the device running? Looking online, it says the OS was 4.4 but I wasn’t sure if there were any updates pushed for the device.

The browser is Chrome. I actually added 2 items to the Dashboard and it fixed itself… Still a weird issue though.

I do have another tablet I can test this on though - Samsung Tab A, which has a larger screen, and a Kindle Fire, which has about the same size.

UPDATE: it appears that testing on the larger Samsung Tab A won’t recreate the issue. The larger screen size doesn’t allow the tiles to fill the screen like the smaller tab. Even when I change the tile size, it’s not reproducing the issue. I’m charging the kindle fire now… configuring that may take a bit, it’s horribly out of date.

1 Like

Yeah, it’s not recreating it on either of my other tablets (Fire or the larger Tab A), so I’m not sure… I know that the tablet I’m having issues with is hopelessly out of date. I’ve tried using a custom rom, but it didn’t take… It won’t be a major issue for me, but I’ll at least leave a note here for versions to watch out for:

Android version: 4.4.2 (how embarrassing… :rofl:)
Chrome version: 71.0.3578.99

1 Like

Thanks for the update and thanks for testing things, Adam! Those older Android devices can sometimes be a bit wonky… we’ve chipped away at improving compatibility with old Android 4.4 devices based on feedback we’ve received here and there, but your best compatibility is going to be with the newer devices as you’ve found!

1 Like

Not a problem! I just wanted to leave one more note here - it seems like it has to do with the tile dimension of 2x2 and not the media tile. I created a security tile that was 2x2 and it did the same thing. Again, not a problem, just wanted to leave you a note.

1 Like

I’ve just realised how valuable this would be. Here’s hoping!

2 Likes

How do you edit the media URL of a media tile?

You can edit Media resources (and other resources) from the Manage Resources tab of your user page. To get there, tap your profile image in the top-right corner of the page and then select Manage Resources.