Systemair SAVECare Ventilation unit

Outdoor compensated supply temperature:
Found a way of making X and Y as setpoints from HA to calculate the supplytemperature according to the outdoor temperature, sharing the code below for others in the mean time. Y4, Y5 and Y6 setpoints are given some “test” values just to display/show that the calculated supplytemp. actually follows the calculated line between the points. Normally i would want the calculated supplytemp to be 22 degrees with the given outdoor temperature.
image

//  X  :Y(ute temp) og X (ønsket tilluft) plot:
//  X1 :5,0,	Y6 :22,0 (Eks.) - Slope 1
//  X2 :7,5,	Y5 :21,0 (Eks.) - Slope 1
//  X3 :10,0,	Y4 :20,0 (Eks.) - Slope 2
//  X4 :12,5,	Y3 :18,0 (Eks.) - Slope 2
//  X5 :15,0,	Y2 :17,0 (Eks.) - Slope 3
//  X6 :20,0,	Y1 :15,0 (Eks.) - Slope 3

// Slope = "change in Y/change in X=deltaY/deltaX"

var x= msg.payload; // utetemp.
var Y_output;       // Ønsket tilluftstemp.

// Utetmp plot:
var X1 = flow.get ("vtr300_tilluftstemp_utekomp_x1","default");   // Henter settpunkt fra HA, lagrer i memory.
var X2 = flow.get ("vtr300_tilluftstemp_utekomp_x2","default");
var X3 = flow.get ("vtr300_tilluftstemp_utekomp_x3","default");	
var X4 = flow.get ("vtr300_tilluftstemp_utekomp_x4","default");	
var X5 = flow.get ("vtr300_tilluftstemp_utekomp_x5","default");	
var X6 = flow.get ("vtr300_tilluftstemp_utekomp_x6","default");

// Ønsket tillufts temp. plot:
var Y6 = flow.get ("vtr300_tilluftstemp_utekomp_y6","default");   // Henter settpunkt fra HA, lagrer i memory.
var Y5 = flow.get ("vtr300_tilluftstemp_utekomp_y5","default"); 
var Y4 = flow.get ("vtr300_tilluftstemp_utekomp_y4","default"); 
var Y3 = flow.get ("vtr300_tilluftstemp_utekomp_y3","default"); 
var Y2 = flow.get ("vtr300_tilluftstemp_utekomp_y2","default"); 
var Y1 = flow.get ("vtr300_tilluftstemp_utekomp_y1","default"); 

var slope_1 = (Y6-Y5)/(X1-X2);
var slope_2 = (Y4-Y3)/(X3-X4);
var slope_3 = (Y2-Y1)/(X5-X6);

var Y_out_1 = Y6+slope_1*(x-X1); 
var Y_out_2 = Y4+slope_2*(x-X3); 
var Y_out_3 = Y2+slope_3*(x-X5); 

// Sjekker for "isNotNumber, ved "isNan" tidlig "exit" (ved evt. feil ved HA reconnect ell.) (prøv igjen).
  if (isNaN(Y_out_1) || isNaN(Y_out_2) || isNaN(Y_out_3)) {
    return;
  }

// Bruker Y6 som for max ytterpunkt
if (x < X1) { 
  Y_output = Y6;
}
//Rak linje for X1, X2, Y1 & Y2 
else if (x >= X1 && x < X3) { 
  Y_output = Y_out_1;
}
//Rak linje for X3, X4, Y3 & Y4
else if (x >= X3 && x < X5) { 
  Y_output = Y_out_2;
}
//Rak linje for X5, X6, Y5 & Y6
else if (x >= X5 && x <= X6) { 
  Y_output = Y_out_3;
}
// Bruker Y1 som min ytterpunkt
else if (x > X6) { 
  Y_output = Y1;
}
// Bruker Y6 som min ytterpunkt
else { 
  Y_output = Y6;
}


msg.payload = parseFloat((Y_output).toFixed(1));
return msg;

Need some help in order to improve the Modbus response so i can finish the HA and Node Red Systemair modbus integration.

I believe i have found the cause to be “queue” building up over time, causing modbus writing to be very slow as the modbus “queue” is building up.
Its strange, but it doesn’t effect the modbus reading/polling. Restarting Node-Red flush the “queue”, but the slow modbus writing comes back with the “queue” build up. (the queue reset does not work)
I have tried several attempts to minimize the modbus poll and write rate but it does not help…
I have not found any errors or warning in the addon log related to this…

Don’t find much info about this other than that others, also have this issue and have reverted to modbus node ver. 4.1.3, which seems to have cleared their “queue” build up.

So to the question:

  • Anyone running “node-red-contrib-modbus” older than ver. 5.13.3, which i’m running, that can verify that they don’t have “queue” build up? and which version are you running?

  • Im running HA supervised on Virtual Box running Linux/ubuntu and trying to figure out how to downgrade the modbus node “node-red-contrib-modbus” to ver. 4.1.3. It’s probably easy, any hints?
    Tried “sudo npm install [email protected]” without luck…

All help is appreciated so i can finish this integration, this “queue” issue is stopping me from getting any further progress…

Edit:
It seems like it after all was too many registers being polled to frequent causing the queue build up, maybe because max data traffic is reached or something.
I “just” had to lower the polling rate much more (lowered polling rate on all schedule time registers) than previous attempts, guess i got hung up in the wrong details… response is now good again.

Screenshot below regarding the “queue” building up (4211…), this is after approx. 24 hours runtime. If downgrading the node-red-contrib-modbus nodes is the “solution”, i would be very happy!
Thanks in advance.

Your integration is too awsome! I’m sorry, im running the same version as you do.

I’ve taken the time for some adustments now and it works great on my vtr250B. Had to rename some entities and remove presence detection in PPM mode.

Thanks again for the great work!

1 Like

Thanks for the feedback, glad you enjoy the Systemair integration.

It seems like it after all was too many registers being polled to frequent causing the queue build up, maybe because max data traffic is reached or something.

Hi Travis,
Amazing work! This really looks fantastic!
If possible I would love to get a copy of your files to copy these settings. I have the VSR500 unit so I am guessing there will be some modifications to code.

1 Like

Just finnished our new house with a Systemair Vtr 250. Do I need the IA module to be able to connect it to Homeassistant, or will a rs485 be enough?

The best thing is to get a IAM. Then you can control it with Modbus mode

IAM

I see. So there is no way to connect something like this USB to RS485 485 Converter Adapter Support Win7 XP Vista Linux Mac OS WinCE5.0|usb to rs485|usb tousb to usb - AliExpress directly to the unit? I was hoping to save some money on not having to get the IAM, hehe.

FYI!
I have that RS485/USB adapter connected to HA and a cable directly to my VSR300 modbus terminals. No IAM module and it’s working perfectly.

2 Likes

Great! I ordered some in to give it a go anyway - but then I know its possible :slight_smile:

I can gladly draw a system correctly. No offense but it seems needed :wink:

I’ve set up modbus like this in the configuration.yaml


modbus:
  - name: hub1
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: E
    timeout: 10

And a test sensor to read outside temp:


  - platform: modbus
    scan_interval: 10
    registers:      
      - name: vtr300_inntaks_temperatur
        hub: hub1
        device_class: temperature
        slave: 1
        register: 12101
        register_type: holding
        unit_of_measurement: °C
        count: 1
        scale: 0.1
        offset: 0
        precision: 1
        data_type: int

But when I restart I can’t find the sensor anywhere?

I dont know, but copy my config and test it out. I can confirm it works good.
I have a VSR300 from 2019

modbus:
  - name: hub1
    type: serial
    method: rtu
    port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors:
      - name: Uteluft
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        scan_interval: 10
        slave: 1
        address: 12101

That worked :slight_smile: I can now see the sensor, but it says unavailable

Hmm, I don’t know. :face_with_raised_eyebrow:

I did update my config now to get rid of some warnings in the logs.

Try this:

modbus:
  - name: hub1
    type: serial
    method: rtu
    port: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors:
      - name: Uteluft
        unit_of_measurement: °C
        scale: 0.1
        precision: 1
        scan_interval: 10
        slave: 1
        address: 12101
        data_type: int16
        device_class: temperature

Still unavailable.

I’m using a USB stick. Cat6 cable from the panel to the usb stick. Checked the continuity from board to usb stick - it was ok. The usb stick have this port according to HA: /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0

Logg gives me this:


Pymodbus: hub1: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 2 bytes (0 received)

Do I need to flash the usb before using it?

Same setup here.
Why do you have parity: E and not parity: N?
Try change that maybe.

I didn’t do anything with the usb stick. Just put it in my hardware running HA

That was just from another config. I copied yours but changed it to my port.

So it didn’t help to change that?
Try search homeassistant/core github issue page.