Solax X Hybrid, My new inverter and PVOutput question

Hi Karazz,

Please contact me directly through messaging (https://pvoutput.org/list.jsp?userid=68116) with your email address and I will send you the PHP.ini file (for windows 10).

Just as a note, Mike (borft) has amended the code so it now works on a Raspberry Pi - I have been running it on my Pi for a few days now without issue.

Dan.

Just as a note, Mike (borft) has amended the code so it now works on a Raspberry Pi - I have been running it on my Pi for a few days now without issue.

Is there a guide for the Pi installation?

Hi Borft,
I’m trying to use your scripts on Windows but I’m getting some PHP errors when I try and connect to the Solax Portal. Is the code for querying data from the Solax Portal finished or is it still in development?

Matt.

Hi Franky_v,

No I haven’t created an installation guide for the Pi yet. You will need some knowledge of configuring Raspbian (adding modules to PHP for instance and setting up cron jobs) in order to get it running. You will also need an external Postgres SQL server (which the code has been written for, it should be able to be ported to other SQL servers) as running an SQL server on an SD card is not a good idea (I have my Postgres SQL server running on a QNAP NAS).

From memory, the minimum additional PHP modules/extensions you need are (assuming you have a Postgres SQL server):-

curl
openssl
pdo_pgsql
pgsql

I am not a Raspbian/*nix expert by any stretch of the imagination and learning as I go (my area of expertise is Windows Server), but I will try to help if I can. Mike may also be able to provide some help as he is a *nix (Debian) expert. I have had the code running on my Pi now since January 2019 and it works very well (the only issue is the reliability of the SolaxCloud Portal, which is rubbish to put it mildly !)

Regards,

Dan.

Hi mattedwards,

This is Dan and I got it working on Windows. Are you trying to get it working with the Solax “CLOUD” portal or the SolaxPortal - The “CLOUD” works and the “SolaxPortal” is still under development I believe ?

Dan.

Hi Dan,
I’m trying to get it working with SolaxPortal. https://www.solax-portal.com/.

Hi Matt,

Yep, this works in a very different way to the Cloud portal and I know Mike has been trying to get it working. I was helping a guy in Australia who uses the Portal, but we had to stop until Mike gets time to look at the code. It is not straightforward…

All the best,

Dan.

Hi Dan,
I’m in Australia as well so I’m happy to help out with testing if needed.

Matt.

I moved and so i have a new solar install with an solax.

I used to upload with a youless monitor that was easy but this is next level stuff for me.

At this moment i’m stuck @ modifying de PHP.ini file ( can’t find it and don’t know how to modify )

These are the moments im realising software isnt my strong suit.

Can somebody help me out, because i would really like to get solaxcloud data into pvoutput…

Thanks in advance

Hi,

Couple of things first…

  1. Are you using Solax CLOUD or Solax PORTAL - This is important as it currently only works with Solax CLOUD.
  2. Are you using Windows (I guess so as you are after the PHP.ini file) or another OS (Raspberry Pi, etc.)

If you want a copy of the PHP.ini file for Windows, message me directly from PVOutput (https://pvoutput.org/list.jsp?userid=68116) with your email address and I will send it to you.

Regards,

Dan.

1 Like

Data is being uploaded to Solax Cloud and indeed i’m on W10

I will send you a DM for the php.ini

thanks !

It’s online ! My system link: https://pvoutput.org/list.jsp?userid=23892

Special thanks to @danielmoore for his patience and expertise for helping me out with this script. I took a dozen of emails, screenshots back and forth but it was worth the effort. I would never got this to work without his help.

Hello,
I’m trying to use this scripts on my Synology NAS with Postgresql and php72. I’m getting some PHP errors: Can someone give me a hint? :slight_smile:

Fatal error: Uncaught TypeError: Argument 1 passed to solax_php\Config::commandLineParser() must be of the type array, null given, called in /volume1/web/solax-php-master/lib/Config.php on line 18 and defined in /volume1/web/solax-php-master/lib/Config.php:22 Stack trace: #0 /volume1/web/solax-php-master/lib/Config.php(18): solax_php\Config->commandLineParser(NULL) #1 /volume1/web/solax-php-master/lib/Config.php(41): solax_php\Config->__construct() #2 /volume1/web/solax-php-master/lib/Config.php(54): solax_php\Config::getInstance() #3 /volume1/web/solax-php-master/scripts/import.php(10): solax_php\Config::get(‘database.hostna…’) #4 {main} thrown in /volume1/web/solax-php-master/lib/Config.php on line 22

Script: Config.php

<?php namespace solax_php; class Config { protected static $instance; protected $config = []; /** * constructor, reads ini file */ protected function __construct(){ $this->config = parse_ini_file(__DIR__ . '/../config/solax-php.ini', true); $this->commandLineParser($GLOBALS['argv']); } protected function commandLineParser(array $args) : void { $len = count($args); for ( $i = 1; $i < $len; $i++ ){ if ( $args[$i] == '--date' ){ $this->_set('global.date', $args[($i+1)]); $i++; } elseif ( $args[$i] == '--set' ){ list($term, $value) = explode('=', $args[($i+1)]); $this->_set($term, $value); $i++; } }

I know that this topic is really old now, I would just like to add that I also have the Solax X1 hybrid. I am uploading my data from the inverter direct to PVOutput using a Pi 3 running Node Red to talk to the inverter and PVOutput, It is a bit of a pain to set it up but there is no reliance on the Solaxcloud.

I also decide to install solar panels installation in my house. I also researched somes and found so very interesting review https://websolarguide.com/solar-power-heat-pumps/

I know this thread is a little old now, but I have created a bit of PHP code to pull using SolaX’s new API. It is available in Github [DannyBoy-PI/SolaxAPI]. It’s very basic and you don’t need a database to use it. It has been tested on Windows 10 and Raspberry Pi (3 & 4) with PHP7.x and PHP CURL extension installed.
Dan.

Can’t seem to find your github solax php code, could you send me a link please :slight_smile: