SAJ Solar Inverter Integration w/ PHP

Dears,

Recently I bought a SAJ PV inverter and now I’m trying to integrate with my OH2 setup.

The inverter is connected at the internet by WI-FI adapter (owned solution) where I can manage by my local network (http:192.168.0.126) and also by smartphone APP.

As we don’t have biding or addons integration I’m trying to read some informations trought http:192.168.0.126/status/status.php but to be honest I don’t know how proceed.

These are the informations available accessed by local network:

And this is the .php that I would like to read:

1,16838,1273,1263,85,2008,131,1896,234,65535,65535,0,0,65535,65535,0,0,65535,65535,0,0,65535,65535,623,5997,2267,291,65535,65535,65535,65535,3655,393,1321,2

Could anyone help me on that?

Thank you in advance,

php is a programming language, not a data format. OH is written in Java, not PHP.
I guess the data looks like a list or array.

Thank you for your response, Bruce.

Do you know if there is a way to read on OH from this PHP?

My point is that is NOT PHP.
You can read about PHP here.

https://www.php.net/manual/en/

1 Like

Did you try this

https://community.openhab.org/t/read-networkbinding-xml-file-from-saj-suntrino-inverter/105690/6

There are several ways to get the output/status of a web page. The effort depends on the structure of the page/data to parse.
Possible ways may be:

  • as already suggested http binding
  • exec binding: write a script ( using the programming language that you would like to use ) that dependent on a switch sends back one or the other value to set an item

Hi, Darko!

I saw your post but I cannot get any data from real_time_data… I don’t know why, but I notice some people had the same issue…

Otherwise, I’m able to get some information from /status/status.php…
http://192.168.0.126/status/status.php

Any tip?

You should be able to use the exec binding like:

wget -q -O - http://192.168.0.126/status/status.php | cut -d, -f1

to get the first result.
Instead using the http binding together with an expression you can return the individual results from the status.php returned string.

Sorry… I think I’m too newbie to do that!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.