How to connect, how to control 8888-Display by MQTT/WiFi
 
The displays model 8887-Display WiFi for Raspberry Arduino ESP and  8888-Display (RS232 RS485 ModBus) can be controlled via WiFi even in MQTT standard. 
Most of the Home Assistant hubs are based on this standard, so 8888-Display can be very convenient for showing messages and numbers (and in large!) inside any automation or domotics. 
 
Quickly summarizing, 8888-Display can be controlled via: 
- Serial RS232  
- WiFi/HTTP, home assistant, Hub,domotics 
- WiFi/MQTT, home assistant, Hub, domotics  
- RS485 ModBus 
 
 
 
WiFi and MQTT connection 
For MQTT you need an external WiFi connection, it is not enough to connect to the internal WiFi generated by 8888-Display, but you must connect to a WiFi that has access to an MQTT Broker; for example, you can connect to the laboratory / home / office WiFi or to the ControlHUB WiFi if its internal broker is enabled. This is done from the Settings, as explained in the quick manual for 8888
Before proceeding further, we remind you that through the WiFi connection you can also control 8888 Display in HTTP which is a simpler system (it does not require a Broker such as MQTT, just write a Command in the form of a URL in the bar in Safari, Firefox, Chrome etc.). 
In Settings and MQTT you will insert: 
- the IP or name of the server where the MQTT Broker runs (if left blank, 8888-Display will not use MQTT) 
- possibly username and password of the Broker, if needed 
8888-Display 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 8888-Display 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 8888-Display and to receive 8888-Display messages. 
For safety 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); depending on the application you may also o use external clouds or external free brokers. 
 
Response / Publication Topic 
When it responds to commands, or when it means something, 8888-Display publishes a message on the topic d8-o-name (where Name is the name given to the device a little further down in the Settings). 
You need to listen to this Topic to be able to read what 8888-Display says. 
The response / payload is a text, eg. date and time after the Command STATE was given; the other commands generate the resend of the command as a response. 
Upon power-up, as soon as it is connected to MQTT, 8888-Display issues as if it were responding to STATE. 
 
Topic of Command / Listening 
8888-Display always listens on topic d8-c-name (where Name is the name assigned to the device a little further down in the Settings). To command it, the hub, the Assistant or anyone using software or libraries for sending MQTT messages, must publish a message / payload among these on the Command Topic: 
 
{"Show":"hello guys!"}
Shows the string bellahello guys!on the display, fissa oppure facendo automaticamente uno scrolling continuativo se la lunghezza della stringa è maggiore dei caratteri disponibili sul display.
{"One":"hello world!"}
Visualizza sul display la stringa hello world!, on the display, facendo scrolling per una volta sola; poi ritorna a cosa mostrava in precedenza
{"SetTime":"1230"}
passa in modalità orologio e parte dalle 12.30 (NOTA da scrivere senza punto)
TIME oppure {"TIME"}
passa in modalità orologio e mostra sullo schermo l'ora corrente (ricordiamo che nelle impostazioni si può settare di modo che si sincronizzi con un pool di orologi atomici via Internet)
{"Brightness":100}
setta la luminosità a 100 (valori disponibili in genere da 1 a 100)
{"Speed":20}
setta la velocità dello scrolling in centesimi di secondo
STATE oppure {"STATE"}
restituisce data e ora
 
Come noto, per MQTT è necessario un sistema locale o remoto (accessibile via Internet) che faccia il Broker; per esempio ControlHUB
Se stai facendo un'automation con 8888-Display e WiFi, se vuoi puoi semplificare, ed evitare questa necessità utilizzando anziché MQTT dei semplici comandi HTTP / Web tramite il collegamento WiFi, magari fissando dentro alle opzioni di configuration del tuo router l'IP di 8888-Display (tipicamente si fa in un menù tipo DHCP utilities; supponiamo sia 192.168.1.4); oppure usando il WiFi interno di 8888-Display senza necessitare di Internet o di un Broker (manuale collegamento e comandi WiFi/HTTP per 8888-Display...). 
 
 
8888-Display (Home) - 8888 Seriale - 8888 WiFi/Http - 8888 WiFi/MQTT -  8888 ModBus - forum 8888 - contact us... 
 
 
Here are the quick manuals for some other products: 
- connection and control manual, WiFi HTTP and MQTT for DoorOpen/DoorSwitch 
- connection and control manual, WiFi HTTP and MQTT for QueueNumber and MultiQueue 
- connection and control manual, WiFi HTTP and MQTT for Orologio/SuperClock 
- connection and control manual, WiFi HTTP and MQTT for TXtemp, TXdata, TXsoil 
 
- connection and control manual, Serial RS232 for 8888-Display (ModBus WiFi HTTP MQTT) 
- connection and control manual, ModBus for 8888-Display (RS485 ModBus WiFi HTTP MQTT) 
- connection and control manual, WiFi/HTTP for 8888-Display (ModBus WiFi HTTP MQTT) 
- connection and control manual, WiFi/MQTT for 8888-Display (ModBus WiFi HTTP MQTT) 
 
- manual with data format for data sent by HTTP for RXTXeasy 
- manual with data format for data sent by HTTP for ModBusEasy 
 
Home page - WFeasy Hardware Solutions Home - Hardware by VisualVision 
VV Automazione Domotica MQTT 
(C) 2022 VisualVision