Connection manual and WiFi / HTTP and WiFi / MQTT commands for QueueNumber and MultiQueue
|
Via WiFi it is possible to integrate QueueNumber or MultiQueue practically in any existing automation system that uses
HTTP or
MQTT.
Most existing hubs and home assistants (including
ControlHUB) can use MQTT and/or HTTP.
So, if you have a good Assistant and you know how to configure it, you can also send the queue number by voice.
Let's first illustrate HTTP which is explained faster, and then MQTT.
WiFi connection for HTTP <<<
From your device (smartphone, PC, Mac, microcontroller) you can connect to the internal WiFi generated by
QueueNumber or
MultiQueue (therefore without the need for the Internet), or you can connect NiC / MC to the home / office / laboratory WiFi in the Settings, see
quick manual for MultiQueue or
QueueNumber.
If you connect to the home / work / shop / clinic / etc WiFi, it may be appropriate to set the NiC / MC IP in the router configuration options (typically this is done in a "DHCP utilities" type menu; let's assume it is 192.168.1.4), so that it never changes again.
WiFi/HTTP commands
The commands are very simple and you can also try them from the browser bar (eg Safari, Firefox, Chrome, Explorer).
http://wfeasy.com/c?pw=thepassword&p=1 or http://192.168.1.4/c?pw=lapassword&p=1 commands the advancement of the number (where 192.168.1.4 must be replaced by the IP assigned to QueueNumber, and where the access password must be replaced by the current password); to reset it you can go with the same line with p=w; to have only the information on the current number just do not put the p=.
QueueNumber / MultiQueue responds to the Command by returning the current number.
And the explanation is over.
WiFi connection and MQTT <<<
In Settings and MQTT you will insert:
- the IP or name of the server where the MQTT Broker runs (if left blank, QN/MQ will not use MQTT)
- possibly username and password of the Broker, if needed
QueueNumber/
MultiQueue shows besides the MQTT entry the name of the default topics used for the publication/out and the topic where to receive commands; you can specify a prefix here if you need it (some free brokers require your topics to start with for example
yourusername/feeds/ or something like that), otherwise the "prefix" boxes must be left blank.
Then click Save and
QueueNumber/
MultiQueue will connect, and after a few seconds it will start working in MQTT as well. If the connection is OK it will write OK after the word MQTT; and immediately on the same page it shows the names of the Topics to use to control
QueueNumber/
MultiQueue and to receive
QueueNumber/
MultiQueue messages (actually only one: it says the number if and when it changes, and when it turns on).
For safety, as already mentioned, we suggest using a Broker installed on your device (PC or other; you can download and install and run a Broker program such as Mosquitto even on a simple Windows PC; or you can use the
ControlHUB internal broker) but you may also use external clouds or external free brokers.
Response / publication topic
Quando risponde ai comandi, oppure quando vuol dire qualcosa,
QueueNumber oppure
MultiQueue pubblicano un messaggio sul topic
qu-o-nome (dove Nome è il nome assegnato al dispositivo un po' più in basso sempre nelle Impostazioni).
Occorre mettersi in ascolto su questo Topic per poter leggere cosa dice il dispositivo.
La risposta/payload è un testo: {"Number":01}se il numero mostrato è 01.
All'accensione, non appena collegato a MQTT,
QueueNumber oppure
MultiQueue pubblica su questo topic il suo numero.
Topic of Command / Listening
QueueNumber oppure
MultiQueue rimangono sempre in ascolto sul topic
qu-c-nome (dove Nome è il nome che assegnato al dispositivo un po' più in basso sempre nelle Impostazioni). Per comandarlo l'hub (o chiunque a mano tramite programmi di invio messaggi MQTT) deve pubblicare su tale Topic di Command un messaggio/payload tra questi:
PLUS oppure {"PLUS"}
|
fa avanzare il numero di 1
|
ZERO oppure {"ZERO"}
|
azzera il numero
|
STATE oppure {"STATE"}
|
restituisce lo stato del dispositivo ovvero il numero a cui si è arrivati per la coda
|
Come noto, per MQTT è necessario un sistema locale o remoto (accessibile via Internet) che faccia il Broker.
Here are the quick manuals for some other products:
(C) 2022 VisualVision