Using Selectronic SP Pro select.live data in the energy dashboard

Thanks to a detailed post by @nworbnhoj from 2020, I managed to get access to the local JSON data from my Selectronic SP Pro.

As the template sensors yaml structure had changed a fair bit with the introduction of long term statistics and the energy dashboard, I wanted to share what I ended up with as I found it very difficult finding info about the current method.

To be fair, this was the first thing I did with home assistant, so I jumped in the deep end haha

The first part getting the json is still the same as it used to be:

sensor:
  - platform: rest
    name: "selectronic"
    json_attributes_path: "$.items"
    json_attributes:
      - 'battery_in_wh_today'
      - 'battery_in_wh_total'
      - 'battery_out_wh_today'
      - 'battery_out_wh_total'
      - 'battery_soc'
      - 'battery_w'
      - 'fault_code'
      - 'fault_ts'
      - 'gen_status'
      - 'grid_in_wh_today'
      - 'grid_in_wh_total'
      - 'grid_out_wh_today'
      - 'grid_out_wh_total'
      - 'grid_w'
      - 'load_w'
      - 'load_wh_today'
      - 'load_wh_total'
      - 'shunt_w'
      - 'solar_wh_today'
      - 'solar_wh_total'
      - 'solarinverter_w'
      - 'timestamp'
    resource: "<whatever the url is for you>"
    value_template: '{{ value_json.device.name }}'
    force_update: true

For the energy dashboard, you want the following long term statistics data:

  • If you have batteries, ‘battery_out_wh_total’ & ‘battery_in_wh_total’
  • ‘grid_in_wh_total’ (this will be your generator if you are off grid like me. If you are on grid I guess you will also need ‘grid_out_wh_total’)
  • ‘solar_wh_total’
  • ‘load_wh_total’

Then for each of them, you will need a template sensor. Here is my setup:

template:
  sensor:
    # Data from selectronic for long term statistics
    - name: "battery use"
      device_class: energy
      state_class: total
      state: "{{(state_attr('sensor.selectronic', 'battery_out_wh_total')|float) | round(3)}}"
      unit_of_measurement: "kWh"
      unique_id: sensor.selectronic.batout
      
    - name: "battery charging"
      device_class: energy
      state_class: total
      state: "{{(state_attr('sensor.selectronic', 'battery_in_wh_total')|float) | round(3)}}"
      unit_of_measurement: "kWh"
      unique_id: sensor.selectronic.batin
        
    - name: "power use"
      device_class: energy
      state_class: total
      state: "{{(state_attr('sensor.selectronic', 'load_wh_total')|float) | round(3)}}"
      unit_of_measurement: "kWh"
      unique_id: sensor.selectronic.usage
        
    - name: "solar production"
      device_class: energy
      state_class: total
      state: "{{(state_attr('sensor.selectronic', 'solar_wh_total')|float) | round(3)}}"
      unit_of_measurement: "kWh"
      unique_id: sensor.selectronic.solar
      
    - name: "generator use total" # Use for "grid" stats in energy dashboard
      device_class: energy
      state_class: total
      state: "{{(state_attr('sensor.selectronic', 'grid_in_wh_total')|float) | round(3)}}"
      unit_of_measurement: "kWh"
      unique_id: sensor.selectronic.genTotal

They should all show up in the drop downs for the energy dashboard now. Make sure you add the generator as if it was a flow in from the grid, otherwise you won’t see all the pretty graphs!

Example pic from today:

1 Like

Thanks for your post. I have successfully connected our Selectronics SPPRO via the Select Live device. Your configuration pointers were great along with the post by @nworbnhoj. We are grid connected and all seems to be working.

Have you had any issues with the Select Live box? Two devices the installer tried would not recognise any WiFi networks, even a phone hotspot! Luckily we were able to use cable. Twice now over the last few days the unit goes offline on the internet and does not respond to the URL. The screen reports “Clout OK” but it clearly is not. I have resorted to a power off reset and everything is OK. Just wondering if anyone else is having the problem.
Thanks again.
Steve

