Page 1 of 1

Retrieve variable values from Siemens LOGO! web server

Posted: Tuesday 12 April 2022 18:19
by jatitsku
Hi all!

I'm a total beginner with Domoticz, I hope this is the right subforum to ask help, since I believe I need to write a custom script for what I plan to do.

I have 3 kWh-meters with pulse outputs (1000 p/kWh) that I have connected to Siemens LOGO! PLC. I reset counters every 10 minutes and want fetch the final values. Values are stored in AM1-AM3 in PLC and I can see the values on variable page on the PLC's web server.

How can I import these values in to Domoticz?

Thanks in advance,
Jani

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Wednesday 13 April 2022 1:16
by waltervl
Domoticz has support for S0 puls ports so perhaps you can make something out of that. No need for a plc but directly read the pulses with an interface https://www.domoticz.com/wiki/S0Meter
Or search the forum for watermeter as most solutions are based on pulses.

I never heard of connecting a plc counter output with Domoticz.
If the plc website is creating a JSON,csv or xml you could use one of the http poller https://www.domoticz.com/wiki/HTTP/HTTPS_poller

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Wednesday 13 April 2022 12:51
by JackD
Perhaps you can use one of these SO interfaces, up to 5 channels, works great with Domoticz.

https://www.sossolutions.nl/5-kanaals-s ... ter-op-usb

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Wednesday 13 April 2022 21:26
by kiddigital
For your situation, getting the values from pulsemeters, using the S0 would seem easier.

But as you already have the LOGO plc, and such PLC’s can do many things as well, maybe a more generic ‘interface’ between Domoticz and this plc can open up many new use cases.

Can you show some different examples of outputs of the plc? And how would you send a signal to the plc? What type of variables can you read and write?

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Wednesday 13 April 2022 21:44
by kiddigital
Btw.. doesn’t the LOGO support modbus over tcp/ip? There is a python plugin for Domoticz that can talk modbus. Maybe that already works?

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Thursday 14 April 2022 17:34
by jatitsku
kiddigital wrote: Wednesday 13 April 2022 21:44 Btw.. doesn’t the LOGO support modbus over tcp/ip? There is a python plugin for Domoticz that can talk modbus. Maybe that already works? Image
Yes it does, I tried that first but modbus-read crashed domoticz. I upgraded to latest beta and it started working. I'm using raspbian bullseye.

Thanks to all for help.

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Thursday 14 April 2022 17:46
by kiddigital
Nice

Can you show some screenshot and info on how your setup works now? Great reference for others

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Friday 15 April 2022 18:34
by jatitsku
modbus_domoticz.PNG
modbus_domoticz.PNG (95.6 KiB) Viewed 2219 times
modbus_logo.PNG
modbus_logo.PNG (86.76 KiB) Viewed 2219 times
Screenshots of modbus settings. It works, what more can I say :D

Re: Retrieve variable values from Siemens LOGO! web server

Posted: Friday 15 April 2022 19:34
by kiddigital
Great.. thx.. and maybe a screenshot of all devices created for the LOGO?