Page 1 of 1
mqtt : "stop" value implemented for blinds
Posted: Sunday 26 August 2018 7:40
by mrelfire
Is it possible to have the "Stop" value implemented to allow blinds to be manipulated with mqtt ?
example :
Code: Select all
2018-08-25 10:11:19.678 MQTT: Topic: domoticz/in, Message: {"command":"switchlight","idx":149,"switchcmd":"Stop"}
today we have this error
Code: Select all
2018-08-25 10:11:19.678 Error: MQTT: Invalid data received!
so we have the same command either in http or mqtt ?
thanks in advance
Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 02 September 2018 10:31
by mrelfire
I have proposed" if it is possibl"e to had the "stop" value , but perhaps people can have some other suggestions ?
@developpers => is it complicated ? feasible ?
thans in advance

Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 02 September 2018 12:30
by ben53252642
You could achieve stop using levels via MQTT (although I agree with your proposal).
viewtopic.php?f=68&t=23607&start=20#p188171
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).
Is there a level number for the stop?
Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 02 September 2018 19:12
by mrelfire
unfortunately no.
"We" need a "stop" implementation

Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 02 September 2018 19:50
by ben53252642
mrelfire wrote: ↑Sunday 02 September 2018 19:12
unfortunately no.
"We" need a "stop" implementation
If you really need it, you can indeed do it via levels.
Create a selector switch then map it using Lua to stop the blind, control the selector switch via MQTT.
Not the easiest way I know but it would work.
Re: mqtt : "stop" value implemented for blinds
Posted: Monday 03 September 2018 8:20
by mrelfire
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
not clean but in waiting as you sayed
Re: mqtt : "stop" value implemented for blinds
Posted: Wednesday 10 October 2018 13:33
by mrelfire
perhaps it is a bug, no clues => should I move it to the bug forum ?
any suggestions ?
Re: mqtt : "stop" value implemented for blinds
Posted: Wednesday 10 October 2018 13:36
by jvdz
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.
Jos
Re: mqtt : "stop" value implemented for blinds
Posted: Wednesday 10 October 2018 17:25
by mrelfire
unfortunately "Toggle" or "Set Level" doesn't stop a blind up or down
so perhaps you are right, "we" need some code

Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 09 December 2018 8:13
by mrelfire
Is it a bug ? => do I have to do a request on github please ?
Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 09 December 2018 8:25
by waaren
mrelfire wrote: ↑Sunday 09 December 2018 8:13
Is it a bug ? => do I have to do a request on github please ?
I have setup something like what you need with the use of one domoticz uservariable and a dzVents script. Would that help you ?
Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 09 December 2018 9:04
by mrelfire
would you mind to give me the link so I can test it please ?
Re: mqtt : "stop" value implemented for blinds
Posted: Sunday 09 December 2018 13:47
by waaren
mrelfire wrote: ↑Sunday 09 December 2018 9:04
would you mind to give me the link so I can test it please ?
This should do it.
Code: Select all
--[[ 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
}
Re: mqtt : "stop" value implemented for blinds
Posted: Saturday 02 February 2019 10:47
by mrelfire
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