SolaX Solar Inverter Setup Guide

Thank you, worked like a charm. I now have my Solax Hybrid and Boost inverters in the Node-Red dashboard

Thinking of putting a pi zerow with a 3.5" or 5" display in the utility room and the parents annexe to show if we are producing power or not and id the dish washer, washing and drying machines be put on etc :slight_smile:

Working on my required sensors and will post pics once I have completed a dashboard and hassio

P.S Love the naming convention used :slight_smile:

1 Like

I’m interested to see your Pi zero when it’s done. I have been trying to think of ways to achieve the same thing - identify what can be run with the spare generating capacity.

Hey @matthewjporter, I found an error in the function. “Status” had the wrong array address in it. Was listed at 68 and should be 62.

Thanks @hotswapster,

Was wondering why it was not showing up but I have not really figured the need for the status or its meaning so was not conecerned

I am now, thanks to your efforts on this, starting to learn Node-Red and am going to try combining my X1 Hybrid and X1 Boost into single feed to present into Hassio (any tips) for my pi zerow/wemos project to show either the dashboard on a pi zerow or have a wemos with a red & green LED to show generation status - will keep you updated

On another note, do you have a battery on your system? My X1 Hybrid shows my battery capacity as 0

You can see on my summary I have changed the reading 100 and %

Node-red is neat. The more I used it, the more I like it. I just found there is a HASS node for node red and a Node-red plug-in(?) for HASS. The two can integrate better than what I showed above (I’m still learning too).

I don’t have a battery. If you take the http address out of the “Inverter IP here” box and put it in a browser, see if there is a number there that relates to how full your battery it.

In regards to sending it all to HASS in one feed, I’m assuming that you have your node-red configurations in one flow. I think the way to do it, would be change the topic. One way (which I haven’t tried and don’t know it will work) if to add a topic in the MQTT node. This may add an extra topic prefix? I’m not sure.

The other way, and one I would be able to “see” work, is to open the function up and change the topic there. Example below. First line same as you code, second line has the X1 addition:

PV1Current = { payload: realtimeArray[0][0], topic: “solax/energy/pv1i”};
PV2Current = { payload: realtimeArray[0][1], topic: “solaxX1/energy/pv2i”};

once you do this, you can wire the outputs of the function to the same MQTT node.

I also got history working. I put the code in that same dropbox link.

Looks like I had miss counted along datastream for the battery, I had put 18 but its 17 as you have to start at 0 and is now showing correct

42

I have already created a single flow using one mqqt feed as you have suggested using a single mqqt node

My next step is to combine the output of similar nodes i.e PV1 & PV2 on the one inverter and PV1 + PV2 on the other inverter = total generation - I think I have it, just testing today

I am going to try for a single function block which will have both inverters feeding in but as you suggested, will need to get the topics separate as I think that will be the key

Will look at the history, that was going to be my next attempt but since yo have done the work saves me the trouble

Cheers

1 Like

Hey @matthewjporter,
I managed to tidy up the start of this code a bit. The string from the inverter is a JSON object but the node-red JSON node errors out. If you replace it with a YAML node, it reads the object correctly.
If you want to update you code, I’ve put a file in that dropbox called new_data_aq.json. Import that through the menu and then wire it to the large function. This means you can delete the splits and switches. The last thing to do is open the function and change the array references.

  1. Remove the first [0] on each line:
    PV2Current = { payload: realtimeArray[0][1], topic: “solax/energy/pv2i”}; //original
    PV2Current = { payload: realtimeArray[1], topic: “solax/energy/pv2i”}; //updated
  2. Change the realtimeArray reference:
    var realtimeArray = msg.payload ; //original
    var realtimeArray = msg.payload.Data ; //updated

You can also pull the other data out by referencing msg.payload.version, msg.payload.type, msg.payload.SN, msg.payload.status.

1 Like

