Hallo.
Is it possible to make portable the Domoticz application? I have a pc where I have not the administrator rights so I'd like to install a portable version of Domoticz.
@lennart49e OMG just wasted 10mn of my life unsuccessfully trying to register on https://www.domoticz.com/forum/ucp.php?mode=register because I did not pay attention to that lame CAPTCHA test #FAIL
@Cliff-Karlsson said in Is this scenario possible using domoticz?:
I have a sensor whish can output four different values depending on how the sensor is triggered, how do I send four different values to domoticz and what sensor type do I chose? I want in this example be able to light up four different lightbulbs in domoticz depending on the sensoroutput.
I have done this with my heat pump controller. I'm using dimmer and "linking" that to dummy selector what contains the states(0=off, 10=heat by water, 20=heat by room, 30=freeze protection...).
Linking is done with LUA:
--
-- Heat pump mode selector<>dimmer mapping event
--
commandArray = {}
selectorName = 'Pumppu_Mode'
selectorId = '332'
dimmerName = 'Pumppu_ModeSW2'
-- selector -> native
if(devicechanged[selectorName]) then
iDimLevel = tonumber(otherdevices_svalues[selectorName])
commandArray[dimmerName]='Set Level '..iDimLevel
end
-- native -> selector. (not triggering events this way of calling with UpdateDevice)
if (devicechanged[dimmerName]) then
if (devicechanged[dimmerName] == 'Off') then
commandArray['UpdateDevice'] = selectorId..'|0|0'
else
iCurrentDimLevel = 0
if(otherdevices[dimmerName] == 'On') then -- can be "On" or something else
iCurrentDimLevel = tonumber(otherdevices_svalues[dimmerName])
else
iCurrentDimLevel = tonumber(string.match(otherdevices[dimmerName], "Set Level: (%d+) %%"))
end
commandArray['UpdateDevice'] = selectorId..'|'..iCurrentDimLevel..'|'..iCurrentDimLevel
end
end
return commandArray
I would also want to be able to use a local variable and a global variable. Can I somehow "push" a variable from domoticz to the sensor everytime it changes?
Create a device to your sketch and use that to handle the "variable". The rest is just scripting in domoticz after that.
I have created a topic in the forum before, with tcpdump examples.
http://www.domoticz.com/forum/viewtopic.php?f=6&t=6112
But the problem is still there, hopefully soon fix.