Open chris-y opened 3 weeks ago
You appear to be missing settings for charge/discharge current as below:
timed_charge_current:
Is that literally what I need? Or do I need a helper or value or something to plug into it?
(Edited, see below)
OK, I worked that out - I needed a helper created, and this then pokes the value into that. Discharge always seems to be 0, even when I set a forced discharge, is this correct?
I also worked out why my service wasn't called - I'd set it at the wrong level.
Question: Is the {power} always in watts? Is there a way of getting this in amps? Do I just use the current helper I specified in timed_charge_current?
These are in AMPS (current) rather than watts. The timed_discharge_current should not be zero during discharge.
OK, cool. My discharge current isn't changing from 0, even when I did a test forced discharge.
Other than that I think I've got everything working.
I tried a live test last night, it was supposed to charge the battery a little but when I woke up it had charged to 100%. It then had planned a discharge but the discharge start/end time hadn't been set. I fixed that by setting charge_discharge_with_rate: False
.
So I think the only outstanding issue is that neither the charge/discharge rate in Watts or Amps is changing.
The charge rate is a bit weird as it looks like it did change overnight yesterday, but not last night:
Current plan: (we're currently discharging but the rate on the amps sensor is still 0)
Further update. The charging current is now updating - not sure what I changed to kick it into action! Discharge current is still stuck on 0.
However, it looks like the charge_start_service etc aren't called after the rate changes, so the rate sent to the inverter is prior to the change. I observed this earlier when it was in charge mode, and now it's gone to hold but hasn't updated with 0A:
Plan is on HOLD:
Charge rate has dropped to 0A:
The last call of the service has happened before the drop: (this screenshot taken after the two above)
Also I notice there's a 1 minute overlap on the discharge stop and charge start times.
It updated about five minutes later but seems a bit of a lag?
After this hold session ended, it updated for the overnight charge:
The charge rate is still 0A even though it expects to charge a bit:
Later... OK, it set the correct charge rate a few seconds after the charge period started. It would be better if it set this ahead of time. It seems to call the service very often even if there are no changes - tweaking the current at this point would make sense (in case we lose connection, it's all planned to the most recent prediction before the connection was lost)
OK, as far as I'm concerned this is working bar a niggle with the charge and discharge currents - which I'll raise as a separate issue.
My config is as follows:
script.set_solis_inverter_config_predbat is:
alias: Set Solis Inverter Config (Predbat)
sequence:
- metadata: {}
data:
days:
- chargeCurrent: " 0{{ states('input_number.solis_battery_charge_rate_predbat') | int | string }} "
dischargeCurrent: "80"
chargeStartTime: >-
{{ states('sensor.predbat_mine_0_charge_start_time')[0:5] | string
}}
chargeEndTime: "{{ states('sensor.predbat_mine_0_charge_end_time')[0:5] | string }}"
dischargeStartTime: >-
{{ states('sensor.predbat_mine_0_discharge_start_time')[0:5] |
string }}
dischargeEndTime: >-
{{ states('sensor.predbat_mine_0_discharge_end_time')[0:5] | string
}}
- chargeCurrent: " 0{{ states('input_number.solis_battery_charge_rate_predbat') | int | string }} "
dischargeCurrent: "80"
chargeStartTime: "00:00"
chargeEndTime: "00:00"
dischargeStartTime: "00:00"
dischargeEndTime: "00:00"
- chargeCurrent: " 0{{ states('input_number.solis_battery_charge_rate_predbat') | int | string }} "
dischargeCurrent: "80"
chargeStartTime: "00:00"
chargeEndTime: "00:00"
dischargeStartTime: "00:00"
dischargeEndTime: "00:00"
config:
secret: xxxx
key_id: xxxx
username: xxxx
password: xxxx
plantId: xxxx
action: pyscript.solis_control
fields: {}
mode: single
icon: mdi:home-battery
description: ""
Describe the bug I'm trying to set up predbat for my Solis inverter but using Solis Cloud rather than modbus. Monitoring is working great, but I'm not able to do any control. If I test any control service nothing happens, and I'm seeing
'NoneType' object has no attribute 'split'
in the log and status.I have set read-only to off and set a forced charge, then waited for the start of the forced charge to see if the charge_start_service triggers - it doesn't - and the only thing which looks relevant in the log is this NoneType error.
Expected behavior I expect my service to be called.
Predbat version
1.1.8
Environment details
Screenshots
Log file
Config
The charge_start_service stuff is what I was trying out. The first one runs a script which has 'power' as an input and just notifies me. This never triggers. The second runs the pyscript which controls the inverter, but I'll probably set this up as a script which takes the parameters to get the config out of here. For now though I was just trying to get it to trigger anything.