About This File
This VD is a interface to the ping_shelly.lua which can also be found here. The IP-address needs to be configured as shown in the image. The port value ("109") is used/misused to set the number of the lua script in your HC2 ("_lua").
As example here the code for the "on" button:
local _self=fibaro:getSelfId()
local _addr=fibaro:getValue(_self,"IPAddress")
local _lua=fibaro:getValue(_self,\"TCPPort\")
fibaro:startScene(_lua,{_addr,"on"})
fibaro:sleep(1000)
fibaro:startScene(_lua,{_addr})
fibaro:sleep(1000)
local _slider = tonumber(fibaro:getGlobalValue("S" .. string.gsub(_addr,"%.","_")))
if (_slider <= 0)
then
_slider=10
fibaro:startScene(_lua,{_addr,_slider})
end
fibaro:call(_self,"setProperty","ui.brightness.value",_slider)
Edited by Theo

Recommended Comments
There are no comments to display.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.