ADS Integration discussion - Commonly used libraries

Hi all,

I am working on the ADS integration, and I’m wondering what libraries (Beckhoff or custom) you use in your PLCs, which are connected with HA.

Recently, there was an issue with the Cover entity, and some of you mentioned the current integration handles the position in a different way, than your PLC is handling it, and it’s frustrating.

If I could get some input from you, who are using it (currently 49 active installations), that would be much appreciated.

3 Likes

Hi Adam,

i appreciate you opening this discussion. I was involved in the cover-discussion on GitHub aswell. :slight_smile:

Device type cover:
On the PLC side my covers use a custom function block which is based on the FB_VenetianBlindEx function block.
It handles the position with values from 0 to 100 in the opposite way than HA does. For everyone else having this problem, this can be fixed quickly by adding the following on the PLC side (obvioiusly the VAR names are specific to my configuration, but you get the idea):

VAR
  fbCtrl: FB_VenetianBlindEx;
END_VAR
VAR_OUTPUT
  uPosiHA: BYTE;
END_VAR

fbCtrl (
  nActualPosition => uPosi );
uPosiHA := 100 - uPosi;

There are 2 bigger pain points i have with FB_VenetianBlindEX at the moment:

  1. The execution of the cover moving into the position i input via the slider in the HA frontend.
    My PLC receives the value, problem is that FB_VenetianBlindEx requires a TRUE on the variable bPosition to execute driving to the specified position.

  2. Another problem: I have blinds, which means there is two positional variables that are relevant for precise control: the one that we already have, the position, but also the angle of the blinds. I have seen HA supports angles (tilt) in the cover template. FB_VenetianBlindEx doesn’t have variables to set the angle, this is something i will add to my custom function block myself.

At the moment im trying to solve both of those problems via ADS Actions and HA templates, but im a rookie in HA and didnt have success yet.

Device type binary sensor:
It would be cool to have the option to invert those right as we define them via the ADS integration in the yaml, by adding an optional bool configuration variable called inverted or something similar. It would save the extra work to invert them via clicking through the helpers menus.

Those are the points that i am occupied with right now. I will add a ventilation system and per room heating to HA in the future. I already have an idea how to do it with templates (not how to succesfully do it though, need more practice in HA and yaml :smiley: ).

(I am a new user, so i am limited to only 2 links per post)

1 Like

Hello everyone,

I’m delighted to see this post and hope it continues to gain attention and inspire renewed interest!

During my search for solutions, I also came across a suggestion on Git that resolved the issue with the covers for me – big thanks for that!

I’m using the ADS integration, which has proven to be incredibly reliable in my setup. Specifically, I rely on the following libraries for HomeAssistant:

  • TF8000 TC3 HVAC
  • TF8010 TC3 Building Automation Basic
  • TF8040 TC3 Building Automation

Feel free to share your experiences or tips – I’m always eager to exchange ideas! :blush:

Hello, I use TC_HVAC libraries (TS8000, TwinCAT 2), blocks FB_BARollerBlind. Position 100% - cover is closed (in HA opposite). Will be much easier if libraries could match HA.