Hi, i’m pretty new to hass, but i see a lot of possibilities. I’ve installed hass.io on a RPI3 and everything works fine.
Now i want to communicate with a siemens Logo! 8. anyone has experience with that?
I’ve found a phyton snippit on Github to do this.
Have some Logo! controllers, have HA but still wonder, why would you need Logo beside HA ? What simple PLC can do better than full blown HomeAssistant ???
hi, thank you very much for the info. at this time, honestly, it sounds rather complicated, but i will start studying node-red i’ll keep you posted Thanks again for the feedback!
hi, thanks a thousand times for your help. i’ve documented my setup and will put it online once it works to help maybe others…unfortunately at the end i’m still blocked
i’ve installed node-red, imported the S7, made the link between logo and node-red and have a green and online logo in node-red. now i’m adapting the vm mapping to read the entries, but i’m a bit confused. how can i read the status of an output? only thin i see in the dropdown box are a lot of relay blocks. what do i miss?
Hi,
if you have a newer Logo that supports Modbus TCP you can intagrate it into HA directly. In theory that is. I am getting my Logo next week and i’ll try to integrate it using Modbus TCP and report back.
Hello, I finally received my Logos. And it is very easy to set up a modbus connection to the Logo from HA. And it is very easy to communicate via Modbus.
LOGO Setup
a) Setup LOGO as Modbus server in LOGO!Soft Control
Tools -> Ethernet Connections…
Enter IP address of your LOGO…
Right click on Etnernet Connections -> Add server connection -> Modbus Connection
Upload your program to LOGO (empty program works great!)
This will setup three switches to directly control first thee outputs on LOGO.
Note:
If you want to control the output direclty from HA you can’t use the same output in your program.
Logo has to be in RUN mode for this to work.
You can find all the Modbus Addresses in Properties (Alt+Enter), but you have to substract 1 from all the addresses. If you wan’t to control an output from program in the LOGO and HA you have to communicate via Variables and not with the Outputs directly. I have to iron out problems with the loop that is created if you use the same Varible as Network input and Network output in LOGO program.
Hi!
My answer is yes and no. Siemens Logo can be used for this purpose but in this case there is no “manual ovveride”.
In my system I have a combination of Siemens Logo and Denkovi SmartDEN IP-16R (https://denkovi.com/smartden-lan-ethernet-16-relay-module-din-rail-box). I use Denkovi for switching/toggling lights and Logo (230V version) for controlling window shades and as sensors for lights.
For lights I wanted a system that can me manualy operated even if the automation is not working (broken). And you can not achieve that with the Logo as its relays only have 2 contacts (C/NO). For this to work you have to have relays with 3 contacts (C/NC/NO).
I wired EVERY switch directly to the switchbox and instead of 1-way switches all switches in my system are 2-way or intermediate switches and a relay with 3 contacts also serves as 2-way switch. The only downside to this approach is that you need “a little” more wiring and a huge fusebox (or in my case 3 fuseboxes) that contains the controllers and all the connections. But the main advantage is that when i’ll be 99 years old and don’t want to bother with tinkering the system will still work (at least manualy) even if the controlers fail. But the problem in this system is that you can only toggle the lights (you can’t know the state of the lights). That’s why i use the Logo (230V version) as a sensor if the lights are on or off, so I can see the status in HA and tell HA to turn on or off the lights.
I have 90% of lights controlled in the above manner. 3 lights controlled with Logo (kitchen cabinet lights and toilet light) and 3 lights that are not integrated in the system (desk lamps).
But with 99% of home automations out there you can’t turn on/off the lights if the controler fails. So using just Logo is OK if you are ok with this.
With Logo (230V version) you also get the benefit of using regular 230V for control lines that are less prone to interference in the long lines that low voltage control lines.
If you do use Logo for lights control it is best that you set up the basic logic for turning on/off in the Logo itself so it still works via pushbutton if you HA is down.But in this case you have to use variables to communicate with HA.
If I use variables to communicate with HA, as you told me.
Can I read and change the current state then? So will my HA change the current state, when I use the push button?
I am working on window shades control this week. I plan to implement a solution where I can control the shades (up/down, open/close) from HA and also read the state of the shade from the Logo. Yesterday I finished the Logo program so it now works without integration with HA. I plan to work on the communication part of the Logo programm this week. I’ll be able to better answer the questions in a few days.
Right now I don’t have a good solution for “mission critical” communication between HA and Logo as HA is pooling the Logo. You need to programm the basic functionality in Logo (turning the light on/off when the button is pressed). Because when you press the button it may take a second or two (or more if you define it so) before HA is aware that you pushed the button. So it’s best that you use HA to only programm the advanced logic (remote control, time scheduled switching,…)
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)
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.
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.
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.
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.
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.