Hello,
big thank for the script in this thread wich work for rtu and gateway check:
https://forum.logicmachine.net/showthrea...6#pid19306
I created another one for all of them:
In order to see the active status !
It works, but my problem is that with tcp modbus (through a smartlink in tcp/ip modbus). When I setup a powertag for exemple, when the powertag is offline, we have error in modbus error table, but the device don't become inactive, it still active (I think because the smartlink still respond). You can easily test by putting a wrong slave adress ! My device still stay active !
So I can only easily have the smartlink defaut but not the slave device (powertag radio), or I need to put a script to check modbus table error (but my problem is that the customer want only one error (not every time the modbus error table display it). So for 150 device it's a little bit Power consumer...
do you have solution ?
Here screenshot:
Here the result:
edit: I don't put the right device on the last screenshot, but it the same for the 24
regards
big thank for the script in this thread wich work for rtu and gateway check:
https://forum.logicmachine.net/showthrea...6#pid19306
I created another one for all of them:
Code:
function checkAllModbus(resultCheckTemp)
local retour_modbus = ''
local res = db:getall('SELECT name FROM modbus_devices WHERE active=?', 0)
if res then
for _, liste_modbus in ipairs(res) do
local nomFamille = nomVersFamille(liste_modbus.name)
retour_modbus=retour_modbus .. '[' ..nomFamille ..']'
end
end
--log( retour_modbus)
return retour_modbus
end
-----------------
In order to see the active status !
It works, but my problem is that with tcp modbus (through a smartlink in tcp/ip modbus). When I setup a powertag for exemple, when the powertag is offline, we have error in modbus error table, but the device don't become inactive, it still active (I think because the smartlink still respond). You can easily test by putting a wrong slave adress ! My device still stay active !
So I can only easily have the smartlink defaut but not the slave device (powertag radio), or I need to put a script to check modbus table error (but my problem is that the customer want only one error (not every time the modbus error table display it). So for 150 device it's a little bit Power consumer...
do you have solution ?
Here screenshot:
Here the result:
edit: I don't put the right device on the last screenshot, but it the same for the 24
regards
-----------
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT
FRANCE SMARTHOME & SMARTBUILDING INTEGRATION
SE ECO EXPERT