Solar Log 50 and HTTP Binding

Hello,
im trying to get the actual value of mit solar plant. I have an Solar Log 50 device that generate a website. I would cache this site an try to get the value out of there with regex.

The website looks so:

the http.cfg looks so:

http:Solarlog-cache.url=http://192.168.2.40
http:Solarlog-cache.updateInterval=60000

and the file solar.items

Number Solar_Aktuell "aktuelle Leistung [%.2f]" <inverter>  { http="<[Solarlog-cache:30000:REGEX(.*Erzeugung</span>.*?([0-9\\.]*)</span>.*)]" }

regex101.com gives me these matches when I use the source code as test string.


(Note: on the first Screenshot it show the 0.99 and on the screenshot of regex101 it shows 0.50 but its the same place where the actual value dispalys)

But on my sitemap it won’t show any Value just “-”

Im new with the http-binding so what is wrong?

Best regards

Hi Sascha,

do you have a solution yet? I have the same configuration (Solar Log 50) and also would like to get some information out of the website.

Thanks in advance.

Best regards,

Tobias

You should try to make the Item a String so it should look something like this

String Solar_Aktuell “aktuelle Leistung [%s]” { http="<[Solarlog-cache:30000:REGEX(.Erzeugung.?([0-9\.]).)]" }

If this works converting the string to an actual number is easy. However we should first focus on getting that string with the actual number

Hi Felix,

thanks for your support. I think there are too many brackets? The item configuration is not correct - I got an error in my item configuration.

Best regards,

Tobias

Forgot the last closing bracket. I edited it in my last post

I think the HTTP-Binding didn’t cache the Solar-Log-Site correctly.
If I start an Http-get request to the Solar-Log i recieved just the HTTP-data but the value that i want is generated with javascript.

Well, the HTTP binding is not going to download and execute any javascript embedded in the webpage.

If you can figure out how that javascript works, you can make the same calculation in openHAB.