Animated Weather Condition Icons for OpenWeatherMap

That was the missing link. Thanks!

I love these animted icons.

I have one problem though:
Sometimes the icons flash (are shredded somehow) and then go back to normal.
In some cases they flicker more or less constantly.
I am using safari on the iPhone - so I guess it’s safari related.
Does this happen to other iphone users as well?

I have only cloud icon.
When weather change from cloud to rain icon is cloud always.
Who can help me in this problem?

Any chance animated icons could be crashing habpanel? I have habpanel running on a tablet in fully kiosk browser and after implementing this it keeps crashing. Also in the openhab kiosk browser. Am I crazy?

Hi Matt,

I dont know… haven’t used this binding for a while since im reworking my HABPanels in general…

At the moment i dont have a working IDE and no time to take a look into this… sorry :frowning:

Mine has been working with OH 2.4 w/o any issues with 3 different Android tablets using them.

Here’s the version I have org.openhab.ui.iconset.climacons-2.3.0-SNAPSHOT.jar

Best, Jay

Thanks guys. Seems to have resolved after factory reset. I think perhaps some updates caused the issues.

Sorry for the bump, but got a error when migrating from OH2 -> OH3.
This is what is see at startup:

2020-12-20 11:12:02.544 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.ui.iconset.climacons-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.ui.iconset.climacons [271]
Unresolved requirement: Import-Package: org.eclipse.smarthome.core.i18n

i think a saw the error with i18n in the past, but i don’t know anymore how to solve it…

The requirements for the bundle you like to use do not exist anymore. They have been renamed from org.eclipse.smarthome.core to org.openhab.core. To solve your issue you have to recompile the iconset.climacons package against the new openHAB 3 Core.

1 Like

Anyone who did (or intends to do) this? :slight_smile:
I would like to use animated icons on OH again as well.

1 Like

It could be done very easily by placing icons directly in html folder and then just refer to it using

<tr>
	<td><img with="80%" src="/static/panel/icons/darksky/{{ itemValue('weather_fc_1h_icon') }}.svg" /></td>
  <td><img with="80%" src="/static/panel/icons/darksky/{{ itemValue('weather_fc_3h_icon') }}.svg" /></td>
  <td><img with="80%" src="/static/panel/icons/darksky/{{ itemValue('weather_fc_6h_icon') }}.svg" /></td>  
</tr>

Check full config in my github : GitHub - petrows/smarthome-openhab: My smart home configuration (OpenHAB 2)

1 Like

awesome, @Petrows.
Thank you - I will try it.

1 Like

I struggle a little:
My item:

String					W_OWM_CondDay0	        "FC Cond"													(G_jdbc,Group_HabPanel_Dashboard)               {channel="openweathermap:onecall:account:local:forecastToday#condition"}

This returns “Mäßiger Schnee” because I am in Germany
(some snow or similar).

As you can see I don’t use a transform map file (and I would like to use the German condition in habpanel.
So how to get the right (englisch) name of the condition linking to the right icon?
Is there a way instead of renaming the icons?

EDIT:
I found the solution:
I can use “ignoreTransform” by setting this to true:

src="/static/icons/climacon-{{ itemState('W_OWM_CondDay0', true) }}.svg"

EDIT II:
Too early happy:

It seems to catch the icons.
But all look the same and it’s only working in the preview (Chrome), not on the real habpanel view (e.g. firefox)

It looks like it’s catching this icon for all cases.
climacon.svg

I just started to transform back to English:

Bedeckt=cloud
Hochnebel=cloud_fog
Nebel=cloud_fog_alt
Hagel=cloud_hail_alt
Heiter=cloud_sun
Sonnig=sun
Sturm=wind
Regen\ und\ Schnee=cloud_snow
Leichter\ Regen=cloud_drizzle

I mapped these based on guessing.
So if someone has done this I would appreciate your help.

the rules for mapping this to an additional condition item looks like this:

rule "transform german condition to icon names in english"
when
	Member of G_Cond changed
then
	val action = getActions("telegram","telegram:telegramBot:MyBot")
	val itemName = triggeringItem.name.toString
	val itemState = triggeringItem.state.toString
// select formatted item name
	var String condForm = itemName + "_Form"
	condForm.postUpdate(transform("MAP", "openweathermap.map", itemState))
	logInfo("+++ WEATHER", "Condition state (" + condForm  + ") updated to: " + transform("MAP", "openweathermap.map", itemState)
	action.sendTelegram("Weather Condition changed (" + itemName  + ") to:\n" + itemState + "Formatted state:\n" + transform("MAP", "openweathermap.map", itemState)
end

Hi,
I am trying to recompile those but were only able to compile against 3.1.0 code. (which I am not running yet)
Compile worked but I do not know whether it is actually working due to the change in osgi framework between 3.0.2 and 3.1.0
Are you on the newest snapshot to try it? (or is anyone else?)

I have it uploaded on github @ GitHub - DUSAG0211/climacons

Sorry, I am still on 3.0.2

Tried again and got it compiled againbst 3.0.2. But it only loads the placeholders in the HabpanelUI (the cloud without animation)
Not sure yet, how to debug this.

Okay, I found the mistake. It was actually working but I did not copy all icons over.

Here is the package for 3.0.2 recompiled. It was actually easier than I had expected.

Animated Climacons 3.0.2 recompiled based on HerzScheisse package

Hi
is there anybody here who can me explain how to use the svg_combiner.py.
I’ve copied the squidink svg files that i need to the …/openhab/html/matrix-theme/original-svgs directory
then i run the svg_combiner.py from …/matrix-theme/svg_combiner.py with

[21:16:21] root@openhabian:/home/openhabian# cd /etc/openhab/html/matrix-theme

[21:17:45] root@openhabian:/etc/openhab/html/matrix-theme# python svg_combiner.py

what i get is this

Traceback (most recent call last):
File “svg_combiner.py”, line 3, in
import requests
ImportError: No module named requests

I dont know what i exactely have to edit in svg_combiner script at the top, and from where i have to run the script, and wich files from the squidink folder i have to copy to the matrix-theme directory

I figured it out by myself.

The Problem was on my Openhab 3 System. There was a misconfiguration with Python and PIP.
Some modules like ‘request’ and ‘JSON’ were not correctely installed by PIP.
After a reconfiguration from Python and PIP , some Parts from the svg_combiner worked correctely, but the output failed.
I found a newer version of the svg_combiner script in the Forum and with some modification it worked like a charm.

Everything is fine now.