Retrieve variable values from Siemens LOGO! web server

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
jatitsku
Posts: 7
Joined: Sunday 10 April 2022 19:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Retrieve variable values from Siemens LOGO! web server

Post 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
User avatar
waltervl
Posts: 5905
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
JackD
Posts: 68
Joined: Monday 02 November 2020 20:53
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post 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
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post 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?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post 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?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
jatitsku
Posts: 7
Joined: Sunday 10 April 2022 19:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post 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.
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post by kiddigital »

Nice

Can you show some screenshot and info on how your setup works now? Great reference for others
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
jatitsku
Posts: 7
Joined: Sunday 10 April 2022 19:50
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post by jatitsku »

modbus_domoticz.PNG
modbus_domoticz.PNG (95.6 KiB) Viewed 2213 times
modbus_logo.PNG
modbus_logo.PNG (86.76 KiB) Viewed 2213 times
Screenshots of modbus settings. It works, what more can I say :D
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Retrieve variable values from Siemens LOGO! web server

Post by kiddigital »

Great.. thx.. and maybe a screenshot of all devices created for the LOGO?
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest