Siemens logo 8

Not sure if Logo is better, it is more quality but much less sofisticated. And very industrial :).
For that kind of money one an buy dedicated commercial grade hardware like Philips Dynalite (i have it so i know) which is very high quality but made for homes/buildings with software support which makes lives much easier :).

Logo should be used for what it was meant to be, basic industrial machines and automations.

What I did myself is comparison with KNX and KNX lost the battle for me. Logo is a good choice which I use for all the things in my house lights, heating, garden watering and my microgreen farm all in one. I do not worry if my router or internet connection will get damaged, all will work as in default mode. HA is used like a supervision software that handles complicated automation if needed. Everything is wired and no wifi is used.
And by the way Logo modules are marketed as home automation devices by siemens itself. You can check it out here - https://new.siemens.com/global/en/products/automation/systems/industrial/plc/logo/home-automation.html

@Viktors_Linovs I had the same consideration and Logo has won the battle, too. How will you manage dimming lights? My current idea is to control DMX dimmers via Node-Red in HA, but that will then become the weakest link. Analog output modules and 0-10V dimmers will become too expensive.

This is the answer to your question. There is no other way as far as I know:

@Viktors_Linovs I also considered this analogue route, but Logo AM2 AQ modules are pretty expensive. As a slave dimmer, a Finder 15.11 probably would be cheaper than a Niko.

Hi,

I have a home automation system built by a small company which uses Logo8’s for controlling lights and other small home automation tasks.

The system has 3 Logo units. Main Logo is controlling smoke sensors, water valves etc and has Logo + two expansion modules (DM 16/24 and DM16/24R)

This main Logo also controls two Logos (both units have two DM 16/24 expansion modules) which are responsible for controlling the lights.

So if I understood correctly, for lights it’s: Push button->Logo8->24vdc relay->light

Theres also possibility to add push buttons to the main unit which allows for example to turn off all the lights by pressing push button for longer than 2 seconds:

Push button->Main Logo8->Logo8’s for lights->relays->lights

