openhab / openhab-core

Core framework of openHAB
https://www.openhab.org/
Eclipse Public License 2.0
898 stars 415 forks source link

Thing file loading issue #4248

Open miloit opened 1 month ago

miloit commented 1 month ago

If you add a thing

With the content

Thing http:url:deye "Deye Inverter" [ baseURL="http://192.168.x.x/status.html", headers="", authMode = "BASIC", ignoreSSLErrors = true, delay=0, stateMethod= "GET", refresh= 60, commandMethod= "GET", timeout= 3000, bufferSize= 2048, refresh=15] { Channels: Type number : energyTotal "Energy Total" [ stateTransformation="REGEX:.*var webdata_total_e = \"([0-9]+[\\.][0-9]+).*" ] }

You will always get this error during initializing or loading the thing

Conversion of value '' with type 'class java.lang.String' to 'class java.util.ArrayList' failed. Returning null

The thing or channel is running fine at the end the issue only exist during loading. There should be a hint at least in the docs that because it's irritating and the user gets confused.

lolodomo commented 1 month ago

I see blanks for your parameters refresh, timeout and bufferSize, just before the numeric value. Can you remove these blanks and see if it solves the problem ?

Note sure if the blanks are properly handled like for example ignoreSSLErrors = true.

Note that the parameter refresh is also in double.

lolodomo commented 1 month ago

And try to remove the channels part to see if the problem is in this part.

miloit commented 1 month ago

And try to remove the channels part to see if the problem is in this part.

Yes, it's from the channel part...I tried it several times....