Home Automation With NodeMCU, HomeAssistant & MQTT

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

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

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

    Thank you very much!!

  • @ElectroCoderEC
    @ElectroCoderEC 4 года назад +2

    Nice video!, thanks. I get ok connection from serial port Window - MQTT - OK
    Motion - MQTT - OK
    Light - MQTT - OK
    Photores - MQTT - OK
    but all cards appear like unknown and i push bulb to turn on and off i cant get any message from serial port... why?

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

      Did you install MQTT broker? In new versions you need to add broker manually or with addons. Wait few more days and I'll release new video about it.

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

      @@1BarConnection yeah of course, i add mosquitto with addons. I dont know what i should do

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

      Check addons broker configuration in Home Assistant. Maybe there is username and password generated for it, and add username and password to c++ code for connection to broker (after broker port 1883).

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

      @@1BarConnection GREAT!!! you were right. It was because of wrong credentia!s. Thanks a lot :D

    • @1BarConnection
      @1BarConnection  4 года назад +2

      Glad to hear that. Have fun with Home Assistant. ;)

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

    Nice , u are awesome

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

    Hi @1BarConmection, Thank you for the such an amazing video on connecting home assistant to nodemcu. Is there anyway we can make it work with iot, that is instead of connecting it to local server, can we connect it to an AWS iot core and control it from anywhere in the work. Please let me know if that is possible.

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

      Its possibly and thats how many of the branded devices work.

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

    hai, I connect mcu with relay when i switch ON through H A Relay was OFF and when I ON through H A it was showing OFF history logs also showing OFF kindly provide a good solution

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

    Hmmm , i copied the ymal file and replaced my yaml and then used the ino to program the nodemcu. The serial port monitor reports the mqtt connected but the HA screen does not show any icons like your display, and reports mqtt, mqtt.light, mqtt.sensor components and platforms could not be set up. I am running a Pi3 ,HassOS 2.12 & Home Assistant 0.101.3

    • @1BarConnection
      @1BarConnection  4 года назад

      Hi Larry. Did you edit UI config for HomeAssistant? Also you need to stop and start HomeAssistant again after you have changed yaml file. github.com/1BarConnection/nodemcu_smart_home/blob/master/raw_config_editor_UI.txt

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

    Hello, i have problemm attempting MQtt conection failed

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

      i use esp32 with nodemcu32 its okey?

    • @1BarConnection
      @1BarConnection  4 года назад

      Yeah. That shouldn't be a problem. ESP32 is also "stronger" than 8266.

    • @1BarConnection
      @1BarConnection  4 года назад

      One more thing. I was using old version of home assistant here. With new versions, I found out that if you have option to use addons create MQTT broker with addons. If you can't use addons (e.g. if you installed home assistant core) install MQTT broker manually on your computer where you installed that home assistant (e.g. check out mosquitto broker).

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

      @@1BarConnection can you make a video on this.... i have mosquitoo borker installed in HA ....

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

    why did you not add mqtt ip address in yaml file?

    • @1BarConnection
      @1BarConnection  4 года назад

      Hi. As you can see in yaml file, for broker configuration I wrote just one line, and that is "mqtt:". This is called embedded broker and it is now deprecated. If you write just "mqtt:" without any parameter like IP or port, it will look at default broker settings. IP will be 127.0.0.1 (localhost), port will be: 1883, and so on. Too see more info about that, take a look here: www.home-assistant.io/docs/mqtt/broker/

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

      @@1BarConnection when i add configuration in yaml file it gives error

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

      The following integrations and platforms could not be set up:
      port
      broker
      mqtt
      mqtt.sensor
      mqtt.light
      Please check your config.

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

      please help about it

    • @1BarConnection
      @1BarConnection  4 года назад

      Hi @@yasirali9190, I currently don't have access to PC on which this HomeAssistant is installed so I'm not able to test this. Please check your configuration paths and files in HomeAssistant folder. On which OS are you running HomeAssistant?

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

    I cant get ip adress for home assistant why?

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

      Try to add broker IP like this (but use your device IP) in configuration.yaml:
      # MQTT broker
      mqtt:
      broker: 10.0.2.15
      Please be careful when editing configuration because it is space sensitive (broker shoud be 2 spaces from start of the line). Also when changing and saving configuration, stop and start HomeAssistant again. Check that you are using the right IP address (IP of device you installed HomeAssistant on) and port 8123. If that is not the case, maybe with the new HomeAssistant versions they changed some rules in configuration. Try to use HomeAssistant version 0.98.3. This is the one I'm using in this video and I have no errors.

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

      @@1BarConnection
      could you make another video that says everything?

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

      @@1BarConnection
      Do you need a static ip adress for these operations?

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

      @@muhammetalibaygin2391 Ok, I will put that on my list and create some video about setting up Home Assistant.

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

      ​@@muhammetalibaygin2391 It is not needed, but it is better to use static IP. You can set static IP on your PC easy. Just watch that IP address is free.