question

thamilto1r avatar image
thamilto1r asked

Does Venus OS Support 'generic' TTL Communications - Aims Power inverter/charger

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.

communication protocol
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

6 Answers
matt1309 avatar image
matt1309 answered ·

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.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thamilto1r avatar image
thamilto1r answered ·

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.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thamilto1r avatar image
thamilto1r answered ·

Question: Is there a document that demonstrates writing to the relevant dbus service once I have the TTL information from the correct input?

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·

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)



0 Likes 0 ·
thamilto1r avatar image
thamilto1r answered ·

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.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·

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.

1 Like 1 ·
thamilto1r avatar image
thamilto1r answered ·

Thanks for the info on the Shelly Energy Meter. I'll take a hard look at it.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

thamilto1r avatar image
thamilto1r answered ·

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.

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·

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.



1 Like 1 ·

Related Resources

Additional resources still need to be added for this topic