I’m really interested of making a interface for controlling this in Homeassistant but it seems quite impossible task for me as all units has SDcards which are protected by Logo so therefore I can’t open them in LSC so ModBus seems to be a impossible task for me. (If someone knows how to bypass this protection, please tell me :slight_smile:.

I could probably get the sources for the units but that would be around 400€ each so not going to pay that.

Another option would be to remake all programs in the Logo8 units but that would probably take some time.

Probably I should change the Logos to something else?

So, got the sources for free as the designer of the system wanted to have Modbus enabled on this thing.

I’m using Network Inputs for all outputs but I didn’t add any network outputs as you can read the normal output coil (eg. 8193) to get the light status.

Annotation 2020-08-07 042414

The circuit diagram in this picture detects if the push button is pressed for more than 1 second so it starts to dim the lights (Eltako dimmers)

I’m resetting the switch status by setting a NQ to the same address as the NI so the input always stays at 0

image

Heres my configuration for example switch which seems to work just fine:

switch:
  - platform: modbus
    scan_interval: 1
    coils:
    - name: q5
      hub: 16set1
      slave: 0
      coil: 0

      
  - platform: template
    switches:
      testi:
        friendly_name: "Testi"
        value_template: "{{ is_state('binary_sensor.q5', 'on') }}"
        turn_on:
          service: switch.toggle
          data:
            {"entity_id": "switch.q5"}
        turn_off:
          service: switch.toggle
          data:
            {"entity_id": "switch.q5"}
        icon_template: >-
          {% if is_state('binary_sensor.q5', 'on') %}
            mdi:lightbulb-on-outline
          {% else %}
            mdi:lightbulb-outline
          {% endif %}


binary_sensor:
  - platform: modbus
    scan_interval: 1
    inputs:
      - name: q5
        hub: 16set1
        slave: 0
        address: 8196
        device_class: light

Thank you for the information! Could you please explain how does the U001 block work? What is it? I can not find it in my LSC. Thank you!

Could you please tell me how do you get 1-10V signal to control it? Or you control it differently?

Hi,

it’s a user defined function made by the designer of this system. I have no expertise in Logo Soft Comfort but been reading a little bit about it. Here’s a link explaining how to make them.

https://support.industry.siemens.com/tf//WW/en/posts/how-to-create-an-user-defined-function-udf-in-the-logo-soft-comfort-7-0/61995?page=0&pageSize=10

Did some work with the light switches again, I didn’t know that there was a service to write directly to a coil as couldn’t find any documentation of it in Homeassistant documentation.

  - platform: template
    lights:
      alakerran_wc_peilivalo:
        friendly_name: "Alakerran WC:n peilivalo"
        value_template: "{{ is_state('binary_sensor.q5', 'on') }}"
        icon_template: >-
          {% if is_state('binary_sensor.q5', 'on') %}
             mdi:lightbulb-on
          {% else %}
             mdi:lightbulb
          {% endif %}
        turn_on:
          - service: modbus.write_coil
            data_template:
              unit: 0
              address: 0
              state: >
                {% if is_state('binary_sensor.q5', 'off') %}
                  1
                {% else %}
                  0
                {% endif %}
              hub: 16set1
          - service: homeassistant.update_entity
            data_template:
              entity_id: binary_sensor.q5
              
        turn_off:
          - service: modbus.write_coil
            data_template:
              unit: 0
              address: 0
              state: >
                {% if is_state('binary_sensor.q5', 'on') %}
                  1
                {% else %}
                  0
                {% endif %}
              hub: 16set1
          - service: homeassistant.update_entity
            data_template:
              entity_id: binary_sensor.q5

This allows me to only have one binary sensor reading the status of a coil without the need for second switch for controlling it and it gives me much faster response time in Lovelace UI (Lightbulb on -> Lightbulb off).

1 Like

Sorry for my question but i’m trying in that days to connect logo 8 fs4 to home assistant via modbus tcp.
Really I need only to read state of M27 and M28.
In my opinion that data could be on register 8282 and 8283.
Mine problem is that on HA I found every time message: Entity not available

On logosoft comfort I draw line from plc to modbus entity (so Logo is a client)

On configuration.yaml I have
modbus:

  • type: tcp
    name: sma
    host: 192.168.1.51
    port: 502
  • type: tcp
    name: plc22
    host: 192.168.1.22
    port: 502

On Switch.yaml I have:

  • platform: modbus
    scan_interval: 1
    coils:
    - name: Plc22-m27
    hub: plc22
    #entity_id: Plc22-m28
    #unique_id: Plc22-m28
    slave: 1
    coil: 8283
    - name: Plc22-m28
    hub: plc22
    #entity_id: Plc22-m28
    #unique_id: Plc22-m28
    slave: 1
    coil: 8284
    - name: Plc22-m27-28-test
    hub: plc22
    #entity_id: Plc22-m28
    #unique_id: Plc22-m28
    slave: 1
    coil: 8285

Print Screen - 20201112 173330 - 001

Thank you for any hint

Two things jump to mind!
With your copy paste I can’t determine whether the indentation is good or not
Try changing your port to something else, when my host changes ip address I often get an issue.

Hi all,

As we’re planning to automate our house using Siemens Logos this discussion topic has been very helpful to me to understand how to control this from Home assistant. Thanks all!

What seemed sub-optimal to me is the solution with the light template. Having to tell HA the state of the light. So I was wondering if I could not make it work more like a normal switch, where the state of the switch simply represents the state of the light.

If you simply loop back the state of the light to the network input again through a network output, you get an infinite loop (took me a while to figure out why that happens). So I found a way of blocking a second switching instruction that comes too fast after the first (by blocking the next action for 1/50, which should not impair normal usage):

Whilst it works fine I am not very satisfied with the solution, as I realise I am merely replacing complexity in HA configuration with that of the Logo program. But I am posting it here to see what you all think. And perhaps you know a more elegant solution.

Hi guys!
Seems in latest update of HA (2021.7.3) all above modbus configuration are not actual.
Could someone share working HA conf and LOGO diagram?

The LOGO programs don’t require a change. There have been significant improvements to the HA Modbus integrations recently. The documentation is excellent though, and is kept in sync with the improvements. It contains good examples. If you compare your current config with the examples, you’ll quickly discover the needed changes.

Hope this helps

modbus:
  name: hub1
  host: "ipaddress"
  port: "your port"
  type: tcp
  sensors:
    - name: "whatever"
      scan_interval: 5
      slave: 1
      address: 51
  binary_sensors:
    - name: "whatever"
      scan_interval: 5
      slave: 1
      address: 18
  switches:
    - name: "whatever"
      write_type: coil
      slave: 1
      address: 16

Hi Folks again,

The latest modbus integration update brought excellent stuff that allow me to simplify light control. But I faced a terrible problem with one of my LOGOs.
The connection to this device isn’t stable enough (it use WiFi) and lost sometimes for a minute or two. And after restoring the connection Logo doesn’t respond to HA anymore and all the sensors and switches are in the “unavailable” status in HA. That was not an issue before 2021.07 modbus update with the same setup. Now only HA restart helps.
At the same time modbus connection to this LOGO via NodeRed works like a charm restoring connection automatically after network outage.

Does anyone had the problems with LOGO connection/availability from HA? Any idea how to reconnect modbus integration without restarting HA?

I like this idea, it’s much better than my own solution. Will try to use this in my system. Thanks!

Hello Community, i am pretty new to HA and to Logo.
Our electrician installed a Logo for our shutters. I have managed to login to the Logo to change the times of when they should auto close and open.

Now i found this Thread that will maybe make it possible for HA to take over the closing and opening.
I think i can find out how to make a connection via modbus. I installed the editor to edit the configuration file.

Question 1:
I read in this thread about switches for lamps. But i believe i need a push button (Taster in german) and no switch for the shutters. Is that right? If yes, how do i manage it?

Question 2: I read about the Coils stuff. Which Coil will i need for my Shutter? Do i need to simulate I1 and I2, or Q1 and Q2 i am a bit lost. I1 and I2 dont have no coils, or?

Here is my Logo Code for the Shutter:

Could someone support me? Thanks in advance :slight_smile:

Steve