Using the JavaScript MQTT Websockets Client - (Step by Step Example)
Web Browsers can use the http and websockets protocols but not MQTT.
To be able to publish and subscribe to an MQTT broker with a browser you will need to use a MQTT over websockets JavaSript client.
This is the first of a short series of videos covering the MQTT Javascript client and in it we will use a very simple Script to Publish and receive messages over MQTT and websockets.
I will take you through this script step by step and explain the important elements of the script.
The script pulls in the MQTT over websockets script from the Internet but you can also download the script and install it locally.
We start with a simple script that published data and then expand this script to subscribe and receive data over MQTT.
We examine the broker side and observe the client connecting ,subscribing and publishing.
Messages are logged to the console and I show you how to view these messages in Firefox using devrloper tools.
There is a warning about using the document.wite() function in the script to try and display messages.
It doesn't work so don't do it.
Tutorial on website
http://www.steves-internet-guide.com/using-javascript-mqtt-client-websockets/
Other videos
MQTT over Websockets explained
https://youtu.be/EvUI4vRhF88
Using the JavaScript MQTT client- Example2
https://youtu.be/_6_5ubPfm8U
You can download the scripts here
http://www.steves-internet-guide.com/download/websockets-ssl-video-scripts/
Have a question Use the comments or if you want help then use
http://www.steves-internet-guide.com/ask-steve/
If you find these videos useful then you might want to consider buying me a coffee
https://www.paypal.me/StepenCope
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Using the JavaScript MQTT Websockets Client - (Step by Step Example)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.