mqtt domoticz/in with blinds percentage

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
bend94
Posts: 12
Joined: Wednesday 01 June 2016 22:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

mqtt domoticz/in with blinds percentage

Post by bend94 »

Hi,

Hope everything is good for you !
Just a question, i have blinds percentage devices.
How to update the level with a mqtt publish command ?
i tried that to open my blind to 35%
sudo mosquitto_pub -h localhost -m '{ "idx" : "35", "Set Level" : "35" }' -t "domoticz/in"
but i catch this error in domoticz

Error: MQTT: Invalid data received!
please help
Thx
User avatar
FireWizard
Posts: 1895
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by FireWizard »

Hi,

I assume you want to send the "Set Level" as a string to Domoticz.

Change

Code: Select all

sudo mosquitto_pub -h localhost -m '{ "idx" : "35", "Set Level" : "35" }' -t "domoticz/in"
into:

Code: Select all

sudo mosquitto_pub -h localhost -m '{ "idx" : "35", "svalue" : "35" }' -t "domoticz/in"
Regards
bend94
Posts: 12
Joined: Wednesday 01 June 2016 22:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by bend94 »

hi FireWizard
Thanks for your reply
in fact this is not a string, as it is a Blind percentage, see below , i want to update the level with MQTT (10%, 20%,...)
BlindPercentage.PNG
BlindPercentage.PNG (15.3 KiB) Viewed 899 times
Thanks for your help
Regards
User avatar
FireWizard
Posts: 1895
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by FireWizard »

Hi,

Is the selector switch an option?

To trigger it, see: https://www.domoticz.com/forum/viewtopic.php?t=20906 (last post)

Regards
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by waaren »

bend94 wrote: Monday 06 April 2020 16:18 in fact this is not a string, as it is a Blind percentage, see below , i want to update the level with MQTT (10%, 20%,...)
mosquitto_pub -m '{"command" : "switchlight", "idx": 35, "switchcmd": "Set Level" , "level": 35 }' -t domoticz/in
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
bend94
Posts: 12
Joined: Wednesday 01 June 2016 22:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by bend94 »

hi
thanks for your help
it is ok now with that command
just one additionnal info (in case someone is looking for the same cmd)


sudo mosquitto_pub -h localhost -m '{"command": "switchlight","idx": 35,"switchcmd": "Set Level","level" : 1 }' -t "domoticz/in"

level seems to be between 0 and 15, that is to say 0 = 0% and 15 = 100%

best regards
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: mqtt domoticz/in with blinds percentage

Post by waaren »

bend94 wrote:hi
thanks for your help
it is ok now with that command
just one additionnal info (in case someone is looking for the same cmd)


sudo mosquitto_pub -h localhost -m '{"command": "switchlight","idx": 35,"switchcmd": "Set Level","level" : 1 }' -t "domoticz/in"

level seems to be between 0 and 15, that is to say 0 = 0% and 15 = 100%

best regards
I tested this on a blind percentage device and there it is a one to one relation. So sending 65 results in the blind to be set at 65%.


Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk

Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest