sudo ./power_scraper.py
:0: UserWarning: You do not have a working installation of the service_identity module: âcannot import name âverify_ip_addressâ from âservice_identity.pyopensslâ (/usr/lib/python3/dist-packages/service_identity/pyopenssl.py)â. Please install it from https://pypi.python.org/pypi/service_identity and make sure all of its dependencies are satisfied. Without the service_identity module, Twisted can perform only rudimentary TLS client hostname verification. Many valid certificate/hostname mappings may be rejected.
Setting up EmonCMS
not connected
not connected
err [Failure instance: Traceback: <class âKeyErrorâ>: âlinked-batteriesâ
/usr/local/lib/python3.7/dist-packages/pymodbus/framer/socket_framer.py:181:_process
/usr/local/lib/python3.7/dist-packages/pymodbus/client/asynchronous/twisted/init.py:126:_handleResponse
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:460:callback
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:568:_startRunCallbacks
â â
/usr/local/lib/python3.7/dist-packages/twisted/internet/defer.py:654:_runCallbacks
/home/pi/PowerScraper/Inputs/SolaxModbus.py:198:solaxRegisterCallback
./power_scraper.py:58:outputActions
/home/pi/PowerScraper/Outputs/SolaxBatteryControl.py:209:send
Nope, it happened on all 3 machines. They were all running Manager 2.27 - so maybe it was a firmware bug? They did reflash properly over the network once upgraded to 2.31.
If the inverter is working, and getting âInv EEPROM Faultâ, you can follow the procedure I outlined to get the machine back online without having to reflash it.
I did notice that in the previous set of firmware, the inverter mis-reported âInverter Powerâ when charging the batteries from the grid, reporting twice as much power draw than it should have. This is fixed in the latest set of firmware.
[Solax-BatteryControl] #source = âMainsMeterâ # The data source for power consumption
linked-batteries = true # If set, all batteries charge/discharge at the same rate when trying to zero total power timezone = âAEDT-10â # If set, always use this timezone for period calculations. This may be useful if your machine tracks daylight savings, but your energy provider does not
I am not sure what is going on, I have removed the PowerScraper folder and git cloned a new copy from the server, created a new config file, If when i change the file to only have 1 inverter battery is currently at 95% I cannot get it to suppy the house load.
> # Enable this section to scrape the Wifi interface of Solax inverters
> #[Solax-Wifi]
> #poll_period = 10 # seconds
> #timeout = 5 # seconds
> #inverters = ['solax1-wifi', 'solax2-wifi', 'solax3-wifi']
>
> # Enable this section to scrape the Modbus/TCP (Ethernet port) of Solax inverters
> [Solax-Modbus]
> poll_period = 10 # seconds
> timeout = 5 # seconds
> power_budget_avg_samples = 30 # The maximum number of samples to average power budget over
> installer_password = **12345** # The installer password for the inverter (same as used on the front panel), required if you want to use battery control
> inverter_power = 5000 # Limit the inverter power to this amount, required if you want to use battery control
> inverters = ['solax1']
>
> # Enable this section to scrape Modbus/RTU (RS485) connected SDM630v2 energy meters
> #[SDM630Modbusv2]
> #poll_period = 1 # seconds
> #timeout = 1 # seconds
> #baud = 38400
> #parity = 'E'
> #stopbits = 1
> #ports = ["/dev/ttyMainsMeter"]
>
> # Enable this section to output to EmonCMS
> [emoncms]
> timeout = 5 # seconds
> server = "**http://12345/emoncms**"
> api_key = "**12345**"
>
>
> # Enable these sections to control battery charge/discharge on Solax SK-SU5000E inverters
> # This does a number of things:
> # 1. Allows more than 2 time periods through the day
> # 2. Allows excess generation on 1 inverter to charge an inverter on another phase instead
> # of feeding that energy back to the grid (requires your billing meter to simply sum
> # usage across phases)
> # 3. Allows inverters to share loads larger than what a single battery can discharge at
> # 4. Allow grid charge up to a certain level (to allow enough energy stored to see you through
> # peak times)
>
> #[Solax-BatteryControl]
> #source = "MainsMeter" # The data source for power consumption
> #linked-batteries = true # If set, all batteries charge/discharge at the same rate when trying to zero total power
> #timezone = "AEDT-10" # If set, always use this timezone for period calculations. This may be useful if your machine tracks daylight savings, but your energy provider does not
>
> # Defines the inverters that will participate
> [Solax-BatteryControl.Inverter.solax1] # First inverter
> phase = 1 # Which phase the inverter is connected to, as seen by the power consumption meter
> single-phase-charge-limit = 2000 # If the charge rate is below this, aim to zero our own phase, if it's above, aim to zero total power
> single-phase-discharge-limit = 2000 # If the discharge rate is below this, aim to zero our own phase, if it's above, aim to zero total power
> max-power = 5000 # Limit the inverter output to this value
> max-charge = 2000 # Maximum battery charge rate in Watts
> max-discharge = 2000 # Maximum battery discharge rate in Watts
> grace-capacity = 5 # Percentage of total capacity at which to stop charging to reserve for absorbing power greater than inverter output
> grace-power-threshold = 4500 # Ignore the grace capacity if PV power is greater than this
> grace-charge-power = 500 # The amount of power to charge the battery at when in the grace period
> #[Solax-BatteryControl.Inverter.solax2]
> #phase = 2
> #single-phase-charge-limit = 1000
> #single-phase-discharge-limit = 1000
> #max-charge = 2000
> #max-discharge = 2000
> #[Solax-BatteryControl.Inverter.solax3]
> #phase = 3
> #single-phase-charge-limit = 1000
> #single-phase-discharge-limit = 1000
> #max-charge = 2000
> #max-discharge = 2000
> #grace-capacity = 0
>
> # Define the time periods
> # Suitable for ActewAGL Time of Use plans in Canberra, Australia
> # Peak times are widened in case the time on the meter drifts
> #[Solax-BatteryControl.Period.MorningPeak]
> #start = "6:55:00" # The start time of the period
> #end = "9:05:00" # The end time of the period
> #min-charge = 20 # The minimum % charge left in the batteries. The inverter will not discharge lower than this in this period
> #grid-charge = false # True to charge from the grid if the charge is less than min-charge
> #force-discharge = 2000 # If set, will force the battery to discharge at this rate
> #
> [Solax-BatteryControl.Period.DayShoulderGracePeriod] # Reserve grace capacity in this period
> start = "00:00:00"
> end = "23:59:00"
> min-charge = 10 # Once charged, we don't want the battery to drop below this to give us enough to get through the following peak period
> grid-charge = false
> grace = false
> prefer-battery = false # Solar power should go to charging the battery if battery is below mininmum
> #
> #[Solax-BatteryControl.Period.DayShoulder] # No grace capacity, aim to have the batteries fully charged
> #start = "14:00:00"
> #end = "15:55:00"
> #min-charge = 30 # Once charged, we don't want the battery to drop below this to give us enough to get through the following peak period
> #grid-charge = false
> #grace = false
> #
> # Allow charging near the end of the shoulder period (if the batteries are less than 30%)
> #[Solax-BatteryControl.Period.DayShoulderGridCharge]
> #start = "15:55:00"
> #end = "16:55:00"
> #min-charge = 30
> #grid-charge = true
> #grace = false
> #
> #[Solax-BatteryControl.Period.EveningPeak]
> #start = "16:55:00"
> #end = "20:05:00"
> #min-charge = 20
> #grid-charge = false
> #grace = false
> #
> #[Solax-BatteryControl.Period.EveningShoulder]
> #start = "20:05:00"
> #end = "22:05:00"
> #min-charge = 20
> #grid-charge = false
> #grace = false
> #
> #[Solax-BatteryControl.Period.Offpeak]
> #start = "22:05:00"
> #end = "6:55:00"
> #min-charge = 30
> #grid-charge = true
> #grace = false
Is it successfully talking to the inverter? This config is expecting to be able to resolve the hostname âsolax1â on your network.
You also need to set the source field under Solax-BatteryControl. If you arenât running an external meter (IIRC you arenât), then it should be be set to the inverter name.
[Solax-BatteryControl]
#source = "MainsMeter" # The data source for power consumption
linked-batteries = true # If set, all batteries charge/discharge at the same rate when trying to zero total power
#timezone = "AEDT-10" # If set, always use this timezone for period calculations. This may be useful if your machine tracks daylight savings, but your energy provider does not
I got powerscraper running and putting data into Influx. If anyone is interested in the Influx-Output I can share the code.
But because I have most stuff in Node Red I tried to get it running with the same config as in PowerScraper script. I can connect to Modbus via the node-red node and I get values but they make no sense. So I struggle with decoding to values from ModBus to human readable values. Could somebody help?