openhab / org.openhab.ui.habpanel

OUTDATED repo - HABPanel has moved to the openhab-webui repo!
https://github.com/openhab/openhab-webui
Eclipse Public License 1.0
97 stars 93 forks source link

New weather widget #46

Closed kubawolanin closed 7 years ago

kubawolanin commented 7 years ago

So I'm working on the weather widget for HABPanel :)

Right now I'm working on cleaning up the code (I have like 9 items to update from openHAB. It needs some a factory pattern of some sort to get it right). I also need to add more configurable options (like icon animation, maybe different layouts).

Let me know what you think!

I'm submitting this issue to start a discussion. Later, when my code will be polished and working, I'll post a pull request.

Cheers!

weather

neohusky commented 7 years ago

Excellent work. This is a pleasant surprise. I can't wait to see this develop.

ghys commented 7 years ago

Ah, the obligatory weather widget :) Cool! - provided it doesn't leave a huge footprint on the codebase of course ;) How do you manage the icons?

kubawolanin commented 7 years ago

Footprint? Same as other widgets I suppose. Icons are stored in separate svg files.

ghys commented 7 years ago

Ok cool. :) I actually think the weather icons would be good candidates for building a proper ESH IconProvider (code), since they would be a scoped set with well-known names (and I realise this contrasts with those built-in user selectable backdrops, but the use case is different here). You could even have an icon set picker populated with the /rest/iconsets API endpoint result, letting users select their own weather iconset if they happen to have several registered. :)

kubawolanin commented 7 years ago

The way I'm implementing it is slightly different, as I'm using animated climacons icon set and map each one of them to the corresponding "Condition" items value. Animation is based on css class inside svg elements. Maybe ability to change icons is a benefit - I'm not sure if I'd use it, though :) We may think of it in the future - right now I'd like to deliver basic functionality.

Cheers!

ghys commented 7 years ago

Wow, those animated icons certainly look nice! I checked the license and while attribution isn't required, a mention in the about.html is in order. Curious what you'll come up with!

korg1000 commented 7 years ago

Its already working? I downloaded the last version from habpanel and cannot see the weather widget.

NCO3 commented 7 years ago

I would love to use it as well. Where could I get it please?

kubawolanin commented 7 years ago

I was pretty busy with my daily tasks lastly, but I'm back on the road. Yesterday I've merged latest and greatest HABPanel to my repo so I'm able to continue working on that widget. I will submit my pull request in upcoming week.

kubawolanin commented 7 years ago

Implemented in #72

NCO3 commented 7 years ago

Hi Can I just donwload the weather widget code somewhere?

kubawolanin commented 7 years ago

Hey @NCO3 (and pinging @korg1000 @neohusky too) I can finally answer - yes 🙂 I declined my previous pull request.

Here's my custom widget utilizing @ghys's animated iconset: https://community.openhab.org/t/custom-widget-current-weather/18216

I think we can close this issue now. Thank you, Kuba

neohusky commented 7 years ago

Awesome. I'll try it out soon.