Closed knights1 closed 3 years ago
config at the moment:
inverter_ip = "192.168.1.166"
inverter_port = 502
# Slave Defaults
# Sungrow: 0x01
# SMA: 3
model = "sma-SBn_n-1AV-40"
slave = 3
timeout = 3
scan_interval = 10
# Optional:
# dweepy_uuid = "random-uuid"
# Optional:
influxdb_ip = "192.168.1.91"
influxdb_port = 8086
influxdb_user = "xxxx"
influxdb_password = "xxxx"
influxdb_database = "inverter"
influxdb_ssl = False
influxdb_verify_ssl = False
# Optional
#mqtt_server = "192.168.1.91"
#mqtt_port = 1883
#mqtt_topic = "inverter/stats"
# See config-example.py for required and optional settings.
this gives me an error:
pi@raspberrypi:~/solariot/solariot-master $ ./solariot.py
Load config sma-SBn_n-1AV-40
Load ModbusTcpClient
Connect
[ERROR] fromRegisters() got an unexpected keyword argument 'endian'
Your inverter model may not be supported by the contributed modbus map. However, try dropping the endian field from Line 137 to be:
message = BinaryPayloadDecoder.fromRegisters(received.registers)
This doenst work, after this change i get wrong results.
try this:
message = BinaryPayloadDecoder.fromRegisters(received.registers, byteorder=Endian.Big, wordorder=Endian.Big)
in pymodbus 1.4.0 they changed the endian-stuff a little bit.
looks good for me
root@rietjenserver:/home/rietjen/solariot-master# python3 solariot.py Load config sma-SBn_n-1AV-40 Load ModbusTcpClient Connect {'30531 - Total yield (kWh)': 227, '30535 - Daily yield (Wh)': None, '30537 - Daily yield (kWh)': None, '30769 - DC current input [1] (A)': None, '30771 - DC voltage input [1] (V)': None, '30775 - Power (W)': None, '30783 - Grid voltage phase L1 (V)': None, '00000 - Timestamp': '2020-02-04 22:01:04'} [INFO] Sent to InfluxDB
before, i got extreme high results (68000 watts in the night, yay!)
I cannot start with python3?
pi@raspberrypi:~/solariot/solariot-master $ python3 solariot.py
Traceback (most recent call last):
File "solariot.py", line 27, in
import paho.mqtt.client as mqtt
ModuleNotFoundError: No module named 'paho'
Op di 4 feb. 2020 om 22:01 schreef Wynton notifications@github.com
This doenst work, after this change i get wrong results.
try this:
message = BinaryPayloadDecoder.fromRegisters(received.registers, byteorder=Endian.Big, wordorder=Endian.Big)
in pymodbus 1.4.0 they changed the endian-stuff a little bit.
looks good for me
root@rietjenserver:/home/rietjen/solariot-master# python3 solariot.py Load config sma-SBn_n-1AV-40 Load ModbusTcpClient Connect {'30531 - Total yield (kWh)': 227, '30535 - Daily yield (Wh)': None, '30537 - Daily yield (kWh)': None, '30769 - DC current input [1] (A)': None, '30771 - DC voltage input [1] (V)': None, '30775 - Power (W)': None, '30783 - Grid voltage phase L1 (V)': None, '00000 - Timestamp': '2020-02-04 22:01:04'} [INFO] Sent to InfluxDB
before, i got extreme high results (68000 watts in the night, yay!)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/meltaxa/solariot/issues/9?email_source=notifications&email_token=AEFMMJEWADSU3URQKWWVBMDRBHJUBA5CNFSM4KISXFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKZFPGI#issuecomment-582113177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFMMJC4G5IOUZYRNGDR76TRBHJUBANCNFSM4KISXFOQ .
By the way: i am looking forma way to get the daily yield. In your information there in no daily yield. Did you you yield today?
Op di 4 feb. 2020 om 22:56 schreef Chris van Uden chrisvanuden@gmail.com
I cannot start with python3?
pi@raspberrypi:~/solariot/solariot-master $ python3 solariot.py
Traceback (most recent call last):
File "solariot.py", line 27, in
import paho.mqtt.client as mqtt
ModuleNotFoundError: No module named 'paho'
Op di 4 feb. 2020 om 22:01 schreef Wynton notifications@github.com
This doenst work, after this change i get wrong results.
try this:
message = BinaryPayloadDecoder.fromRegisters(received.registers, byteorder=Endian.Big, wordorder=Endian.Big)
in pymodbus 1.4.0 they changed the endian-stuff a little bit.
looks good for me
root@rietjenserver:/home/rietjen/solariot-master# python3 solariot.py Load config sma-SBn_n-1AV-40 Load ModbusTcpClient Connect {'30531 - Total yield (kWh)': 227, '30535 - Daily yield (Wh)': None, '30537 - Daily yield (kWh)': None, '30769 - DC current input [1] (A)': None, '30771 - DC voltage input [1] (V)': None, '30775 - Power (W)': None, '30783 - Grid voltage phase L1 (V)': None, '00000 - Timestamp': '2020-02-04 22:01:04'} [INFO] Sent to InfluxDB
before, i got extreme high results (68000 watts in the night, yay!)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/meltaxa/solariot/issues/9?email_source=notifications&email_token=AEFMMJEWADSU3URQKWWVBMDRBHJUBA5CNFSM4KISXFO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKZFPGI#issuecomment-582113177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFMMJC4G5IOUZYRNGDR76TRBHJUBANCNFSM4KISXFOQ .
the adress is 30537
i started the logger again with a clean database in the night, so the sma modbus do not transmit DC related things. When the sun go up/rise/myenglishistoobad the inverter started and sent these datas.
when you use python3, you must install everything with pip3, not pip. this is a littlebit confusing, python is a version-chaos. python2 and python3 are complete different spaces. afaik you can use python2, there is no must-to-have python3 things in this code.
also use python instead of python3.
oh nvm, 30357 is without data.. sorry.
i look for a fix, this evening.
but the rest is working now
@knights1 set your timeout higher, 3 seconds is too fast. 20 seconds is better and safe some database space
Hi Meltaxa,
I have a SMA SB3.0-1AV-41 and am trying to get your solution to work. Configuration towards influb works great but i need some help with the modbus config for my inverter.
do have any idea of the SB3.0-1AV-41 224 could work?