Community
OpenEnergyMonitor

Community

RS485 Helios Interface

Tags: #<Tag:0x00007f6e08ffae88> #<Tag:0x00007f6e08ffad70>

Continuing the discussion from Need help getting input from RS485 feed into emonPi/EmonCMS:

Hi @Bill.Thomson, I wanted to use a builtin module to access the Helios but could not get my head around the message coding (not one of my strong points). Could you offer any advice to get me started? As I understand it, I am putting a second master on the bus which can cause issues.

I found this specification http://www.heliosventilatoren.de/mbv/kwl-eb_91658_0409_uk.pdf and some other information I put into a PDF on https://github.com/borpin/heliospy

Hi Brian,

Here’s a code snippet from the minimalmodbus docs page that may be of help:

#!/usr/bin/env python
import minimalmodbus

instrument = minimalmodbus.Instrument('/dev/ttyUSB1', 1) # port name, slave address (in decimal)

## Read temperature ##
temperature = instrument.read_register(289, 1) # Registernumber, number of decimals

Since I’m not familair with the Helios device you’re using, some of this is a SWAG.

That should make the comand to read register 18, an unsigned 16-bit value representing max CO2 concenration, something like this:

max_co2 = instrument.read_register(18, 0)

Going on the premise the value in register 20 is a signed integer,
reading register 20 should be similar to this:

outdoor_air_temp = instrument.read_register(20, 0, 3, true)

where:
20 = register number
0 = number of decimal places
3 = function number (read holding registers)
true = signed integer flag

The minimalmodbus API docs are at:
https://minimalmodbus.readthedocs.io/en/master/apiminimalmodbus.html

and details are at:
https://minimalmodbus.readthedocs.io/en/master/modbusdetails.html

Here’s another link that should help get you going:
www.csimn.com/CSI_pages/Modbus101.html

If you have a way to ensure only one of the two masters can transmit at any given time, and the 3.5 character “silent interval” (~4 mS at 9600 bps) passes before a subsequent transmision, more than one master shouldn’t be a problem.
Ref: http://modbus.org/docs/Modbus_over_serial_line_V1_02.pdf (section 2.5.1.1, page 13)