MQTT Publish and Subscribe Using Node Red

Поделиться
HTML-код
  • Опубликовано: 26 авг 2024

Комментарии • 51

  • @jerhansiow
    @jerhansiow 5 лет назад +2

    Hi Steve, just wanted to point out you need to put the Client ID in quotation marks in Node-RED v0.20.5. It took me almost 2 days to figure this out so I hope it helps along the way for anyone who is attempting MQTT. Cheers.

  • @davidfont2596
    @davidfont2596 3 года назад

    Well, this tutorial is two years old at the time of this message and Node-Red has changed a bit. At first, I could not find the objects that you used. After searching for "mqtt", I saw that there is "mqtt in" and "mqtt out". After the debug object was dropped, it changed to "msg.payload". That should be noted. Thank you.

  • @fin3125
    @fin3125 5 лет назад +1

    Love how simple you made the video. Everything seem to be working but I don't see anything in the debug window. I reviewed over and over all the settings. Where can I look next? I am using Node Red in Home Assistant. I never used used HA or MQTT before.

  • @boringblobking3783
    @boringblobking3783 5 лет назад

    very nice and simple, good brain

  • @ChampionCCC
    @ChampionCCC 3 года назад

    Excellent simple but clear tutorial. It summed up many questions in one go for me.
    However, can you please confirm as to where the Broker messages log is found, or how you can view the broker messages (when you shared your RPi screen output)

  • @leenvv7034
    @leenvv7034 4 года назад

    Thanks, very helpful

  • @101appsCoZa
    @101appsCoZa 4 года назад

    nice tutorial. thanks!

  • @eyadmulki
    @eyadmulki 6 лет назад

    Thank you for this tutorial

  • @robinkhn2547
    @robinkhn2547 4 года назад +1

    for some reason it only works for me if I additionally use the "mosca-in-broker"-node. Can anyone explain why? If I build it like in the video, it doesnt work for me.

  • @mandeepmails
    @mandeepmails 5 лет назад

    I’m grateful to see such an elaboration. Hats off to your knowledge and presentation skill. Undoubtedly I’m newbie into this, and exploring all I can, may be you could point me to the right place, if there’s a guide to get expertise over nodered. I’m still unable to correlate some basic stuff sometimes...my first project I’ve decided is to have complete dashboard for my room lighting controls. I’ve already bought one Nodemcu.v9 and got raspberry pi able to use gpio pins. But not over wireless MQTT.....please advise me. Thanks in advance.

    • @stevecope
      @stevecope  5 лет назад

      I would start by getting node-red to control the lights without mqtt and then once that is working introduce mqtt.
      To start with mqtt create a publish and subscribe flow and then later add the dashboard.
      does that make sense.
      rgds
      steve

    • @mandeepmails
      @mandeepmails 5 лет назад

      ​@@stevecope if you could tell what i'm doing wrong... tasmota-firmware i installed to my sonoff basic....nodered and dashboard show all connected topic is "sonoff" or "room/sonoff" to keep things simple. the true and false show clearly in node-red logs
      on syslog server listening to client mqtt subscribe messages, this is what i'm getting
      03-23-2019 06:56:32 Local7.Debug 192.168.1.4 sonoff-3065 ESP-MQT: room/tele/sonoff/STATE = {"Time":"2019-03-23T02:26:33","Uptime":"0T05:35:15","Vcc":3.432,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"OFF","Wifi":{"AP":1,"SSId":"Xiaomi_Antariksh","BSSId":"78:11:DC:17:D0:54","Channel":1,"RSSI":54}}
      what is missing. i'll appreciate any guidance

    • @stevecope
      @stevecope  5 лет назад

      Not sure of the problem can you control the switch using node-red?@@mandeepmails

    • @mandeepmails
      @mandeepmails 5 лет назад

      Steve Cope Steve thanks for replying yes I’m able to control the light 💡 on/off.
      Please answer my one question, I’m willing to open/close a gate using 2 sonoff basic devices “by making reverse connections” (willing to use single power-window motor in both directions).
      Is this doable?
      Or it may fry something....
      I’m anti-arduino so far. Single raspberry pi/mqtt server in house is making me feel more comfortable.

  • @Parvez_saifi
    @Parvez_saifi Год назад

    can anyone help me for how i can publish data from influx database to live dashboard...?

  • @jakubvala4345
    @jakubvala4345 3 года назад

    Hey Steve, why don't you use a broker from node-red such as aedes, it's easy to configure and easy to use. Or is there there some drawback?

    • @stevecope
      @stevecope  3 года назад

      I did a video on Mosca /Aedes some time ago and there is also a tutorial on the site. I recommend it for home automation. However if you need to control access through ACL's or impose message limits etc you can't use it.
      stevesnoderedguide.com/install-mosca-mqtt-broker-node-red.

  • @vishnupriyatummala801
    @vishnupriyatummala801 5 лет назад +1

    tq for the tutorial bro, how to create the server id of MQTT

    • @davidfont2596
      @davidfont2596 3 года назад

      I use an Amazon EC2 instance as a free server. Install MQTT by searching "install mqtt linux" and cut and paste the commands in whatever tutorial that you find. Once you SSH into your server, run the command "mosquitto_sub -h localhost -t sensors/#" to subscribe to the topics in this video.

  • @PatricioBE
    @PatricioBE 6 лет назад

    Hi Steve, excellent tutorial. Is the ip address you use public? It does not work in my case. Thank you

    • @stevecope
      @stevecope  6 лет назад

      The Ip address is private. You can use the public brokerstest.mosquitto.orgiot.eclipse.orgbroker.hivemq.comRgdssteve

  • @zareentabassum6958
    @zareentabassum6958 4 года назад

    Hi steve, can you please tell me how do you configure server IP? means server means any physical device IP?

  • @MrDenisJoshua
    @MrDenisJoshua 4 года назад

    Is there a node that can read a MQTT topic but a node that it can be use in the middle... a mean node that have an input and output
    Thanks a lot

    • @stevecope
      @stevecope  4 года назад

      I think you mean a node were you can program the topic then the answer is no as far as I know. I hope it is something that the may add to the default mqtt receive node in the future.

    • @MrDenisJoshua
      @MrDenisJoshua 4 года назад

      @@stevecope Thanks a lot for the answer.
      if you want here is my question explained: discourse.nodered.org/t/i-need-mqtt-node-that-have-input-and-output/28451/5

    • @stevecope
      @stevecope  4 года назад

      @@MrDenisJoshua Still not quite sure are you looking for filter topics coming from and MQTT input node?
      Rgds
      Steve

    • @MrDenisJoshua
      @MrDenisJoshua 4 года назад

      @@stevecope I was looking for a node... type of passthrough node, that can be call - > read MQTT Topic > call other node
      But I solve in other mode :-)
      Thanks again

  • @dilipkumarmn979
    @dilipkumarmn979 6 лет назад +1

    Hi Steve, Thanks for sharing the tutorial, great work!!. could you please let me know how to configure the private IP address (example like in your video 192.168.1.157). I want to communicated with ESP8266 from my windows 10 PC. I am not able to establish a connection between ESP8266 and windows PC due to IP issues. It would be great if you could support in this regard.
    Many thanks!

    • @stevecope
      @stevecope  6 лет назад +1

      The private or internal address is normally allocated by the home router and doesn't need to be configured.
      You can assign it manually by going to the connection settings

    • @stevecope
      @stevecope  4 года назад

      Hi
      This tutorial shows how to configure a static IP address on windows 10
      stevessmarthomeguide.com/setting-up-static-ip-address-windows-10/

  • @Theeltsag
    @Theeltsag 3 года назад

    If anybody can answer me, how do we know in which IP our node-red mqtt broker runs?

    • @stevecope
      @stevecope  3 года назад

      It runs on the same IP address as node-red
      Rgds
      Steve

  • @misterwilliam8877
    @misterwilliam8877 5 лет назад

    I have few questions on mqtt.
    My mqtt client is bluepill with esp 01. Pi3 as mqtt server with nodered.
    I want to control gpio out with nodered. But if i press switch in nodered there seems a delay to reach to client. Sometimes it doesn't even respond in client. Nodered switch stucks for a moment. I don't know if it is client problem or nodered problem

    • @stevecope
      @stevecope  5 лет назад

      HiGo to the website and use the ask steve page to send me the flow you are usingrgdssteve

    • @misterwilliam8877
      @misterwilliam8877 5 лет назад

      @@stevecope done

    • @mandeepmails
      @mandeepmails 5 лет назад

      Steve Cope www.amazon.in/ARMtronix-ESP8266-Eight-Nodemcu-Automation/dp/B07DKZNP81/ref=mp_s_a_1_3?ie=UTF8&qid=1551686542&sr=8-3&pi=AC_SX118_SY170_QL70&keywords=armtronix&dpPl=1&dpID=5191B1w9XlL&ref=plSrch

    • @mandeepmails
      @mandeepmails 5 лет назад

      Is there a way to find out what topics the mqttclient has subscribed to...above product has locked/soldered code that I’m unaware of and I’m not sure how to program it with new code. Thought it’d be straight forward to figure out what message mqtt publisher should send to illuminate

    • @misterwilliam8877
      @misterwilliam8877 5 лет назад

      @@mandeepmails you have to program. You could find some mqtt example for nodemcu

  • @tapiraiverde
    @tapiraiverde 3 года назад

    I would like to know how to protect with login and password the interface 1880 / ui dashboard in nodered I cannot find this information anywhere! I have the nodered installed in a VPS anybody enters and can control my automation how to solve it?

    • @stevecope
      @stevecope  3 года назад +1

      If you go to my site there is a tutorial on how to do it.
      www.steves-internet-guide.com/securing-node-red-ssl/

  • @msilaptop5952
    @msilaptop5952 2 года назад

    hello, how are you mqtt's ip address? I can only run localhost.

    • @stevecope
      @stevecope  2 года назад

      It is probable your mosquitto configuration see here
      www.steves-internet-guide.com/mosquitto-broker/

  • @abdolvakilfazli2488
    @abdolvakilfazli2488 4 года назад

    took same step but never got "open"