Siemens logo 8

yeehaw ! it works, thank u so much. Now i will try to add open cover.

now that i have added everything in HA, how do i automate? For example everyday @ 19.00 the shutters should close?

Ok, i added the cover_open_script and it works too! :slight_smile: :slight_smile: sooo cool! But how do i configure the Stop?

I hope i am not spamming this thread. I added the cover_stop_script.
I believe i have to put some if then into the script.

For example:

if the binary_sensor of CoverAb is on/true then switch.SwitchAuf_Kitchen
elseif the binary_sensor of CoverAuf is on/true then switch.SwitchAb_Kitchen

i just don´t know where to put it.

"{{ is_state('binary_sensor.coverAB', 'on') }}"

"{{ is_state('binary_sensor.coverAuf', 'on') }}"

'cover_stop_script':
  alias: cover_stop_script
  sequence:
  - service: switch.turn_on
    target:
      entity_id: switch.SwitchAuf_Kitchen
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - service: switch.turn_off
    target:
      entity_id: switch.SwitchAuf_Kitchen
  mode: single

To implement the stop, I would add another NI which is connected to B072 and B031 this to bypass your timers as their is no senser in your logo. All you have to do afterwards is copy paste the same script as you have done.

To implement the timer there are two ways in my opinion

  • hard code the time in an automation
  • use a date time to be able to change it on the fly

For the second solution in configuration.yaml :

input_datetime:
  lower_shutter:
    name: lower shutter
    has_date: false
    has_time: true
  raise_shutter:
    name: Raise shutter
    has_date: false
    has_time: true

In lovelace add an entities card with both of them and set your designated time.

Now in automation do the following (this is just one the fly so might need to adjust some things) :

alias: Lower shutter
description: ''
trigger:
  - platform: template
    value_template: >-
      {{ states('sensor.time') ==
      (states.input_datetime.lower_shutter.attributes.timestamp | int | timestamp_custom('%H:%M', False)) }}
action:
  - service: script.cover_close_script
mode: single

Hello Gliena,

thank you for all your patient with me. This is all still so new to me.
I don´t understand how to get the Stop to work. I looked at the Logo Setup and couldnt figure it out. So i will skip that to another time.

I have one problem with the Cover Template so far. One Symbol (up or down) is always disabled. If the Shutter is only 50% closed, i cannot choose to go up or down, because one is disabled. Can i change the setting so the symbols don´t disable?

The Automation didn´t work. I have the Time card on my Dashboard with timeset and put the lower shutter into the automation. But nothing happens :slight_smile

Am i missing something?

The stop part is easy just do like on the drawing, with this new NI you will have to make a new switch in HA (SwitchStop_Kitchen with your logic) and try it out.

I changed my above post to correct the automation, now it should work as is.

For the shutter part having both arrows up and down you need to have a value, using position_template ( Template Cover - Home Assistant ). Not having any sensors on your logo this can be a little more complicated. You should maybe look into the stopwatch function in the logosoftware.

First of all, thank you for the great posts. @tyr0n have you already found a solution regarding the position? I would be interested in this. Thanks very much.

I would also like to thank you for all the great posts. I’m new to HA and learning a lot here.

I have a few Logo 8 controlling my lights and inputs are mostly wired to push buttons in rooms. A lot of the solutions on this thread use a switch to send commands to a Logo from HA. The Button integration was introduced in HA 2021.12. Could that be used instead of the switch?

Huge thanks for this great and inspiring post! I am trying to get modbus communication with my Logo! plc, but for some reason when I try to get my configuration file ready, the modbus integration stop working. I also have a SolarEdge modbus integration that is working fine unless adding a new modbus client.

Here is my configuration file: can some one advise on what I am missing?

modbus:
  name: logoCT
  type: tcp
  host: 192.168.1.8
  port: 503
  

