Replies: 10 comments 6 replies
-
what was the full command you used? (you'll need to tell it what porttype) |
Beta Was this translation helpful? Give feedback.
-
Previous entry in mpp-solar.conf: [AxpertMAX10kMain] New entry, also working now: Thanks for a very rapid reply leading me to the solution. |
Beta Was this translation helpful? Give feedback.
-
I control the inverter using a number of short shellscripts identifying the inverter by name (tag=ValePower1) but when using device-by-id, this stopped working... Easy enough for me to modify my scripts but just tought I let you know... pi@raspberrypi:~ $ mpp-solar -n ValePower1 -c POP00 **pi@raspberrypi:~ $ mpp-solar -p /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -c POP00
|
Beta Was this translation helpful? Give feedback.
-
when using device-by-id the code doesnt know what type of port you have (the logic is pretty simple), but you can add |
Beta Was this translation helpful? Give feedback.
-
pi@raspberrypi:~ $ mpp-solar -n ValePower1 -c POP00 --porttype=serial |
Beta Was this translation helpful? Give feedback.
-
Where to find debug? |
Beta Was this translation helpful? Give feedback.
-
2024-02-18 23:33:07,609:INFO:__init__:main@218: Solar Device Command Utility, version: 0.12.2, influx_mqtt remove blank units
2024-02-18 23:33:07,610:DEBUG:__init__:main@232: MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x76646f58>, _isConnected=False)
2024-02-18 23:33:07,610:DEBUG:__init__:main@234: udp port 5555
2024-02-18 23:33:07,611:DEBUG:__init__:main@237: Using Mongo None with mppsolar
2024-02-18 23:33:07,611:INFO:__init__:main@337: Creating device "ValePower1" (type: "mppsolar") on port "/dev/ttyUSB0 (porttype=serial)" using protocol "PI30"
2024-02-18 23:33:07,618:DEBUG:__init__:main@341: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-02-18 23:33:07,618:DEBUG:device:__init__@33: __init__ args ()
2024-02-18 23:33:07,618:DEBUG:device:__init__@34: __init__ kwargs {'name': 'ValePower1', 'port': '/dev/ttyUSB0', 'protocol': 'PI30', 'baud': 2400, 'porttype': 'serial', 'mqtt_broker': MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x76646f58>, _isConnected=False), 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar'}
2024-02-18 23:33:07,619:INFO:__init__:get_port@77: Port overide - using port 'serial'
2024-02-18 23:33:07,619:DEBUG:__init__:get_port_type@62: port matches serial
2024-02-18 23:33:07,619:INFO:__init__:get_port@107: Using serialio for communications
2024-02-18 23:33:07,634:DEBUG:__init__:get_protocol@12: Protocol PI30
2024-02-18 23:33:07,641:DEBUG:device:__init__@38: __init__ name ValePower1, port <mppsolar.inout.serialio.SerialIO object at 0x75fb0358>, protocol <mppsolar.protocols.pi30.pi30 object at 0x75fa26b8>
2024-02-18 23:33:07,641:DEBUG:__init__:main@390: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0x75fa2760>, 'POP00', 'POP00', 'screen', None, None)]
2024-02-18 23:33:07,642:INFO:__init__:main@395: Looping 1 commands
2024-02-18 23:33:07,642:INFO:__init__:main@405: Getting results from device: mppsolar device - name: ValePower1, port: <mppsolar.inout.serialio.SerialIO object at 0x75fb0358>, protocol: <mppsolar.protocols.pi30.pi30 object at 0x75fa26b8> for command: POP00, tag: POP00, outputs: screen
2024-02-18 23:33:07,643:INFO:device:run_command@274: Running command POP00
2024-02-18 23:33:07,643:INFO:abstractprotocol:get_full_command@50: Using protocol b'PI30' with 40 commands
2024-02-18 23:33:07,643:DEBUG:protocol_helpers:crcPI@313: Calculating CRC for b'POP00'
2024-02-18 23:33:07,644:DEBUG:protocol_helpers:crcPI@363: Generated CRC 0xc2 0x48 0xc248
2024-02-18 23:33:07,644:DEBUG:abstractprotocol:get_full_command@56: full command: b'POP00\xc2H\r'
2024-02-18 23:33:07,644:INFO:device:run_command@303: full command b'POP00\xc2H\r' for command POP00
2024-02-18 23:33:07,645:DEBUG:abstractprotocol:get_command_defn@60: Processing command 'POP00'
2024-02-18 23:33:07,645:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: F
2024-02-18 23:33:07,646:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MCHGC
2024-02-18 23:33:07,647:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MNCHGC
2024-02-18 23:33:07,649:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MUCHGC
2024-02-18 23:33:07,650:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBCV
2024-02-18 23:33:07,651:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBDV
2024-02-18 23:33:07,653:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBFT
2024-02-18 23:33:07,655:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBT
2024-02-18 23:33:07,656:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PCP
2024-02-18 23:33:07,659:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PCVV
2024-02-18 23:33:07,660:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PE
2024-02-18 23:33:07,662:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PD
2024-02-18 23:33:07,663:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PGR
2024-02-18 23:33:07,665:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: POP
2024-02-18 23:33:07,666:DEBUG:abstractprotocol:get_command_defn@70: Matched: POP00 to: POP value: 00
2024-02-18 23:33:07,667:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB0, baudrate 2400
2024-02-18 23:33:07,670:DEBUG:serialio:send_and_receive@22: Executing command via serialio...
2024-02-18 23:33:08,773:DEBUG:serialio:send_and_receive@30: serial response was: b''
2024-02-18 23:33:08,774:DEBUG:device:run_command@322: Send and Receive Response b''
2024-02-18 23:33:08,774:INFO:abstractprotocol:decode@196: response passed to decode: b''
2024-02-18 23:33:08,775:INFO:abstractprotocol:decode@200: Response to short
2024-02-18 23:33:08,775:INFO:device:run_command@341: Decoded response {'ERROR': ['Response to short', '']}
2024-02-18 23:33:08,775:DEBUG:__init__:main@409: results: {'ERROR': ['Response to short', '']}
2024-02-18 23:33:08,775:INFO:__init__:get_output@34: attempting to create output processor: screen
2024-02-18 23:33:08,778:DEBUG:screen:__init__@16: processor.screen __init__ kwargs {}
2024-02-18 23:33:08,778:DEBUG:__init__:main@415: Using output filter: None
2024-02-18 23:33:08,778:INFO:screen:output@19: Using output processor: screen
2024-02-18 23:33:08,779:DEBUG:screen:output@20: kwargs {'data': {'ERROR': ['Response to short', '']}, 'tag': 'POP00', 'mqtt_broker': MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x76646f58>, _isConnected=False), 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Parameter Value Unit
error Response to short
2024-02-18 23:33:08,779:DEBUG:__init__:main@438: Not daemon, so not looping |
Beta Was this translation helpful? Give feedback.
-
When running the shellscript:
2024-02-18 23:37:29,832:INFO:__init__:main@218: Solar Device Command Utility, version: 0.12.2, influx_mqtt remove blank units
2024-02-18 23:37:29,833:DEBUG:__init__:main@232: MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x766aaf88>, _isConnected=False)
2024-02-18 23:37:29,833:DEBUG:__init__:main@234: udp port 5555
2024-02-18 23:37:29,833:DEBUG:__init__:main@237: Using Mongo None with mppsolar
2024-02-18 23:37:29,834:INFO:__init__:main@337: Creating device "ValePower1" (type: "mppsolar") on port "/dev/ttyUSB0 (porttype=None)" using protocol "PI30"
2024-02-18 23:37:29,839:DEBUG:__init__:main@341: device_class <class 'mppsolar.devices.mppsolar.mppsolar'>
2024-02-18 23:37:29,840:DEBUG:device:__init__@33: __init__ args ()
2024-02-18 23:37:29,840:DEBUG:device:__init__@34: __init__ kwargs {'name': 'ValePower1', 'port': '/dev/ttyUSB0', 'protocol': 'PI30', 'baud': 2400, 'porttype': None, 'mqtt_broker': MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x766aaf88>, _isConnected=False), 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar'}
2024-02-18 23:37:29,840:DEBUG:__init__:get_port_type@65: port matches ttyusb
2024-02-18 23:37:29,841:INFO:__init__:get_port@107: Using serialio for communications
2024-02-18 23:37:29,853:DEBUG:__init__:get_protocol@12: Protocol PI30
2024-02-18 23:37:29,860:DEBUG:device:__init__@38: __init__ name ValePower1, port <mppsolar.inout.serialio.SerialIO object at 0x76018268>, protocol <mppsolar.protocols.pi30.pi30 object at 0x76018388>
2024-02-18 23:37:29,860:DEBUG:__init__:main@390: Commands [(<mppsolar.devices.mppsolar.mppsolar object at 0x76005790>, 'POP00', 'POP00', 'screen', None, None)]
2024-02-18 23:37:29,860:INFO:__init__:main@395: Looping 1 commands
2024-02-18 23:37:29,861:INFO:__init__:main@405: Getting results from device: mppsolar device - name: ValePower1, port: <mppsolar.inout.serialio.SerialIO object at 0x76018268>, protocol: <mppsolar.protocols.pi30.pi30 object at 0x76018388> for command: POP00, tag: POP00, outputs: screen
2024-02-18 23:37:29,861:INFO:device:run_command@274: Running command POP00
2024-02-18 23:37:29,861:INFO:abstractprotocol:get_full_command@50: Using protocol b'PI30' with 40 commands
2024-02-18 23:37:29,861:DEBUG:protocol_helpers:crcPI@313: Calculating CRC for b'POP00'
2024-02-18 23:37:29,862:DEBUG:protocol_helpers:crcPI@363: Generated CRC 0xc2 0x48 0xc248
2024-02-18 23:37:29,862:DEBUG:abstractprotocol:get_full_command@56: full command: b'POP00\xc2H\r'
2024-02-18 23:37:29,863:INFO:device:run_command@303: full command b'POP00\xc2H\r' for command POP00
2024-02-18 23:37:29,863:DEBUG:abstractprotocol:get_command_defn@60: Processing command 'POP00'
2024-02-18 23:37:29,863:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: F
2024-02-18 23:37:29,864:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MCHGC
2024-02-18 23:37:29,865:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MNCHGC
2024-02-18 23:37:29,866:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: MUCHGC
2024-02-18 23:37:29,867:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBCV
2024-02-18 23:37:29,868:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBDV
2024-02-18 23:37:29,869:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBFT
2024-02-18 23:37:29,870:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PBT
2024-02-18 23:37:29,871:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PCP
2024-02-18 23:37:29,872:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PCVV
2024-02-18 23:37:29,873:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PE
2024-02-18 23:37:29,874:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PD
2024-02-18 23:37:29,874:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: PGR
2024-02-18 23:37:29,875:DEBUG:abstractprotocol:get_command_defn@66: Regex commands _command: POP
2024-02-18 23:37:29,876:DEBUG:abstractprotocol:get_command_defn@70: Matched: POP00 to: POP value: 00
2024-02-18 23:37:29,877:DEBUG:serialio:send_and_receive@19: port /dev/ttyUSB0, baudrate 2400
2024-02-18 23:37:29,881:DEBUG:serialio:send_and_receive@22: Executing command via serialio...
2024-02-18 23:37:30,984:DEBUG:serialio:send_and_receive@30: serial response was: b''
2024-02-18 23:37:30,986:DEBUG:device:run_command@322: Send and Receive Response b''
2024-02-18 23:37:30,987:INFO:abstractprotocol:decode@196: response passed to decode: b''
2024-02-18 23:37:30,987:INFO:abstractprotocol:decode@200: Response to short
2024-02-18 23:37:30,987:INFO:device:run_command@341: Decoded response {'ERROR': ['Response to short', '']}
2024-02-18 23:37:30,988:DEBUG:__init__:main@409: results: {'ERROR': ['Response to short', '']}
2024-02-18 23:37:30,989:INFO:__init__:get_output@34: attempting to create output processor: screen
2024-02-18 23:37:30,991:DEBUG:screen:__init__@16: processor.screen __init__ kwargs {}
2024-02-18 23:37:30,992:DEBUG:__init__:main@415: Using output filter: None
2024-02-18 23:37:30,992:INFO:screen:output@19: Using output processor: screen
2024-02-18 23:37:30,992:DEBUG:screen:output@20: kwargs {'data': {'ERROR': ['Response to short', '']}, 'tag': 'POP00', 'mqtt_broker': MqttBroker(name='localhost', port=1883, username=None, password=None, results_topic='mpp-solar', mqttc=<paho.mqtt.client.Client object at 0x766aaf88>, _isConnected=False), 'udp_port': '5555', 'mongo_url': None, 'mongo_db': 'mppsolar', 'filter': None, 'excl_filter': None, 'keep_case': False}
Parameter Value Unit
error Response to short
2024-02-18 23:37:30,993:DEBUG:__init__:main@438: Not daemon, so not looping
``` |
Beta Was this translation helpful? Give feedback.
-
What do this mean: "Not daemon, so not looping"? Edit: Just to make sure it all works during the night, I changed back to ttyUSBn (and the ports have switched place again...). |
Beta Was this translation helpful? Give feedback.
-
Each time booting, the first recognised USB wil be ttyUSB0.
One can see Vendor IDs and Product IDs by running |
Beta Was this translation helpful? Give feedback.
-
I have been using mpp-solar for a couple of years now and it have been working fine with one Voltronic 10kW inverter via USB and two 200A JK-BMS via BLE. I have now two Voltronic 10 kW inverters and experience every now and then that the USB-ports switch position so that ttyUSB0 becomes ttyUSB1 and ttyUSB1 becomes ttyUSB0.
pi@raspberrypi:~ $ ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Feb 18 20:12 usb-0658_0200-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Feb 18 20:12 usb-1a86_USB2.0-Ser_-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Feb 18 20:12 usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 -> ../../ttyUSB1
I tried putting in "port=usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0" but no connection. Any ideas on how to avoid USB ports moving around?
Beta Was this translation helpful? Give feedback.
All reactions