I would like to leverage a Raspberry Pi 4B with Venus OS to monitor an Aims Power inverter/charger using TTL Communications Protocol. Aims has provided a paper on the packet formatting for TTL Communications.
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
I would like to leverage a Raspberry Pi 4B with Venus OS to monitor an Aims Power inverter/charger using TTL Communications Protocol. Aims has provided a paper on the packet formatting for TTL Communications.
Hi @thamilto1r
Support is a strong word. I'd say it's possible, however "support" I'd probably say no, given you'd have to build it out yourself using custom drivers/based on the packet/data format of the communication protocol.
Here's the general explanation:
howto add a driver to Venus · victronenergy/venus Wiki (github.com)
I think if you're using ttl you'll need to use serial-starter as described on that link for plug and play to work. Otherwise you'll need to ssh and run a command everytime.
This should allow your custom driver to read the ttl information from the correct input and then you can write to relevant dbus services.
Thanks. I will investigate serial-starter. I have one command to send to the TTL-connected inverter in order to receive the response. The inverter device operates at 2400bps. My adapter between my raspberry pi running Venus OS and the Inverter is a Waveshare USB-to-RS232-RS485-TTL adapter.
Question: Is there a document that demonstrates writing to the relevant dbus service once I have the TTL information from the correct input?
Hi @thamilto1r
There's snips on that victron github page but they're quite basic/hard to see how they fit into the wider program. My go to example is this shelly energy meter.
dbus-shelly-3em-smartmeter/dbus-shelly-3em-smartmeter.py at main · fabian-lauer/dbus-shelly-3em-smartmeter · GitHub
A few differences to note. This driver gets data via http request, whereas yours will come from ttl. It also has multiple roles ie can be grid meter or pvinverter. Which changes which dbus service it uses. Yours will ofcourse be static and the dbus relating to battery. This can be seen more clearly using the more basic example on the victron github page:
velib_python/dbusdummyservice.py at master · victronenergy/velib_python · GitHub
This example you can see servicename is set in main() rather than in subfunction. In this example it's
com.victronenergy.dummyservice.ttyO1
Here's the list of dbus services
dbus · victronenergy/venus Wiki · GitHub
but my guess is battery is the one you're looking for?
Hope this helps. (I'm taking a lot of this from Home · victronenergy/venus Wiki · GitHub just in case it's useful, although it's got a tonne on there so understand it can be hard to find it all)
My objective is to leverage my Raspi 4B, RS485 CAN Hat and a TTL to RS485 Converter to enable interface to the TTL communication protocol data on my Aims Inverter. If there is a way to use plug and play to get the data using the TTL protocol, that would support my objective.
You'd have to use the serial started setup described above. Then if you lay it out similar to shelly custom driver you'd edit the _getShellyData() function to get the ttl data. And also adjust the dbus service name and services to align with the data you're receiving.
Thanks for the info on the Shelly Energy Meter. I'll take a hard look at it.
Similar to Shelly 3em, I have Emporia Vue 2 installed in my panel today. As the two devices perform similar tasks (monitor AC In and AC Load and log it to the cloud), I would prefer to see a solution in Venus OS using Emporia (in addition to Shelly). I will inquire with the author of the Shelly solution for Venus to see if he has looked at that as an option.
Hi @thamilto1r
If you have the api layout for emporia Vue 2 then you could just tweak the function self._getShellyData()
and then adjust the meter_data keys used to populate the dbus. And you would be able to use that shelly script.
Additional resources still need to be added for this topic
43 People are following this question.