Questions tagged [web-sockets]

For questions about the WebSocket protocol, as defined by the W3C. Do not use this tag for questions regarding normal TCP sockets - consider using [sockets] instead.

For questions about WebSockets, a web API defined by the W3C for communication analogous to TCP sockets on the web.

Various IoT applications use WebSockets, such as MQTT, which supports WebSocket-based connections.

17 questions
12
votes
3 answers

Should I use Mosquitto's web sockets or connect clients directly?

According to this blog, Mosquitto (the MQTT broker) now supports connecting to clients over web sockets. The blog article seems to hint that web sockets are more useful for browser applications, since web browsers don't support proper TCP sockets…
Aurora0001
  • 18,520
  • 13
  • 55
  • 169
10
votes
4 answers

How to enable WebSockets on Mosquitto running on Windows?

I have a Mosquitto broker up and running on my Windows machine. I don't remember if I installed it with Web Sockets support (Cause I didn't knew what that was, or if I needed it). But seeing now my requirement is to use JavaScript (Paho) to connect…
Salim Shamim
  • 753
  • 1
  • 5
  • 15
6
votes
1 answer

Securing first connection of non provisioned IoT device

Assumptions The IoT Device is actually a software installable on supported operating system, e.g. Windows or Linux. Lets named it Software-Device. The Software-Device is available to download by signed-up customers. Customers can manage fleet of…
Przemek
  • 61
  • 1
5
votes
0 answers

Websockets with Mongoose on ESP-IDF

I'm trying to use the websocket_chat_client example on ESP-IDF platform but the value of status on MG_EV_CONNECT event is always -1, which is a Connection error. What I've done so far is I took the esp32-idf example, merged it with the…
haxpanel
  • 303
  • 1
  • 6
5
votes
1 answer

Network type for streaming from RPi to several ESP8266 modules

I would like to host a web page from a RPi that has websocket controls that update in 'real time' such as a slider that transmits its value as you move it. I then want to broadcast the values to several ESP8266 modules (~10) running Arduino via…
user6397
  • 53
  • 3
3
votes
1 answer

Real-time web-app for IOT devices

Goal I'm currently building a web application to control multiple IOT devices over the cellular network. Given the nature of the devices (working off battery power and operating in constrained network environments) I have chosen HiveMQ as the means…
Edmond.D
  • 31
  • 1
3
votes
1 answer

How to send continuous data from a few ESP8266 to a webserver?

I am new to ESP8266 boards and IoT programming and I don't know how to describe better what I want to do without a picture. Question: How to send continuous data from 4 esp8266 WiFi clients to a webpage or to an application which handles all of…
NumLock
  • 33
  • 4
3
votes
2 answers

Pushing Processed data from RFID + Sensors to a Platform

I have some sensor nodes (Bosch XDKs) that send information to an MQTT broker and an application reads the information and stores it into InfluxDB. Simultaneously, I have RFID readers that scan some tags and send the information to a MongoDB. Based…
Shan-Desai
  • 1,558
  • 10
  • 23
3
votes
1 answer

Connect Webpage to AWS IoT to Publish Messages

I want to create an IoT system. My system contains a robotic arm, a CNC machine and a web page. I want to use MQTT in which I can publish from my web page to robotic arm to pick up the object and put it on the table of the CNC machine. My problem…
Balsam Qassem
  • 693
  • 4
  • 11
2
votes
2 answers

How to connect several sensor boxes (ESP32) via WIFI/webserver/...?

I'm intending to create some (like 5-10) boxes with sensors and/or relays inside using ESP32's. For connection to a laptop and mobile phone I found a tutorial at ESP32 WebSocket Server: Control Outputs (Arduino IDE) which uses an async webserver…
2
votes
1 answer

What is the technical difference between MQTT and MQTT over web socket that allows the later to be preferred choice by web browser apps?

I am new to this IoT protocol area. My understanding is that MQTT is a lightweight messaging protocol for IOT devices. MQTT over web socket involves use of HTTP to UPGRADE the connection to use web socket. Otherwise they follow same protocol for…
variable
  • 123
  • 4
2
votes
0 answers

MQTT implementation recommendation for an IoT device

I have used HTTP/s based REST API for IoT application and it works well but consumes more data bandwidth and power. Also, the server resources consumed are too high for the long polling-based method. For the above reasons, I am planning to skip the…
Alan
  • 21
  • 1
1
vote
1 answer

Connect to Mqtt over websockets

I'm trying to connect on a broker with the following script #!/user/bin/env python import paho.mqtt.client as mqtt import random import requests import warnings import LoggingManager logger = LoggingManager.log_setup() logger.info("Start…
sstavridis
  • 13
  • 5
1
vote
0 answers

Creating a Non Blocking socket for making GET requests

I am using an ESP32 with a MicroPython Firmware and want to make asynchronous HTTP requests such as GET request. I have tried using usocket but it did kept throwing OSError 128. I have attached my code for the socket below. I am hoping for a…
1
vote
0 answers

Why is Mosquitto broker and Paho client running CPU 100% on connection?

I would like to use the mosquitto MQTT broker using Websockets. I am running mosquitto version 1.6.2 on a Debian 8 server. "normal" MQTT works fine, but I am having a problem trying to connect using websocket. I am using paho javascript client both…
d2key
  • 11
  • 2
1
2