Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.
Look at the Node-Red example for the Xiaomi button (import it).
There may be levels for the blind switch you can simply send, eg an to turn a simple on off switch on would usually be level 255 and to turn it off would usually be level 0 (can vary).
I have 15 blinds. followinf your suggestion I will have to create 15 others switches for levels , wich I map to my first 15 ids => a nightmare
now I have as script which swith for open on mqtt calls, and for off on https calls
Was my answer in this thread not sufficient? viewtopic.php?f=28&t=24600
It doesn't look like a bug but more a feature request.... which means somebody needs to have the urge to code it.
--[[ this scripts handles commmunication from MQTT to domoticz uservar
mosquitto_pub -r -t domoticz/in -m '{"command":"setuservariable","idx":61,"value":"1099"}'
change 61 to the idx of your (type string) domoticz uservariable
change 1099 to the idx of your blind
this dzVents script will pickup the variable and stop the blind
]] --
local blindStopperVariableIDX = 61
return {
on = { variables = { blindStopperVariableIDX }},
logging = { level = domoticz.LOG_DEBUG,
marker = "MQTT Blind" },
execute = function(dz, item, info )
_G.logMarker = info.scriptName -- sets the logmarker for dz.log
local function logWrite(str,level)
dz.log(str,level or dz.LOG_DEBUG)
end
blind = dz.devices(tonumber(item.value))
blind.stop()
logWrite("device " .. blind.name .. " stopped")
end
}
I am confused, how you trigger this script when you do a mqtt action, this is quite strange and confusing to make a generic to bypass a code limitation.
I manage to see your point but not a clue to implement it and make it generic