This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Modbus TCP disable from sript
#1
Hello!

Is it possible to disable/enable all the Modbus/TCP communications (confiured via profiles) with some piece of code?
Reply
#2
You can possibly stop the Modbus daemon altogether but this will also disable any RTU1 devices. What is the use case for this?
Reply
#3
(15.12.2025, 11:35)admin Wrote: You can possibly stop the Modbus daemon altogether but this will also disable any RTU1 devices. What is the use case for this?

It's ok to disable RTU also, no RTU devices are used.

The use case is following:
There's a communication between Lutron thermostats and climate machines (Lutron -> iRidi -> KNX -> LM -> machines via Modbus/TCP). When I dowload the Lutron project, all the setpoints go to the default value. This values are being sent to the machines, and I don't want it to happen, so I need a script to run on the LM before I start a Lutron tranfer, and another one to bring it all back to work afterwards.
Reply
#4
Then you can use this event script attached to a binary object:
Code:
os.execute('sh /lib/genohm-scada/plugins/modbus/stop.sh')

if event.getvalue() then
  os.sleep(1)
  os.execute('sh /lib/genohm-scada/plugins/modbus/start.sh')
end
Reply


Forum Jump: