Hi, I posted this question also on the FB community, but with lack on response I’ll give it a try here.
I’m experimenting with HA for 2 months now. Slightly different then most of you guys do. All the lights and switched were already controlled by a Siemens 1200 PLC. I want to use HA as an extra layer on top of the PLC. I managed already to have mqtt communication. But I would like to try Modbus TCP also, it looks less complicated to me. Unfortunately I can’t get it working.
Because I’m not experienced with HA and modbus it’s hard to start debugging.
A lot of examples I found on the net are written in the old yaml syntax, this makes it even more confusing.
Can anyone push me in the right direction?
For example:
Show me how to write one bit high in the PLC with a switch or button.
on FB they advice me to use NodeRed. I definitely will give it a try, bur for now I want to work with HA only, it should work…
Offcourse I read it many times, but like I told, I don’t know how to start debugging, the plc says it’s trying to establish connection.
Maybe to start, is HA modbus a modbus master of slave?
I assumed its a master (= TCP client) and my plc is the slave (TCP server), don’t know if this is correct.
Any chance you could share a demo project or similar that I could import?
I’m trying to get Node Red also to work with a Siemens S7 300 setup here.
But I’m not able to set this all up to get the sort of “hello world” effect
Hello Ventilo,
I have tried to search youtube and other places but I’m not able to find the option you have shown here “permit access with PUT/GET” with Step7 and a CPU315-2PN/DP. I’m starting to think that the CPU does not support this option. Everything I find regarding PUT/GET for this CPU is to use Siemens standard blocks for it to read write to some DBs. And that is basically when communicating between two or more PLC’s.
So anyone who have done modbus communication in HA with a CPU315-2PN/DP?
What software do you use? Tia Portal or the older Simatic Step 7 software?
Btw: I have a working S7 communication through Node_Red in the meantime. but I’m afraid for lack of support/updates within a couple of years. That’s why I focussed on the Modbus connection. I managed to get it working since last week with Siemens 1200.
I’m using Simatic Manager STEP-7 (so the older)
My current program is very extensive and converting to TIA Portal will be a massive job and therefore I have not done that. I however (just as a test) added a CPU315-2PN/DP CPU to a new project in Tia Portal and the options for setting “permit access with PUT/GET” is not there in the place where it can be found for 1200 CPU’s.
I do not really believe that it will be possible with the above function you have linked to. Or it will be very complex when reading/writing to some DB’s only
Some years ago I used this GET/PUT function when I was transferring data between two CPU’s. It was working but everything but simple.
So it might be that I have to move on and away from HS if I’m not able to solve this issue. My PLC is basically the only place where all my data/measurements/control are and without this I have no real use for HS today.
Greetings, I’m currently unable to read coil values from the PLC to HA. However, I can write values from HA to the PLC. Is there a way to resolve this issue?"