Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
mosquitto broker and web page

I'm trying to connect my local web page to a mosquito MQTT broker on mosquito explorer. I tried to use node-red with HTTPS nodes but it didn't work properly (I can receive data from the web page to the broker but I can't send it enter image description herefrom the broker to the web page). I need help.

<html>
  <head>
   <title>Envoi HTTP->NodeRed</title>
  </head>
  <body> 
    Envoi HTTP vers NodeRed 
    <form action="127.0.0.1:1880/essaiNODERED" method="get"> 
      <label for="idTemp">Temperature :</label>
      <input id="idTemp" name="temp">
      <label for="idText">Entrez un texte : </label>
      <input id="idText" name="text">
      <button type="submit">Envoyez...</button>
    </form>
  </body>
 </html> 

I can send the temperature value from this page to the MQTT broker using a simple node-red code but I can't do the opposite

this is my broker on MQTT explorer:

image1

this is the node-red flow that receives data from the web page to the broker:

image2

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The short answer is you probably don't using the approach you appear to be trying in the comment.

You have 2 choices

  1. Totally remove the HTML form and Node-RED from the system and just use the Paho JavaScript MQTT client to connect directly to the mosquitto broker (after you have configured it to support MQTT over Websockets). That way you can both publish messages and subscribe to topics directly in the webpage.

  2. If you REALLY must use Node-RED then you can use the WebSockets nodes to allow the page to connect to Node-RED and then you can send messages back to the page once they have been received in Node-RED using the MQTT nodes.

I suggest you use option 1 as it will be much simpler to get right.

This is totally based on the very minimal information you have provided. In future you must include a LOT more information in the question to start with.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda