Use waveshare exclusively , both for rs485 and rs232, also at workJust keep in mind that there are up to 21V (RS232 spec). /15V at Deye as far is I know on the serial buss. Means if you use one of the cheap PLxxx or TLxxxx CH… (usb) converter you will fry them sooner or later if not even the USB port of your Raspis at all. I went all that way and fry serveral prior to buy one of the so called “industrial” converter from Wafeshare on Ali. (Full isolated) They are at 20 bucks or so but worth every penny.
If you run multiple inverters in parallel and use a USB hub for all the connection, keep an eye on the “boot sequence” (power on) of the respective USB ports. That sequence will define the position of your inverter in the user interface in Solar assistance. That tip alone is worth 30 hours you don’t need to spend on debugging for a bug that is no bug… ;-( LOL
View attachment 287672
Boot sequence means the physically start up sequence of the individual USB ports on the USB hub.
I'm using SA with HA via MQTT.In my opinion, integrating a solar system (via SA) into a smart home system opens up a whole new world of possibilities and automation!
The "Automation" features in SA are very basic compared to automation possibilities when integrating it into a smart home system. If you already using a smart home system and already integrated a lot of typical "things" you have endless possibilities... here are some possible examples:
- reduce house load if batteries are below a specific SOC (and not enough PV power) by changing the setpoint temperatures of heat pumps OR disconnect an electrical water heater in case of low SOC (via remote relay/contactor) OR stop the pool pump... etc. etc.
- if using grid as a backup in an off-grid installation, you may adjust the rules depending on a TOU plan, current SOC, weather/solar forecast, etc.
- you may pre-charge your batteries from grid (if required) before an on-peak TOU time frame begins to not using the grid at on-peak time.
- you may switch OFF/standby some inverters (if you have more in parallel) in case of lower load time ranges (e.g. at night) to save some idle/self-consume energy of the inverter
- you may pre-charge the batteries fast (even with grid support) before a storm will arrive (via smart home weather binding).
- you may transfer all temperatures of all inverters and batteries to the smart home to do e.g. reduce the charging amps of the inverters or to do alerting via messenger to your smart home, etc.
- ... and hundreds of other ideas...
I'm using solar assistant with my 18KPV and integrate it into home assistant. I set up a nice little display in my kitchen so I can glance over and see how production/consumption is doing. I admit, I get a rush when everything is green.
View attachment 287683
You guessed it, that's the freezer sensor. I have found that using cheap Accurite wireless sensors and rtl_433 works best for freezers. The batteries last a long time.NICE. I look forward to having a dashboard like that somedoy.
Now... do you have a temperature probe in your freezer or do you have a weird climactic thing going on?
I went with cerbo gx's to integrate my victron equipment into home assistant. The cergo gx will send everything it knows about to the mqtt server in home assistant making it a breeze to add stuff.I have it running on an Intel NUC (well, Home Assistant anyway). I haven't done much with it yet though, just fooled around with the UI.
My plan is to use ESPHome to bridge all my VE.Direct stuff into it.
I also want to try making my own smart shunts with a cheap non-smart shunt, INA226 module, and an ESP8266. I think you could be all in on a like 300a smart shunt for maybe $20 bucks that way.
Boot sequence means the physically start up sequence of the individual USB ports on the USB hub. As same as most of us I was on the impression that it simply doesn’t matter. However, it matters as the first USB port (in such a Hub) will define the first inverter, the 2nd the 2nd inverter. …..
I went with a little more costly hub that has a separate power supply as well as indication lights on each port. You will be wrong when you think that the hub will follow the logical ordert to power on in a sequence from 1-8… . In my case (! Other may different) it power on the 5th port 1st, than the 1st port etc.
if you take a video with your phone you can reply it slowly and see the sequence. Voila ! Your problem is solved.
Plug all cables in , apply a fresh restart of your Raspi and check once again that it remain the same. Once you sure you have the right order of your inverter in SA as well as the subsequencial data via Mqtt in HA or other automation software.
View attachment 287689
I've tried multiple variants with my external powered USB HUB (with ON/OFF switches for each USB socket) to change the SA order of my AIOs:That's a very helpful information for me! Thanks a lot!
Luckily I have an external powered USB HUB (with individual switches and LED's per port) and this port is powered from my existing "blackstart UPS" which I have anyway to black-start my solar system. As a result the external USB HUB will never loose power and as far as I understand it will never loose the order because of this
I never got the idea that the power on order of the USB adapters are the key to solve this problem!
$ lsusb
...
Bus 001 Device 023: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 024: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 025: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 026: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 027: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 028: ID 067b:23a3 Prolific Technology, Inc. ATEN Serial Bridge
Bus 001 Device 011: ID 1a86:7523 QinHeng Electronics CH340 serial converter
...
$ ls -al /dev/serial/by-id/
lrwxrwxrwx 1 root root 13 Apr 22 13:48 usb-1a86_USB2.0-Ser_-if00-port0 -> ../../ttyUSB5
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_A9CAb116L16-if00-port0 -> ../../ttyUSB3
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_AKBSb119D15-if00-port0 -> ../../ttyUSB4
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_DEBCb119D15-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_EBAQb116L16-if00-port0 -> ../../ttyUSB6
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_EIBSb119D15-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Apr 22 14:02 usb-Prolific_Technology_Inc._USB-Serial_Controller_EOCMb119D15-if00-port0 -> ../../ttyUSB2
$ dmesg | grep tty
[ 5.589046] usb 1-1.2.2.2: pl2303 converter now attached to ttyUSB0
[ 5.593318] usb 1-1.2.2.3: pl2303 converter now attached to ttyUSB1
[ 5.595156] usb 1-1.2.2.1.4: pl2303 converter now attached to ttyUSB2
[ 5.623331] usb 1-1.2.2.4: pl2303 converter now attached to ttyUSB3
[ 5.650340] usb 1-1.2.2.1.3: pl2303 converter now attached to ttyUSB4
[ 6.301978] usb 1-1.2.2.1.1.1: ch341-uart converter now attached to ttyUSB5
[ 6.622924] usb 1-1.2.2.1.2: pl2303 converter now attached to ttyUSB6
$ ls /sys/bus/usb-serial/devices/ -ltrah
total 0
lrwxrwxrwx 1 root root 0 Apr 22 13:48 ttyUSB5 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.1/1-1.2.2.1.1/1-1.2.2.1.1.1/1-1.2.2.1.1.1:1.0/ttyUSB5
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB6 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.1/1-1.2.2.1.2/1-1.2.2.1.2:1.0/ttyUSB6
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB4 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.1/1-1.2.2.1.3/1-1.2.2.1.3:1.0/ttyUSB4
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB3 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.1/1-1.2.2.1.4/1-1.2.2.1.4:1.0/ttyUSB3
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB2 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.2/1-1.2.2.2:1.0/ttyUSB2
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB1 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.3/1-1.2.2.3:1.0/ttyUSB1
lrwxrwxrwx 1 root root 0 Apr 22 14:40 ttyUSB0 -> ../../../devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2/1-1.2.2/1-1.2.2.4/1-1.2.2.4:1.0/ttyUSB0
ls -al /dev/serial/by-id/
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_A9CAb116L16-if00-port0 -> ../../ttyUSB3
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_AKBSb119D15-if00-port0 -> ../../ttyUSB2
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_DEBCb119D15-if00-port0 -> ../../ttyUSB5
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_EBAQb116L16-if00-port0 -> ../../ttyUSB1
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_EIBSb119D15-if00-port0 -> ../../ttyUSB6
lrwxrwxrwx 1 root root 13 Apr 23 13:27 usb-Prolific_Technology_Inc._USB-Serial_Controller_EOCMb119D15-if00-port0 -> ../../ttyUSB4
ls -al /dev/serial/by-id/
lrwxrwxrwx 1 root root 13 Apr 23 02:24 usb-Prolific_Technology_Inc._USB-Serial_Controller_A9CAb116L16-if00-port0 -> ../../ttyUSB6
lrwxrwxrwx 1 root root 13 Apr 23 02:14 usb-Prolific_Technology_Inc._USB-Serial_Controller_AKBSb119D15-if00-port0 -> ../../ttyUSB2
lrwxrwxrwx 1 root root 13 Apr 23 02:20 usb-Prolific_Technology_Inc._USB-Serial_Controller_DEBCb119D15-if00-port0 -> ../../ttyUSB5
lrwxrwxrwx 1 root root 13 Apr 23 02:15 usb-Prolific_Technology_Inc._USB-Serial_Controller_EBAQb116L16-if00-port0 -> ../../ttyUSB3
lrwxrwxrwx 1 root root 13 Apr 23 02:17 usb-Prolific_Technology_Inc._USB-Serial_Controller_EIBSb119D15-if00-port0 -> ../../ttyUSB4
lrwxrwxrwx 1 root root 13 Apr 23 02:10 usb-Prolific_Technology_Inc._USB-Serial_Controller_EOCMb119D15-if00-port0 -> ../../ttyUSB1
sudo vi /etc/udev/rules.d/60-usb-SA.rules
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="A9CAb116L16", SYMLINK+="ttyL1A"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="AKBSb119D15", SYMLINK+="ttyL1B"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="EOCMb119D15", SYMLINK+="ttyL1C"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="DEBCb119D15", SYMLINK+="ttyL2A"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="EIBSb119D15", SYMLINK+="ttyL2B"
SUBSYSTEMS=="usb", KERNEL=="ttyUSB*", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="23a3", ATTRS{serial}=="EBAQb116L16", SYMLINK+="ttyL2C"
sudo udevadm control --reload-rules && sudo udevadm trigger
First thought .... this looks ok, but instead of making up a new (probably unsupported?) /dev/ttyL1A rule -- just call them ttyUSB0 through ttyUSB6 ?I've added the following udev rule:
I thought the udev rules are only able to add new symlinks for existing ttyUSBx devices... how do I define a udev rule to not create new symlinks for existing ttyUSBx devices but instead changing the kernel used ttyUSBx names itself? I didn't find an example to do this.First thought .... this looks ok, but instead of making up a new (probably unsupported?) /dev/ttyL1A rule -- just call them ttyUSB0 through ttyUSB6 ?
This may be the reason.That way they will probably show up in SA through having standard names, AND by fixed down by serial-number-to-USBx mappings?
I think SA is looking only for /dev/ttyUSBx and /dev/ttyACMx items, e.g. and would be surprised by your nonstandard naming convention!)
As I understand it: When a new device turns up, the kernel looks to see if udev rules have any suggestions, if not, it will give it the first default name for the class of thing.I thought the udev rules are only able to add new symlinks for existing ttyUSBx devices
@fmeili1 is likely already using one, given that this is a Raspberry Pi and there isn't enough USB real estate to connect 6 or 7 devices to it.Just use a USB hub.
I've tried this a couple of times without any success! It seems like not all USB Hubs behave the same (I remember that one member had the same problem with his USB Hub, but others are working like this).Just use a USB hub. The order will be the order of the physical ports on the hub. If you want to change which inverter goes to a certain number just move the usb male connectors on the hub. Simple ! This works this way on my system.