binary_sensor:
  - platform: modbus
    scan_interval: 1
    coils:
      - name: "richiesta CALDO [Q1]"
        hub: logoCT
        slave: 1
        coil: 8192
        device_class: heat
      - name: "richiesta FREDDO [Q2]"
        hub: logoCT
        slave: 1
        coil: 8193
        device_class: cold
      - name: "Pompa P1 [Q3]"
        hub: logoCT
        slave: 1
        coil: 8194
        device_class: running
      - name: "Pompa P0.1 [Q4]"
        hub: logoCT
        slave: 1
        coil: 8195
        device_class: running
      - name: "Pompa P0.2 [Q5]"
        hub: logoCT
        slave: 1
        coil: 8196
        device_class: running
      - name: "Elettrovalvola P0.1 [Q6]"
        hub: logoCT
        slave: 1
        coil: 8197
        device_class: running
      - name: "Elettrovalvola P0.2 [Q7]"
        hub: logoCT
        slave: 1
        coil: 8198
        device_class: running
      - name: "Override modo operativo STD [Q8]"
        hub: logoCT
        slave: 1
        coil: 8199
        device_class: update

One other draw back is that when this error occurs, also Nabu casa stop working. As soon as I commented the above, everything get back to work…

Any help will be highly appreciated

Good morning, I’m new to the subject of home assistant. I have a logo8! working for three years to turn on the different groups of garden lights (11 groups) with different scenes as needed. I want to use home assistant as a “SCADA” system.

In my attempts to integrate LOGO, I have activated the modbus server in logo, opening the port in the router, fixed the IP of both home assistant and LOGO, ect…

I have copied, adapted and reset 1000 times, but I cannot find the instances of the state of the plc outputs to use them in HA.

I am new with HA, and excuse me with the translation of this text.

How did you go with the buttons? Did you try them?
I’m about to connect my logo8 to HA and was thinking buttons would be a good solution.

Hi Javier,

Home assistant does not find the logo automatically.

There are 2 ways to communicate with the logo in HA, manually create switches via configuration.yaml and via Node Red.
I use modbus settings in configuration.yaml and soms minor changes in de logo program (adding network inputs).
Look at the post of Scanafos Luca in april 2020. This explaines a lot on how to configurate your configuration.yaml and useing the correct modbus addres.

Anyone fit here on adding my Logo8 into the system? I am using it as heating and lights control.

I have it already in homeassistant but I have some questions on how to read the status of (q)

How to set a value (heating temperature)

Beside that I need to know how to add a usb stick (Zigbee-Somfy shutters)

Please ping me on PN if you are able to help, I will share the outcome later in the community

I have done the things that scanafos lucas has put, and I still cannot access the status of the logo outputs from home assistant. Could it be that the version of logosoft that I have is 8.1?

I have defined server modbus in logosoft, I have enabled coils Q1 and Q2 within modbus communications but I cannot access them from ha. there is no mention of them.

Thanks for answering!

Hi Javier,

I first checked my modbus settings through an external program such as (Modbus Master Simulator - free software utility for testing Modbus slave devices). You can use this to read out your modbus. If you find that it works and you can read the data from your Logo then you are already halfway there.
The next step is to get it running on HA. Try to check if your modbus is working with the external program.

Keep me posted.

I can read the status of the Q1 output from the application that you have given me…

I can’t access Q1, Q2 and Q3 from home assistant. the modbus outputs if I have them in the tcp connection.

The modbus structure changed recently your code should be as followed (see Modbus - Home Assistant (home-assistant.io)) :

modbus:
  - type: tcp
    host: 192.168.15.100
    port: 502
    name: logo8
    binary_sensor:
      - name: Q1
        scan_interval: 1
        slave: 1
        address: 8192
        device_class: light
      - name: Q2
        scan_interval: 1
        slave: 1
        address: 8193
        device_class: light
      - name: Q3
        scan_interval: 1
        slave: 1
        address: 8194
        device_class: light
1 Like

Configuration error

modbus:
  - type: tcp
    host: 192.168.15.100
    port: 502
    name: logo8
    binary_sensors:
      - name: Q1
        scan_interval: 1
        slave: 1
        address: 8192
        device_class: light
      - name: Q2
        scan_interval: 1
        slave: 1
        address: 8193
        device_class: light
      - name: Q3
        scan_interval: 1
        slave: 1
        address: 8194
        device_class: light

forgot the “s” of binary_sensors, should work now

Ok, all right.

Thank you very much!