I managed to get this working.
The dashboard is working fine. but the message are not send to MQTT, so I can see them also in Hassio.
I have one error “SyntaxError: Unexpected token u in JSON at position 0” where do I have to look to fixed this.

Hi Jossie67

Are you trying to setup the realtime or history? are you importing the new yaml flow or old json flow
First off, I would check you did not miss off a character when copying and pasting
Second, check you function and see if you have removed the leading [0] based on the updated yaml not the old json format / flow
Third, Are you using the built mqtt server? do you have other mqtt feeds? if not a good place to start is ssh into hassio and run the following:
mosquitto_sub -h YOUR.HASSIO.IP.HERE -v -t “#”

This will list all mqtt feeds into the broker and will confirm mqtt is actually working

Matthew

Hey @jossie67,

use the debug node to find out where the error start’s occurring. There are some videos on YouTube that show you how to use it. Show us where the error is appearing and maybe we can help a little more?

Also post the string you read form your inverter. It may be a different model?

Sorry, wasn’t at home te last day’s
it working this issue was that some
“these a quotes are used”
“and sometime these”
So I changed them al to
“these”
Since then is it working :grinning:

Has some also add the way to send this also to pvout.org

That was my initial issue, which I have had many times. The forum does not convert " " correctly when copying and pasting (both ways)

Glad you got it sorted

Hello,

A question a bit absurd, which are or where you get the credentials of access to the investor?

regards

it is either admin/password or admin/admin. If you search for the inverter admin guide and look in the WiFi section or Solax WiFi modaule

Cant remember and not at home to check

Hi, I have tried the credentials that you have indicated but they do not work for me. I can only connect with the phone through the APP but I can not access in local mode by entering the IP in the browser.

My solax is the model X1

regards

1 Like

Same here. Connect to Solax Wifi -> admin/admin is working.
Setup to connect to my home Wifi -> working. Got DHCP.
When I connect to the DHCP Address I get a login prompt: SolaxPower
admin/admin not working. /api/realTimeData.htm also password prompt.
It’s a brand new X3-MIC

Same here. I have an X1 Mini 2000W and can connect when I’m in the Solax Wifi (using admin/admin), but when it’s connected to my home wifi I can’t get past the password prompt.

I’ve tried admin/admin, admin/password and a lot more.

Anyone get this working?

Hey Guys

Just checked and both my X1 Boost Mini and X1 Hybrid connect as admin/admin on their own wifi SSID and when connected to my home SSID i can connect on that IP with admin/admin

I know, Should really change it :slight_smile:

I have contacted Solax support regarding those issues. It appears they have made some changes to the api. Now changes can be made trough the api. Therefore they have decided to lock the api down and to not supply credentials.

The Dutch office knows about a lot of interest in the api and wants the developers to open up the api. I have made a official request but it isn’t on the roadmap yet.

Therefore I have done some debugging and testing and had success on two ways.

Using some man in the middle sniffing I have found a way to read the real-time data from the inverter using a http request to 5.8.8.8. It reports a JSON string including all data. This only works however when connected to the AP of the inverter, no reply on the local IP. For some reason the app disconnects itself and the windows 10 notebook doesn’t reconnect automatically so it runs for a day or so, then needs to be reconnected.

I also did some digging into the Solax cloud. I have managed to pull the data from SolaxCloud using node-red into my influxdb.

However I found the inverter only reports once every 5 minutes. So far it’s working flawless besides the 5 min latency. It also allows you to get some historical data.

When I have a little more time, I will test if I can connect a RPi to the Solax AP to test if that’s more reliable (auto reconnecting) then a Windows 10 client.

If anyone is interested in my node-red flows, please let me know.

3 Likes

Hi rtenklooster

Great work, shame they have locked down the api. So basically I should not run a firmware update :slight_smile:

If you could post your node-red flows that way others who have the newer devices/firmware can get the info

The 5min delay in my mind is not exactly “RealTime” as per the Solax Portal labels it :frowning: