Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
隐藏空白更改
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
文本样式
更改外观
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Timer
创建于
6年前
差异永不过期
清除
导出
分享
解释
2 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
29 行
全部复制
2 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
29 行
全部复制
return {
return {
on = {
on = {
复制
已复制
复制
已复制
--
timer = { 'every second' },
timer = { 'every second' },
devices = { 1 },
--
devices = { 1 },
httpResponses = { 'lampStatus' }
httpResponses = { 'lampStatus' }
},
},
execute = function(domoticz, item)
execute = function(domoticz, item)
domoticz.log("Hallo?")
domoticz.log("Hallo?")
local lamp = domoticz.devices(384)
local lamp = domoticz.devices(384)
复制
已复制
复制
已复制
if (item.
isDevice
) then
if (item.
isTimer
) then
domoticz.openURL({
domoticz.openURL({
url = 'http://192.168.1.149/json/state/0',
url = 'http://192.168.1.149/json/state/0',
method = 'GET',
method = 'GET',
callback = 'lampStatus'
callback = 'lampStatus'
})
})
domoticz.log("test?")
domoticz.log("test?")
elseif (item.isHTTPResponse) then
elseif (item.isHTTPResponse) then
if (item.ok) then
if (item.ok) then
local currentStatus = item.json.on
local currentStatus = item.json.on
if(currentStatus == true) then
if(currentStatus == true) then
lamp.switchOn()
lamp.switchOn()
elseif(currentStatus == false) then
elseif(currentStatus == false) then
lamp.switchOff()
lamp.switchOff()
end
end
end
end
end
end
end
end
}
}
已保存差异
原始文本
打开文件
return { on = { --timer = { 'every second' }, devices = { 1 }, httpResponses = { 'lampStatus' } }, execute = function(domoticz, item) domoticz.log("Hallo?") local lamp = domoticz.devices(384) if (item.isDevice) then domoticz.openURL({ url = 'http://192.168.1.149/json/state/0', method = 'GET', callback = 'lampStatus' }) domoticz.log("test?") elseif (item.isHTTPResponse) then if (item.ok) then local currentStatus = item.json.on if(currentStatus == true) then lamp.switchOn() elseif(currentStatus == false) then lamp.switchOff() end end end end }
更改后文本
打开文件
return { on = { timer = { 'every second' }, --devices = { 1 }, httpResponses = { 'lampStatus' } }, execute = function(domoticz, item) domoticz.log("Hallo?") local lamp = domoticz.devices(384) if (item.isTimer) then domoticz.openURL({ url = 'http://192.168.1.149/json/state/0', method = 'GET', callback = 'lampStatus' }) domoticz.log("test?") elseif (item.isHTTPResponse) then if (item.ok) then local currentStatus = item.json.on if(currentStatus == true) then lamp.switchOn() elseif(currentStatus == false) then lamp.switchOff() end end end end }
查找差异