Siemens logo 8

In the meantime, have you found a way to communicate in mqtt? Thank you!

Now just setup the node to read the network input or output from logo and connect it with HA using mqttt node. In HA create a mqtt switch or other mqtt entity. That is what I did.

But now I figured out how to use modbus and it works fine. I do not have to use nodered and mqtt anymore for this.

What I did is I used modbus and template switch.
In HA create modbus connection with 2 coils. One coil is connected with network input of logo which controls the output. Another coil is connected with network output in logo which reads the state of the output (see image below, but take into account that I am using push uttons so the signal goes through pulse relay)
Create template switch that uses state coil as sensor and control coil as switch. Set the switch to toggle state (in my case I created a script that generates a short pulse of signal each time you toggle the template switch)

Now if you enable light manually it will be updated in HA

1 Like

I have been able to use your setup and applied it to the analog inputs.

Firs I added a sensor NAQ2 and its VW address 102 to my setup as can be seen in the image below.

image

From there I looked up the correspondence of VW to it’s register with the following table, I didn’t make this, the credit to the maker. The register is the address divided by 2.

In my case 102 correspond to 51. With the snippet below you are able to get the output value from the Logo.

sensor:
  - platform: modbus
    scan_interval: 1
    registers:
      - name: SensorLivingRoom
        hub: hub1
        slave: 1
        register: 51

Controlling the dimmer is done with the following code. The address is 50 as my logo has a network anlalog input with an address of 100.

- platform: template
    lights:
      living_room:
        friendly_name: "Living Room"
        level_template: >
          {% if (states('sensor.sensorlivingroom') | int) == 0 %}
            {{ (states('sensor.sensorlivingroom') | int) }}
          {% else %}
            {{ ((states('sensor.sensorlivingroom') | int ) * 255 / 100) | round(0) }}
          {% endif %}
        value_template: "{{ states('sensor.sensorlivingroom') | int > 0 }}"
        turn_on:
          - service: modbus.write_register
            data:
              hub: hub1
              unit: 1
              address: 50
              value: 50
        turn_off:
          - service: modbus.write_register
            data:
              hub: hub1
              unit: 1
              address: 50
              value: 0
        set_level:
          - service: modbus.write_register
            data:
              hub: hub1
              unit: 1
              address: 50
            data_template:
              value: "{{ ((brightness | float / 255) * 100)  | int }}"

It took me some time to get it working but now it is working like a charm. I can change the light intensity from HA or my physical switches and there is no way of knowing that either has been used. It’s seamless.

Hope this can help trying to do the same.

3 Likes

I would like to know how you control the dimmer itself. What is the wiring? Which led driver do you use? Do you use analog output from the logo to control it? What type of sensor do you use?

The wiring is pretty straight forward, I use a digital in to control the dimmer and an analog out for the light. The output drives a niko dimmer this is the one I use : https://www.niko.eu/en/article/330-00701 (you can also do this with 2 modules from eltako SUD12 and LUD12, it is cheaper). On a side note, I would have loved the logo to have a PWM of 100Hz than I could have used a digital out instead of an analog output and would have been way cheaper. Bud sadfally it is what it is.

As I am controlling indoor lighting the sensor is my eye and AQ sent to HA and it can be trusted.

How to control a dimmer with one DI and one AQ can be found in the documentation from siemens very well explained (section 4.2 is where you can find the schematics) : https://cache.industry.siemens.com/dl/files/085/109739085/att_909111/v6/109739085_dimming_with_logo_DOCU_v10_en.pdf

From there I added 2 things:

  • being able to control with HA that is the bottom part of my schematic
  • stop the dimmer to change value when it reaches the max or the min

It isn’t perfect some things need to be cleaned especially the scale but it works. I don’t know where to upload my file so here is a picture my dimmer controller.

I hope this help.

1 Like

Hi! thank you very much!
I’m trying to do the same thing. I also have logos (logo latest version at 230 V) and specifically I have 4 with each 2 expansions. I’m doing my home automation this way. I would like to integrate it with HA, and I am also new to this platform.
I wanted to understand what that green shape is next to the OR square. And I wanted to ask you if you can upload the LogoSoftcomfort project file here so I can better understand and take a cue, and if possible also the file that must be uploaded to HA.

Thank you very much and happy Easter!

Thank you for detailed explanation. I did not use output drives like niko dimmer before, so I do not understand how they are controlled, but I will dig into it.

I tried to control led brightness using specific driver that dims the light dependng on the analogue signal that you put in it (like this one -https://www.ebay.co.uk/itm/183523395899) I used analogue output from logo module to control it and it worked. But your approach seems different.

Thank you once again!!!

The green shape is just a shortcut to some input. If you have big sche in logosofcomfort you can cut the black line so your scheme looks cleaner. And then you will get this two green shapes that will state the name of the box they lead to.
For other parts of integration just use modbus. It is working wery well for me right now. I have system with 4 logo8 modules they communicate with each other and with HA aswell. Everything works fast and smooth.

Thank you very very much!!!
Can I ask you if you know some manual or guide or video tutorial that explains how modbus on logo works? I have read the official manual, but it explains only how to set up. The thing that is difficult for me is to understand how to connect network inputs and network outputs with modbus

Hi, Viktors
I used the next trick on LOGO side to operate regular two-position on/off switch (I8) as a pushbutton.
This could help you to avoid additional HA script for generating short pulse.
My task was not to use expensive designer pushbuttons while it was renovation works in my apartment and to use ready wiring with a cheap on/off switch.


Hope it helps.

2 Likes

The concept is hard to grasp, but once you understand, you will get it going well. On logo you create internet input or output and assign adress to it. You can look how adresses in softcomfort correspond to modbus adresses in logo documentation. Then just create modbus switch or sensor in HA and you are good to go.

1 Like

This is great! Unfortunately I already bought 15 pushbutton switches for my house… :sweat_smile:
Thank you!

Maybe I was not clear but my idea is to use “normal” switch in HA together with physical pushbutton you already bought without pulse-generation script:

2 Likes

Hah silly me. Yes it seems to work. I thought I could use it with physical switch aswell!

Thak you once again. It is a very useful tip!

You’re welcome.

My Niko dimmers are controlled with 0-10V but can control 230V dimmable lights. Should work the same as the ones you have.

I had to use resistors for the one I used, because I could not control this driver just by connecting it to the driver from logo module. I still do not know why it does not work when I connect it without the resistor.

How are you driving them? Did you select 0-10V or are on a current output of 0 20mA

I have logo AM2 AQ module (https://support.industry.siemens.com/cs/pd/114944?pdti=pi&dl=en&lc=en-US).
It can output 0-10 V signal which I connected to the driver - https://www.ebay.co.uk/itm/183523395899.
The driver also has separate 220 v power input to power the led and output that goes to the led itself.
So when connecting the am2 logo module directly using the 0-10v output the driver does not react and works on full brightness, but if I connect am logo module with the driver in parallel with resistor then it works.
I opened a thread on siemens forums (https://support.industry.siemens.com/tf//WW/en/posts/led-dimming-using-am2-aq-module-0-10v-output/213916?page=0&pageSize=10) - and got an answer, that I had to put a resistor for it to work and it did work. But I really havent understood why I should add this resistor.

The reason you need the resistor is that you need a load on which to measure the variation of voltage. Otherwise, it’s like putting a voltmeter in series.
While the Niko I have is using the industrial “standard” of voltage control so it doesn’t need this extra resistor

1 Like