On occasion I have seen the Select Live device filing to reconnect to wifi properly - but put it down to poor signal inside a corrugated iron enclosure around the inverter etc.

However, I wonder if it just might be a poor cable or connection between the inverter and the Select Live device.

Glad the post helped somebody!

My installer did have trouble connecting to wifi initially, but we think it was because we were using a really crappy 3g connection (inside the shed there is not much signal). I haven’t noticed any issues with it connecting since we switched to nbn. The wifi router is literally right next to the select.live in our case though - is it possibly just a weak wifi signal to yours?

Hi Selectronic SP Pro owners. I am interested in a robost battery to support an ongrid application in and area with very low grid reliablility. So it looks like the Selectronic might be a good battery inverter that provide robust battery backup, support for AC coupled solar, 3 phase and generator input. However, it is a considerable investment, and I hope to get some payback with some sort of flexibility to join VPPs, or use something like Amber and some automations from Home Assistant or similar to hopefully control the Selectronic and do things like be able to discharge the battery to the grid at times I will get paid well to do that.

So it is promising that I see your Selectronic integrations into Home Assistant. But is what I am thinking realistic. eg, it looks like most of the information above is about reading outputs. Do you have any clue if there is ways of actually controlling the SP Pro and for example triggering it to not draw from the grid, or in fact discharge to the grid??

As a selectronic owner, any insights would be greatly appreciated.

Hi swainstm
I’ve been using an SP Pro for a couple of years with a Zenaji battery pack of 9.6 kWh and 8 kW PV. It has been trouble free so far. We are on-grid but on a rural line that frequently fails. Since installing the SP Pro and battery we’ve not lost power - and we usually don’t even know the grid has dropped out unless a neighbour lets us know. The other way is that if you monitor the PV output in real time you notice that the output drops/fluctuates according to load and battery SoC - because the excess PV can’t be exported, so the SP Pro curtails PV output.

We are on Amber which is great if you have a battery+PV and willing to keep a close watch on the tariffs.

A bugbear with the SP Pro is that the SP Link software only runs under windows (we’re Linux only) - so I have to run a Windows VM to use the software. But the detail and flexibility to control is very good.
I’m not sure if there is a simple way to instruct the SP Pro to export from the battery on demand…for example to capture high FiT’s.

