• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Project ESP32/ESP8266 from SmartHome book

Q&A Forum › Category: Raspberry Pi › Project ESP32/ESP8266 from SmartHome book
0 Vote Up Vote Down
marcjeanvandenbril asked 2 years ago

I’m still having trouble with project 5.1 of the SmartHome book.
The sketch on ESP32 works (subject to setting the debugger to “default”).
I get the domme serial port indications on page 167 fine.
I did the Node-ED flow as shown.
The switch command on the ui page does send the ON or OFF instruction to the Node-RED page.
On this one, there is a “connecting” below test, counter and led.
Everything happens as if the pi does not communicate with the ESP32 or ESP8266.
I proofread the installation of Node-Red
The node-red-start command gives an error message
Nov 23 16:47:27 – [info] [mqtt-broker:18a0e84130afa671] Connection failed to broker: mqtt://localhost:1883
When configuring Node-RED (node-red admin init), I had the error message ;Error: EACCES: permission denied, open ‘/home/pi/.node-red/settings.js’
I guess that’s where the problem comes from.
I redid node-red admin init several times and I always get the same error message…
Can you help me ?

6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
That “connecting” message under the nodes means that Node-RED is trying to establish a connection with the broker, but is not successful.
Did you edit the MQTT nodes on Node-RED with your broker settings (username and password)?
Regards,
Sara
Regards,
Sara

0 Vote Up Vote Down
marcjeanvandenbril answered 2 years ago

Thank you for your effective follow-up,
I did it as indicated on page 104 of the book.
It is in /etc/mosquitto/passwd (in principle…)
Should it be done elsewhere?
Thanks in advance
Marc

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
Yes.
I’m not sure if you’re following the eBook linearly.
It mentions on page 170: “should have already set up the MQTT broker in previous units.”.

 

See the pictures on page 111. Notice that you need to add your broker details.

You should edit your MQTT nodes with the broker details as it is mentioned in pages 110 and 111.

Let me know if this solves your issue.
Regards,
Sara

0 Vote Up Vote Down
marcjeanvandenbril answered 2 years ago

Shame on me :-((
I had not seen (or rather not understood..) this manipulation of page 110.
Happy that you are there.
A big thanks
Marc

0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Great!
Let me know if you need further help.
regards,
Sara

0 Vote Up Vote Down
marcjeanvandenbril answered 2 years ago

Not at the moment, but I will upgrade to project 5.3
See you soon then…
Marc

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.