[OH 4.2] Fronius inspired energy flow widget [4.2.1; 5.0.0]

Hello Hans,

you could post a screenshot of your item definition. See this post of mine above.

Hello Peter,

was at Work for a few days.
Here is the picture you requested.

Regards
Hans

Hello Hans!

You could try and remove the percentage sign as a Unit. I am not sure if this is causing this behavior, but it might trip the number conversion.

Regards
Peter

Hello Peter,

back from work i tested, it works fine. Thank you a lot. Great job.

Have a good time and thanks again.

Regards

Hans

1 Like

I have the same issue af Biesta. I cant get the icon right, the value right and the cirlce shows strange…

I believe I have tried everything, creating new items as standard, remove/added the %… And I end up the same… I have no idea what to do/try next…

When I show the icon in a new page to see what it use for filename… i get a very strange result like this:

Requested content not found.

Debug information

Url: /icon/fronius_battery--482850?format=svg&anyFormat=true&iconset=classic
Path: /icon/fronius_battery--482850
Hash:
Params:
Query:
format: svg
anyFormat: true
iconset: classic
Route: (.*)

I did rename the icon filename.

I wonder if my issues is due to using the Fornius binding, and not Modbus? There is for sure something strange with the powerflowinvertersoc channels, which always use the item with the procentage unit. (ie 100 %), which I cant seem to remove.

Hello Kim!

What is the item’s value you try to send to the widget? Judging from your error it is -4828.50 which would be a very strange value for a state of charge for your battery indeed. Could you please post or send me a screenshot of your items definition page?

Best regards
Peter

This is my item:

Number      Battery_SOC              "Current Battery State Charge [%.0f %%]"                     <batterylevel>  (PV)       { channel="fronius:powerinverter:mybridge:myinverter:powerflowinvertersoc" }

It is very strange…
If i use no “translation” (ie %%) the channels sends 0.940xxx as the raw value (for Soc 94%) to the item. I doubt thats useable for the widget?

Hello Kim!

0.94… (without “%”) should actually be ok for the widget. The value is multiplied by 4, rounded to the nearest integer and then multiplied by 25 to give the expected filenames (fronius_battery-0.svg, fronius_battery-25.svg, fronius_battery-50.svg, fronius_battery-75.svg and fronius_battery-100.svg). If you have your item configured to the range of 0 to 100 you could simply change the 4 to 0.04 and it should work just fine.

What I don’t understand is, why there is such a big negative value in the filename.
If the same operations are applied in reverse to the value in your filename, the original value would be minus 4328.5 +/- 0.5 which does not make any sense at all.

I am sorry I can’t be of any further help.

Edit: I just noticed, you use “%.0f” as a format qualifier. According to the sprintf documentation, this means the precision is set to 0. Try changing it to 1 or (as intended) 2.

Peter

I have not defined a range for the item, as I have no idea how to do that when using config text files :slight_smile:

As for the icon I have given up.
I have no idea how come it cant find the icon file.
It works fine in sitemap where I use the standard battery icon with values as well. So there has to be something with the icon files which confuses OH.

This is the name of the icons:

Also the circle is still acting up, but I wonder if this has to do with the icon beeing wrong?

Fronius02

Hello Kim!

I am sorry it did not work out. The filenames are fine, it’s the conversion of your item value that causes the problems and you are correct, it is the same cause for the dial being displayed incorrectly. Did you try changing the format qualifier as I have suggested?

Regards
Peter

No, cause I have no idea where or how to change it…
I tried creating a new item through the MainUI, and played around the qualifier (translation i guess). but it didnt change anything. I simply have no more idea, but I doubt this should be a unique problem at my setup.

Hello Kim,

I am sorry, I thought you know where to change it. You mentioned deleting the “%%” part of the formatting. The part where the format of the floating point number is defined is just in front of it. You posted the screenshot of your definition, you have to change it there or you can do it in the graphical interface. Be aware that having both types of definitions may lead to some interference.

Regards
Peter

Great Widget works like a charm and has a waf of 100+

1 Like

Sorry for the late reply…
I removed all definition, just to try. My items look like this now:

Number      Battery_SOC      "Current Battery State Charge"      <fronius_battery>  (PV)       { channel="fronius:powerinverter:mybridge:myinverter:powerflowinvertersoc" }

But its still the same… :frowning: