Each message can be published with one of three quality of service levels (QoS). These levels are associated with different guarantees. A message send with level 0 doesn’t have a guarantee at all, it implies fire and forget. Level 1 guarantees that the message will at least arrive once, but can arrive more than once. Level 2 is the most sophisticated choice, which guarantees that the message arrives at the destination exactly once. The choice of QoS is a trade-off, between protocol overhead and the guarantee that the message arrives, because ensuring QoS 2 is using more bandwidth than QoS 0.
I am testing controlling a gate (open/close) with Home Assistant and a Sonoff/Tasmota in an industrial environment in a large industry.
I use a MQTT switch with a button on the front end, no physical switch. Tasmota is configured to turn on the relay for 1,5 sec every time the button is pressed.
Our WiFi coverage reaches the whole industry (around 50 access points to give an idea of size) and there will be like 15 people who will be authorized to command the gate. Most of them are older managers from a generation that doesn’t feel very comfortable operating a smartphone.
So there is a safety concern here, I fear they may inadvertently click on the shortcut and command open/close the gate without being close to it when operating their smartphones with other purposes in mind.
I plan to use a BLE beacon to increase security, thus demanding the user to be close to the gate, but what I would like to do immediately is to setup an ON-DELAY timer somewhere (Tasmota or MQTT Switch or automation) that would force the user to keep the button pressed for a given time before the command is issued.
Something like a long press that tasmota already has, but on a virtual button on the front end. Is that possible?