Voltronic Power Interface

A library to communicate with Voltronic Power inverter/PV products.

NOTE: The author of this library has no association with the above mentioned company

Some public documentation exists of supported commands and how to interpret the output.

Not all commands are supported by all devices

Use

SerialPort

NOTE: Only Ruby Gem serialport is currently supported

Linux/Mac OS X/BSD

Serial ports are typically found in /dev/tty* These devices may require root privilege in which case it is recommended to add a udev rule with less restrictive permissions.

Example udev rule for Prolific devices:

echo 'ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE="0666", SYMLINK+="ttyProlific"' > /etc/udev/rules.d/37-prolific.rules

require 'voltronic/protocol'
# => true

proto = Voltronic::Protocol.for_serialport('/dev/tty_usbserial')
# => Protocol(IO)

proto.execute 'QPI'
#=> '(PI30'

timeout = 0.5 # 500 milliseconds
proto.execute 'QPI', timeout
#=> '(PI30'

Windows

require 'voltronic/protocol'
# => true

proto = Voltronic::Protocol.for_serialport('COM1')
# => Protocol(IO)

proto.execute 'QPI'
#=> '(PI30'

timeout = 0.5 # 500 milliseconds
proto.execute 'QPI', timeout
#=> '(PI30'

USB

The implementation currently only support Linux using HIDRaw

To avoid running as root, execute the following to add a symlink with less restricted privileges

echo 'ATTRS{idVendor}=="0665", ATTRS{idProduct}=="5161", SUBSYSTEMS=="usb", ACTION=="add", MODE="0666", GROUP="root", SYMLINK+="hidVoltronic"' > /etc/udev/rules.d/35-voltronic.rules

require 'voltronic/protocol'
# => true

proto = Voltronic::Protocol.for_usb('/dev/hidVoltronic')
# => Protocol(IO)

proto.execute 'QPI'
#=> '(PI30'

timeout = 0.5 # 500 milliseconds
proto.execute 'QPI', timeout
#=> '(PI30'