Our setup is not “normal” - in that the PV+battery+inverter are on a separate circuit which joins the other circuits (hot water, garage, shed etc) at the meter box. This complicates what the inverter understands as “export”. It thinks export means to the grid - but we have a PV diverter that takes excess into the hot water (it monitors “real export” at the meter box and will divert export to the hot water until the thermostat opens.

So if I tell the SP Pro to limit “export” it limits the flow to the hot water if it needs heating. Currently I manage this manually (check hot water temp and Amber FiT etc) to decide what profile is needed.
I use Node-red to read the Amber tariffs and the hot water temp and am just putting together a relay control system to send a signal to the SP Pro to call up a different priority - that for example has a no export setting. The SP Pro has a number of digital inputs that can be used to trigger these, and this is the first trial. The logic is that if the FiT goes negative I don’t want to risk any export, so when the hot water temp is about to trigger the thermostat, Node-red will turn the relay on and tell the SP Pro to use a different priority schedule.

If this works it could be used to change other settings in the inverter. It’s about 1 week from trial (waiting on wifi relay).

This all sounds very interesting, and I look forward to what you discover. So please keep us in the loop.

I will be VERY interested if you find a way to export power to the grid. I have been told by Selectronic, that there is no way they can “export” to the grid, because their inverter does not meet mandatoring requirements for the battery inverter to actually export power to the grid. My guess is they have approval for grid connected battery to generate power to offset loads in the house. But not for example export to the grid when the wholesale price is high (eg $14 / kWh) when you might what to export to arbitrage high FiT. I understand the explanation for this limitation was not technical in that there would be nothing technically stopping them from being able to do this. But I think it was something like to get AS4777 approval or whatever, the inverter needs to be able support certain phase difference between volt and amps (my reading of this is I assume it is something to do with being able to support non unit PF). But the message was that being a big traditional transformer inverter (which has some big advantages to support surge power etc), it is will never be able to do this sort of thing.

But ignoring the AS4777 limitations, it would be interesting if you are able to configure it to export at all, or if the current software prevents you targeting a positive export threshold?

But beyond this, I would be interested in what you will be able to automate with Home Assistant to for example automatically instruct it not to export, and how you can do this?

Yes, I’ve also not found a way to trigger the Selectronic inverter to export. On a few rare occasions I turned off battery recharge and was able to export excess PV to the grid, but it’s rare to have lots of PV with a high FiT!
Our setup has the Selectronic inverter controlling the Fronius inverter through RS232 (I think).
It’s strange that excess PV can go back to the grid - obviously with Selectronic “supervision” yet you can’t force export from the battery!
I did get the Shelly wifi relay connected and it can be used to trigger a priority schedule on the Selectronic (via digital input). I just now need to fine tune Node-red so it turns it on/off under the appropriate conditions. I have tested it for export control and it did what it was supposed to do - i.e. when turned on it triggered a priority with no export.

The concept I want to be able to enable is a bit more complicated than that. I believe some people are having success with other inverters looking at the wholesale price forcasts, and actually looking to charge the batter from the grib prior to the high price events so you have power to discharge to the grid when the forcast high price event hits. For that to power you need to be able to configured the selectron to charge from the grid, and also to export from the battery to the grid. Obviously this is a bit more than just letting excess PV go to the grid, or in fact just telling the battery not to charge, so there is more PV free to go to the grid.

I believe it is not that the Selectronic could not export to the grid. It is just that it is not approved by AS4777 rules to do so, because they can’t provide the flexibility that the DNSPs want to mandate in the current version. Because of this, they might or might not have implemented the features to make it possible to do, because there is not legal way to do it. But my reading of the manual had me thinking that the ability to do fine grained controled via automation might be a bit limited.

The PV can export because that invester would be AS4777 approved. Now if it is an old install, it might not comply with the current version of AS4777 rules which preclude Selectronic being approved for grid export. But as long as it had AS4777 compliance at the time it is all good and not an issue. And maybe there is a bit of a loophole here for people that have the Selectronic installed prior to the rule changes??

I also assume that when you are grid connected, the Selectronic does little to no supervision of the solar (unless you are using the Selectronic to do export limiting or something), and the PV can just get on with what it does best and just generate the maximum power it can sound in the knowledge that any excess can be exported to the grid (that is within AS4777 rules). Somewhat independantly of that, I assume the Selectronic can just get on with its job of charging / discharging the battery to try and net the grid export to zero. I assume the primary reason for the RS232 control of the PV inverter is for when you have a blackout and isolate from the grid. Under these conditions, and if you have more PV than the battery can control through frequency shifting and charging to absorb extra power, then the RS232 connection gives the selectronic much faster control of the PV inverter to get it to throttle back quicker.

I would be surprised if it has anything to do with AS 4777 as there is an export option in SPlink but it is disabled. It needs to be changed by the installer (it’s under installer only settings which needs a password). If your DNSP has mandated no export it would also mean no excess PV export, which is certainly not the case here except when the line voltage exceeds something like 255 VAC.
You mention charging the battery when prices are negative/low - this is fairly straightforward if you setup a feed from Amber and use the same digital relay to trigger charging from grid.
I only have experience with python and Node-red, where I have a script to download the 5 minute tariffs and then trigger the relay when general tariff is below a set point. I am only using the FiT at the moment but when I get the extra relays I might set one up to do grid charging. For our installation it’s only really needed in winter.

If you are to believe the Selectronic representation (I have no reason not to), then I can 100% confirm that discharging from the Battery to the grid is NOT allowed because of AS4777 rules here in Australia. Again the reason is because the battery can’t support features required for this in the latest AS4777 rules. If they ignored these very specific rules which are probably not needed in lots of cases, then technically I would assume they can. And this might be the explanation about why it is greyed out in your explanation (ie because it is disabled in Australia, as without disabling it, they might not be able to install it in Australia with a grid connecting because of AS4777 rules).

But it is important to understand the distinction between the Selectronic doing the grid export, and your Solar PV inverter doing export. If the AS4777 solar PV inverter is approved, there would be nothing to stop that exporting to the grid which the Selectronic I would assume would have some visibility of. It is also possible that setting is specifically to allow the Selectronic inverter to “enable” PV export limiting if it is an approved inverter connected with a serial connection to control the solar PV inverter directly.

OK - I think you are correct. My inverter was installed prior to the Dec 2021 transition to the new standards but, as you point out, may not be re-programmable by the installer in any event. I should ask him if he has done any new installations.
I see that as I write this, the FiT has shot up to $5.37/kWh! - if only I could export!

Sounds like it is still approved for install and grid connection. Just they they can allow the battery to net export to the grid. Ie sounds like it can do all the typical things most batteries do. Ie export to offset household loads. And if there is excess solar from another PV inverter, that will be able to export. It is just that the Selectronic can’t generate excess power beyond what is required to cover household loads. So not much good for VPP operations.

I guess you might be able to tell it not to charge the battery for a period of time when FiT is high to increase solar that is exported which would increase your FiT revenue. But I assume most of the high FiT happen when you don’t have much solar anyway??

@cg9 thank you for your work -
i have a setup with selectronic here in Germany since 2014 (formerly Kaco a German Inverter Company has labeled the SP Pro and sold them a short time in Germany - i think thats the reason Kaco Powador Inverters was a supported Inverter by Selectronic )
with you work i setup up a power flow card for this Solar installation
in home assistant i missing now multiple energy dashboards

Hi,
I can confirm that you set up the AC coupled Fronius in international mode and the Selectronic does all the 4777 complience stuff like VoltVar VoltWatt ect to the solar on the way through.

The issues as I understand it with only the current version if 4777 that the Selectronic cannot comply with is ride through. And the grid doesn’t want energy when it’s under stress that can disappear in an instant when there is a bump/imperfection in the power. It could cause other inverters to also trip causing a cascade of inverters without ride through all tripping.

I can confirm the Selectronic can discharge full power into the grid via modbus and via the Solar hybrid profile. Setting on the far right of the hybrid progile menu. It’s disabled via the Setup menu and I have the password to undissable it. You can set a profile that is called by a relay via digital input into the Selectronic to discharge. If the inverter was installed prior to Dec 2021 you should be fine.

The 2020 version of AS/NZS 4777.2 is mandatory from the 18 December 2021. There is a new DER Technical Standard enforced under the National Electricity Rules (NER), which requires compliance of grid connect inverters to AS/NZS 4777.2:2020 and comes into effect on 18 December 2021.

We’ve just installed our Select.live unit, but can’t use the steps suggested to retrieve the URL detail from the Select.live portal dashboard page. Did you set up the HA link recently? Perhaps something has changed on the portal page that no longer reveals the remote device URL details.

Cheers, Innes

I think you might be right Innes and they’ve removed it off the select live html source.

My select live stopped working a couple of weeks ago (I think overnight firmware update must have failed), and I had to do a hard reset. I couldn’t find the details in the html, but luckily they hadn’t changed from before so it started working anyway.

Hopefully someone else knows another spot to get the info? I don’t really understand how it works myself

login to select.live, open the system and view page source I believe and search for live_URLs

I dont have access to the portal I setup (friends) but I believe thats the method I used.

Alternatively look at this post:

might work

@cg9 did you ever work out how to sync the timeclocks so it doesn’t show incorrect consumption on the midnight changeover?

If you’re seeing a big spike at midnight, you might be using the daily statistics instead of the total

e.g. Out of these two:

'battery_in_wh_today'
'battery_in_wh_total'

You need to make sure you use ‘battery_in_wh_total’, so it doesn’t reset to zero every day.