Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide whitespace changes
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Text styles
Change appearance
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
Timer
Created
6 years ago
Diff never expires
Clear
Export
Share
Explain
2 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
29 lines
Copy
2 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
29 lines
Copy
return {
return {
on = {
on = {
Copy
Copied
Copy
Copied
--
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)
Copy
Copied
Copy
Copied
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
}
}
Saved diffs
Original text
Open file
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 }
Changed text
Open file
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 }
Find difference