Sliding Gate and Blinds

Moderator: leecollings

Post Reply
lukkulis
Posts: 3
Joined: Tuesday 14 June 2022 0:46
Target OS: Linux
Domoticz version:
Contact:

Sliding Gate and Blinds

Post by lukkulis »

Hello
I would like to manage sliding gate with domoticz.
I'm going to use Blinds + Stop switch for it.
So far I configured open + stop + open buttons with mqtt messages.
My question is:
How can I add addition icons to the switch/widget which would represent current state of the gate (opening, closing, stopped, opened, closed) ?
I'm going to feed icons status by mqtt messages.
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sliding Gate and Blinds

Post by waltervl »

You cannot have additional icons. You can change the icons to custom icons (not sure it works for Blinds), see wiki
https://www.domoticz.com/wiki/Custom_ic ... binterface
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
psubiaco
Posts: 222
Joined: Monday 20 August 2018 9:38
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Italy
Contact:

Re: Sliding Gate and Blinds

Post by psubiaco »

You can have the "blind" device to open/close/stop gate, ok, but to know the real state of the gate you must have a domotic module with two inputs connected to the limit switches (so, another 2 switch devices in Domoticz), and a simple script updating anoter "TEXT device", on Domoticz, writing the current state based on limit switch state and "blind" device state.
If you need some help to do that, I can write a simple LUA script so you can try!
Paolo
--
I use DomBus modules to charge EV car, get a full alarm system, control heat pump, fire alarm detection, lights and much more. Video
Facebook page - Youtube channel
lukkulis
Posts: 3
Joined: Tuesday 14 June 2022 0:46
Target OS: Linux
Domoticz version:
Contact:

Re: Sliding Gate and Blinds

Post by lukkulis »

Hi.
I know how to solve my issue partially.
I can use 2 switches.:
1. Blinds + Stop switch which will be dedicated for open, close and stop sliding gate.
Requesting all 3 orders by blockly scripts and mqtt messages.
2. Selector switch dedicated for gate monitoring.
Switch will contain 5 "levels" -> opening, closing,opened,closed, stopped.
"Level" will be changed by the blockly scripts which will read messages from mqtt.
My question is:
Is it possible to concatenate 2 mentioned switches into the one ?
User avatar
FireWizard
Posts: 1905
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Sliding Gate and Blinds

Post by FireWizard »

Hello @lukkulis

I do not know, what @waltervl means with:
You cannot have additional icons. You can change the icons to custom icons (not sure it works for Blinds), see wiki
This suggests that you can replace the standard icons for custom made icons.

This is not true.

You can create custom icons and these can be added to the default available icons.
In some cases you can change these icons "on the fly". I did not test it with a blinds device.
I use it only with a text device for my garbage calendar.

This requires a two step process.

1. Create your custom icon
- Draw it yourself.
- Copy from the internet (mind the copyrights)

Create the ZIP file. See https://www.domoticz.com/wiki/Custom_ic ... binterface
By far the easiest way is to use the icon generator: https://domoticz-icon.aurelien-loyer.fr/

After the generation check the dimensions of the PNG file. There has been a bug in the icon generator and maybe still is, which generates icon files of
50 x 50 pixels, instead of 48 x 48 pixels. This gives a white border around the icon. You can use a graphic editor, such as the GIMP, for that.
If it happens to you, correct that in the graphics editor and recreate the ZIP file.

Upload the ZIP file. If you are successful, you will see something as below:

Screenshot_custom icons1.png
Screenshot_custom icons1.png (90.52 KiB) Viewed 884 times
If everything has been done correctly, you will see your icon and if it is possible you will find it also in the row of selectable icons.

Screenshot_custom icons2.png
Screenshot_custom icons2.png (38.57 KiB) Viewed 884 times
2. To use these icons you have to know the id of these icons.

You can find these as follows:

Code: Select all

cd <domoticz dir>
sudo sqlite3 -header domoticz.db " select id+100 id ,name from customimages"
Mostly, at least on a Raspberry Pi, your domoticz dir will be ~/domoticz.

In this case the command will give you:

Code: Select all

id|Name
101|OpenAQ
102|Buienradar
103|Buienradar
104|Solar
105|Camera
106|NAS
108|MoonPhases1NM
109|MoonPhases2WC
110|MoonPhases3FQ
111|MoonPhases4WG
112|MoonPhases5FM
113|MoonPhases6WG
114|MoonPhases7LQ
115|MoonPhases8WC
116|Button GFT
117|Button Restafval
118|Button PMD
119|Button Papier
120|Button Air_Quality
121|Button FixedLinePhone
Remember the id, you want to use.

You cannot send the id of the icon with MQTT, but you have to use HTTP.
See the WIKI: https://www.domoticz.com/wiki/Domoticz_ ... vice_types

Imagine that you want to use the Purple button (PMD), you have to give the following command:

Code: Select all

url//json.htm?type=setused&used=true&name=Afvalkalender&idx=497&switchtype=0&customimage=118
This will give you the following (in this case a text sensor) widget.

Screenshot_custom icons3.png
Screenshot_custom icons3.png (51.94 KiB) Viewed 884 times
Regards
Last edited by FireWizard on Monday 10 October 2022 15:48, edited 2 times in total.
lukkulis
Posts: 3
Joined: Tuesday 14 June 2022 0:46
Target OS: Linux
Domoticz version:
Contact:

Re: Sliding Gate and Blinds

Post by lukkulis »

Hello.
My goal was to add few more icons into the blinds switch. I would like to manage status of mentioned additioonal icons by mqtt messages.
User avatar
waltervl
Posts: 5904
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Sliding Gate and Blinds

Post by waltervl »

Alternative could be to use a selector switch and use ASCIi symbols as icons. See the following topic for an example: viewtopic.php?t=36640
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest