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 device bus_write option modified by scipt
#3
here

Code:
searchKey='bus_write'
valueSearch='1'
oldValue='1'
newValue='0'
key='bus_write'
mytable='modbus_mapping'


if oldValue =='' then
  querySql="UPDATE "..mytable.." SET "..key.." = "..newValue.." WHERE "..searchKey.." like '%"..valueSearch.."%'"
else
    querySql="UPDATE "..mytable.." SET "..key.." = REPLACE("..key..", '"..oldValue.."', '"..newValue.."') WHERE "..searchKey.." like '%"..valueSearch.."%'" 
end

db:query(querySql)

I precise that after my script, if I go to modbus the write option is disabled on all element
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
Reply


Messages In This Thread
RE: modbus device bus_write option modified by scipt - by domotiqa - 15.11.2024, 17:18

Forum Jump: