yasdi2mqtt as interface between SB4000TL-20 and Home-Assistant #18
-
Hi Paul, |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 3 replies
-
Yes, that would probably work, Go for it! You'll need an rs485 piggyback board for the inverter if it does not already have the actual rs485 output, then need an rs485-usb converter to go to the RPi. For the PV inverters there maybe be a home assistant integration already, look around or ask in home-assistant forums. I would start by making sure you can communicate over rs485 with the inverter, to the RPi. Install yasdi and see if yasdi shell works to see the data. Then set up yasdi2mqtt, and from there HA can get the data over mqtt (all within the same RPi if you want, or mqtt over your network.) I am using yasdi / yasdi2mqtt to monitor a pair of SI6048US battery inverters, on the same RPI as I have IOTstack running with nodered / grafana / influx. The RPI controls a number loads in the house to manage available solar and charge & discharge separate battery banks, to mostly keep the main FLA SI battery floating full. It all works! Very Fun! Here are my notes from setting mine up. Not a complete guide, but might be helpful. 11/9 installed rs485-usb adapter to SMA master inverter. seems to be detected, following FTDI driver 11/13 tested yasdi, and mqtt2yasdi on the second RPi, it works and publishes to mqtt!
[DriverModules] [COM1]
11/17 working fine, more nodered and dashboard changes. variable ET micros discharge control works 11/30 pi@hassbian:~/yasdi2mqtt $ yasdishell |
Beta Was this translation helpful? Give feedback.
-
OK, sounds good! Regarding home assistant integrations for SMA inverters, my understaning after long search in the forum is, that direct SMA integration is only possible for devices with web interface (see https://www.home-assistant.io/integrations/sma/). The second possibility is integration via modus by serial (rs-485), TCP, or UDP connection. Since my 10 year old inverter doesn't provide modbus, this will not work. Third possibility might be Bluetooth, but with a highly indirect way via SBFspot (https://github.com/SBFspot/SBFspot). Hardware is already there: a 485 Datenmodul (485I-MOD-G1 BGCB) and a RS485 to USB converter, which is detected as /dev/ttyUSB0. When you say " Install yasdi", do you mean this software here: https://github.com/ardexa/sma-rs485-inverters ? |
Beta Was this translation helpful? Give feedback.
-
Worked like a charm!! Device handle: 1
Device 'WRTL14CD SN:2100521179' has 23 Spot channels:
Reading channel values, please wait...
------------------------------------------------------------
Channel handle | Channel name | Channel value (Unit) |
------------------------------------------------------------
358 | ' A.Ms.Amp' | '1.638' (A)
359 | ' A.Ms.Vol' | '341.430' (V)
360 | ' A.Ms.Watt' | '559.000' (W)
362 | ' B.Ms.Amp' | '1.234' (A)
363 | ' B.Ms.Vol' | '179.360' (V)
364 | ' B.Ms.Watt' | '220.000' (W)
365 | ' Pac' | '774.000' (W)
366 | ' GridMs.Hz' | '49.960' (Hz)
372 | ' GridMs.PhV.phsA' | '235.630' (V)
373 | ' GridMs.PhV.phsB' | '0.000' (V)
374 | ' GridMs.PhV.phsC' | '0.000' (V)
385 | ' E-Total' | '41762.925' (kWh)
389 | ' Mt.TotOpTmh' | '42430.746' (h)
390 | ' Mt.TotTmh' | '43595.608' (h)
393 | ' Op.TmsRmg' | '0.000' (s)
394 | ' Serial Number' | '2100521179.000'
395 | ' Op.EvtCntUsr' | '3981.000'
399 | ' Op.EvtNo' | '0.000'
506 | ' Mode' | 'MPP'
507 | ' Error' | '-------'
529 | ' Op.GriSwStt' | 'Cls'
530 | ' Inv.TmpLimStt' | 'None'
546 | ' MainModel' | 'Solar-WR' As next step I would install a Mosquitto MQTT broker on my Home Assistant (HA) Raspberry Pi (For the time beeing I will run yasdi2mqtt and Home Assistant on seperate Raspberry Pi's).
Is my understaning correct? |
Beta Was this translation helpful? Give feedback.
-
Congrats, pretty cool to see your data, eh? If mosquitto is installed on your RPi, then it is the mqtt broker. It receives and relays all the mqtt messages. Then it would be the local ip address of your RPi, and maybe port 1883. If you want to use an mqtt broker in the cloud (some people do), then it might be similar what you listed (I'm not sure, read HA setup info for it). Or, actually, if you've set up the RPi HA for remote access, then the RPi's ip address might be as you listed (getting it from duckdns). So yes, that might be right for that configuration. |
Beta Was this translation helpful? Give feedback.
-
Yes, really cool!! |
Beta Was this translation helpful? Give feedback.
-
Command docker-compose up in path /home/pi/yasdi2mqtt where docker-compose.yml is, fires error: |
Beta Was this translation helpful? Give feedback.
-
OK OK, after some googling, I followed this guide https://dev.to/elalemanyo/how-to-install-docker-and-docker-compose-on-raspberry-pi-1mo and installed docker and docker-compose plus the "Docker system service to start your containers on boot" thing.
Interpreting of the data will be some diligence work and then I can start optimizing the use of self generated electricity. Viele Grüße und besten Dank für die Unterstützung von Vaihingen/Enz nach Zürich |
Beta Was this translation helpful? Give feedback.
-
One more question. Could you please explain, how to do this:
Do I have to stop the container (?) and then? |
Beta Was this translation helpful? Give feedback.
-
restart: always (https://serverfault.com/questions/884759/how-does-restart-always-policy-work-in-docker-compose) for every service did the job for me.
|
Beta Was this translation helpful? Give feedback.
-
Thanks @dalklein for handling the request! I'm glad everything works out as expected :) PS: I don't know how applicable it is for your use case (your parameters look quite different), but I've already posted a parameter legend in a similar thread. |
Beta Was this translation helpful? Give feedback.
Yes, that would probably work, Go for it!
You'll need an rs485 piggyback board for the inverter if it does not already have the actual rs485 output, then need an rs485-usb converter to go to the RPi.
For the PV inverters there maybe be a home assistant integration already, look around or ask in home-assistant forums.
I would start by making sure you can communicate over rs485 with the inverter, to the RPi. Install yasdi and see if yasdi shell works to see the data. Then set up yasdi2mqtt, and from there HA can get the data over mqtt (all within the same RPi if you want, or mqtt over your network.)
I am using yasdi / yasdi2mqtt to monitor a pair of SI6048US battery inverters, on the same R…