I just reinstalled my pi and then I switched to all docker setup with zigbee/zwave/MTT/Domoticz.
Now I see this, what's the easiest way to merge the new found devices? Do it in domoticz or change in zigbee ?
Why did Domoticz create new devices to start with ?

-------------------------------------
I lost data for my Philips lux sensor, how can I restore it from backup db file?
I tried to use the replace command, it should be a merge command not replace as in 99% you want to keep the data.
There should be a question asking what device to keep.
Not first time I mess it upp. Confusing function.
-------------------------------------
I get this message in the loggs
Code: Select all
2025-06-01 09:36:38.889 dzVents: IKEARemote: ------ Start internal script: IKEA - Remote: Device: "IKEA Remote_toggle (Zigbee2MQTT)", Index: 468
2025-06-01 09:36:38.893 dzVents: Debug: IKEARemote: Processing device-adapter for RemoteDummyDimmer: Switch device adapter
2025-06-01 09:36:38.894 dzVents: IKEARemote: Unknown action requested; ignored
2025-06-01 09:36:38.894 dzVents: IKEARemote: ------ Finished IKEA - Remote
Code: Select all
--
-- Creater Varazir ( And big help from waaren and others on domotiz forum )
-- e-mail: varazir .. gmail.com
-- Version: 1.5
--
-- groups = {'group1', 'group2', 'group3', 'group4', 'group5', 'group6', 'group7' }
return {
on = {
devices = { '*IKEA Remote*' }
},
logging = {
level = domoticz.LOG_DEBUG,
marker = "IKEARemote"
},
data = {
currentGroup = { initial = 1 }
},
execute = function(dz, item)
local function logWrite(str,level)
dz.log(tostring(str),level or dz.LOG_DEBUG)
end
control =
{
'Taklampa Sovrum',
group1 =
{
IKEAlamp = { idx = 287, toggle = true, blink = true, dimmer = true}
},
'Uttag Sovrum',
group2 =
{
IKEAOutlet = { idx = 217, toggle = true, blink = true },
},
'Rullgardin Sovrum',
group3 =
{
Blinder = { idx = 59, toggle = true, blinder = true },
},
'Taklampa Hall',
group4 =
{
IKEAlamp = { idx = 292, toggle = true, blink = true, dimmer = true },
IKEAlampGrupp = { idx = 308, toggle = true, blink = false, dimmer = true },
},
'Taklampa Datorrum',
group5 =
{
IKEAlamp = { idx = 290, toggle = true, blink = true, dimmer = true}
},
'Taklampa Vardagsrum',
group6 =
{
IKEAlamp = { idx = 304, toggle = true, blink = true, dimmer = true }
},
'TVbänk',
group7 =
{
Lamp = { idx = 42, toggle = true, blink = true},
TvGroup = { idx = 2, toggle = true, group = true}
},
'Rullgardin Vardagsrum',
group8 =
{
Blinder = { idx = 83, toggle = true, blinder = true },
},
}
local selectedGroupNumber = dz.data.currentGroup
local maxGroup = #control
local dummyDimmer = dz.devices(82)
local function doAction(action, direction)
logWrite("10 Current group number........" .. selectedGroupNumber)
selectedGroup = "group" .. selectedGroupNumber
logWrite("11 Current selected group is..." .. selectedGroup)
selectedControlGroup = control[selectedGroup]
logWrite("12 Selected Control Group is a " .. type(control[selectedGroup]))
switchSelectorGroupNumber = math.floor( selectedGroupNumber * 10)
logWrite("13 Selected switchSelectorGroupNumber " .. switchSelectorGroupNumber)
dz.devices('IKEA Remote Groups').switchSelector(switchSelectorGroupNumber).silent()
for device, attributes in pairs(selectedControlGroup) do
logWrite("20 Current device is........." .. device)
logWrite("21 Attribute type is........." .. type(attributes))
logWrite("22 IDX is...................." .. attributes["idx"])
currentIDx = attributes["idx"]
if attributes["group"] then
logWrite("24 Current Device is group......." .. dz.groups(currentIDx).name)
currentDevice = dz.groups(currentIDx)
else
logWrite("25 Current Device is device......" .. dz.devices(currentIDx).name)
currentDevice = dz.devices(currentIDx)
end
for attribute, value in pairs(attributes) do
logWrite("30 Current attribute is......" .. device)
if attribute == action then
logWrite("31 Current acction is......" .. action)
-- Blinking
if action == 'blink' then
local blinkDevice = currentDevice
local blinkLevel = currentDevice.level
-- dz.utils.dumpTable(blinkDevice)
-- dz.utils.dumpTable(attributes)
logWrite("Device " .. blinkDevice.name .. " will blink")
if blinkDevice.state == "Off" then
blinkDevice.switchOn()
blinkDevice.switchOff().afterSec(0.5)
else
blinkDevice.switchOff()
blinkDevice.switchOn().afterSec(0.5)
end
elseif action == 'dimmer' then
local dimDevice = currentDevice
local dimLevel = dimDevice.level
local delay = 0
logWrite(dimDevice.name .. " direction is " .. direction)
if direction == "stop" then
dimDevice.cancelQueuedCommands()
logWrite('Stop dimming of ' .. dimDevice.name .. ' at ' .. dimLevel ..'%')
elseif direction == 'down' then
repeat
delay = delay + 0.1
dimLevel = dimLevel - 1
logWrite('Set ' .. dimDevice.name .. ' to dimLevel '.. dimLevel .. '%, after ' .. delay .. ' seconds')
dimDevice.dimTo(dimLevel).afterSec(delay)
until dimLevel <= 0
elseif direction == 'up' then
repeat
delay = delay + 0.1
dimLevel = dimLevel + 1
logWrite('Set ' .. dimDevice.name .. ' to dimLevel '.. dimLevel .. '%, after ' .. delay .. ' seconds')
dimDevice.dimTo(dimLevel).afterSec(delay)
until dimLevel >= 100
end
elseif action == 'toggle' then
-- dz.utils.dumpTable(currentDevice)
-- dz.utils.dumpTable(attributes)
local toggleDevice = currentDevice
if attributes["group"] then
toggleDevice.toggleGroup()
else
toggleDevice.toggleSwitch()
end
end
end
end
end
end
local action = 'blink'
local direction = 'up'
if item.state == 'Click' and item.name == '$IKEA Remote Left' then
selectedGroupNumber = selectedGroupNumber - 1
if selectedGroupNumber == 0 then selectedGroupNumber = maxGroup end
dz.notify("Aktuell grupp",control[selectedGroupNumber],dz.PRIORITY_NORMAL,dz.NSS_HTTP)
elseif item.state == 'Click' and item.name == '$IKEA Remote Right' then
selectedGroupNumber = selectedGroupNumber + 1
if selectedGroupNumber > maxGroup then selectedGroupNumber = 1 end
dz.notify("Aktuell grupp",control[selectedGroupNumber],dz.PRIORITY_NORMAL,dz.NSS_HTTP)
elseif item.name == '$IKEA Remote New' then
action = 'toggle'
elseif item.state == 'Hold' and item.name == "$IKEA Remote Up" then
action = 'dimmer'
elseif item.state == 'Hold' and item.name == '$IKEA Remote Down' then
action = 'dimmer'
direction = 'down'
elseif item.state == 'Release' and item.name == '$IKEA Remote Down' or item.name == '$IKEA Remote Up' then
action = 'dimmer'
direction = 'stop'
elseif item.name == '$IKEA Remote Groups' then
selectedGroupNumber = math.floor( item.level/10 )
logWrite("00 Group selected with IKEA Remote Groups" .. selectedGroupNumber)
else
logWrite('Unknown action requested; ignored', dz.LOG_INFO )
return
end
if item.state == 'Click' or item.state == 'Release' then
logWrite('Turning off ' .. item.name)
dz.devices(item.name).switchOff().silent()
end
dz.data.currentGroup = selectedGroupNumber
doAction(action, direction)
end
}