-
Posts
45,326 -
Joined
-
Last visited
-
Days Won
120
Content Type
Profiles
Forums
Gallery
Events
Blogs
Posts posted by Gina
-
-
I guess I could try rebooting the RPi that should reset the Node-RED Dashboard but don't know how much of the setting up I would lose.
-
Here's a copy of the Serial Monitor display. Nothing showing for the output topic but nothing has been sent from the Dashboard recently as the switch is locked on.
Quoteets Jun 8 2016 00:22:57
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
Connecting to Ubiquity
.
WiFi connected
IP address:
192.168.1.94
Attempting MQTT connection...connected
Temperature: 25.21
Humidity: 56.18
Temperature: 25.01
Humidity: 57.09
Temperature: 24.94
Humidity: 56.99
Temperature: 24.83
Humidity: 56.68
Temperature: 24.82
Humidity: 56.74 -
The current situation then is the latest ESP32/BME280 sensor unit is sending data successfully through the broker to the Node-RED Dashboard BUT the link the other way doesn't work - a switch in the Dashboard is supposed to send an "on" or "off" message to the ESP32 and light (or not) an LED - and furthermore the Output switch has got locked in the on position. MQTT Explorer shows the ESP32 output = on but whether that is what the ESP32 has received or just what has been sent, I don't know.
Has anyone any idea how I can find out what's wrong or any suggestions? TIA
-
1
-
-
-
-
Uploaded the MQTT sketch and... it works - one way. The temperature and humidity are being displayed in the Node-RED Dashboard. But the LED control is still not working. I know the LED works because I added my own version of Blink to the other sketch and the LED blinked on and off as expected.
SO--- A modicum of success!! 🙂
To be sure I was seeing what I was supposed to be seeing I touched the sensor and the temperature jumped up as expected. See the spike in the graph.
-
Think I've found it!! The BME280s I have are different from the one shown in the tutorial - SDA and SDL are reversed!!
EDIT :- Yep, that was it. BME280 now working!
-
The BME280 is not working with the older sketch so I must have wired something wrongly but I've checked everything many times and even confirmed the connections with a DMM continuity test.
-
The BME280 module works fine with the obsy ESP32.
Next I'm going to try a known working sketch instead of the MQTT one. That will test the hardware.
-
Tried connecting the ESP32 to my Mint box and running the Serial Monitor. This showed that the BME280 wasn't working. Double checked the wiring and also that the BME280 had power. Guess it could be a duff module. When it stops raining I can take it out to the ESP32 in the obsy and see it it works with that.
Doesn't explain why the LED doesn't come on though. Checked D4 and logic "0".
-
Hardware soldered onto stripboard and all connected up. Powered from bench PSU on 5v. Devices are recognised but I can't get communications.
Node-RED links showing clients connected.
This is the Node-RED Dashboard. At first I could move the Output switch from OFF to ON but it won't go back,
This seems to be saying that the ESP32 unit has received the on message but the LED isn't on.
Seems to be nearly working but not quite.
-
Sketch from the tutorial above now uploaded to one of my ESP32s. Now to connect the BME280 etc.
After a coffee break 😁
-
Hmm... The Node-RED Dashboard is a fiddly thing to set up and will need some studying but designing any specialised GUI is going to be like that. I reckon I can now see the way ahead but I think graphical displays are for the future and i need to get MQTT running first. OK so Node-RED is supposed to be a short-cut to designing the MQTT network and the links between clients but it seems a lot to learn all at once!
OTOH the ESP32 MQTT – Publish and Subscribe with Arduino IDE tutorial has an example that almost exactly matches an ESP32 sensor unit that I want to use so I'll continue and set that up and gain experience. No doubt I can then go on to modify things to suit my other sensor units.
-
The Node-RED Dashboard looks like one way of displaying my weather (and ROR) data and controlling the ROR. It could do all I want, so I shall install it.
-
Until I see the advantages of Node-RED I won't set the autostart on boot yet but start it when I want it with :-
node-red-start
or from the Programming menu.
If/when I find it useful I can make it start at boot with :-
sudo systemctl enable nodered.service sudo reboot
Does anyone here use Node-RED and how useful do you find it?
-
1
-
-
Now installing Node-RED a slow process...
Done.
Running Node-RED install for user pi at /home/pi on raspbian\n This can take 20-30 minutes on the slower Pi versions - please wait. Stop Node-RED ✔ Remove old version of Node-RED ✔ Remove old version of Node.js ✔ Install Node.js for Armv6 ✔ Node v10.22.0 Npm 6.14.7 Clean npm cache ✔ Install Node-RED core ✔ 1.1.3 Move global nodes to local - Install extra Pi nodes ✔ Npm rebuild existing nodes - Add shortcut commands ✔ Update systemd script ✔ Any errors will be logged to /var/log/nodered-install.log All done. You can now start Node-RED with the command node-red-start or using the icon under Menu / Programming / Node-RED Then point your browser to localhost:1880 or http://{your_pi_ip-address}:1880 Started Sat 15 Aug 09:06:28 BST 2020 - Finished Sat 15 Aug 09:21:48 BST 2020 rm: cannot remove '/usr/bin/update-nodejs-and-nodered': No such file or directory pi@MQTTBrokerGina:~ $
-
-
Next question is how to use it. I have it running but it only seem to show what's on the net.
-
Rebooted and it's there now. Don't usually have to do that with Linux.
-
No, I mean mqtt-explorer that you suggested above.
-
OK - I've installed it but where is it? It's not in the menu.
-
I'll look into that - thanks Wim 😀
-
This tutorial uses Node-RED installed on the RPi running the broker to provide a graphical interface on a browser. Seems reasonable for the first setup. Later I may use WeeWX but guess there's not really a limit and I could have both.
Any comments?
-
Ran the Arduino and went to Tools > Manage Libraries, searched for PubSubClient and Installed it. I already have the Adafruit_BME280 and Adafruit_Sensor libraries installed
Setting up an MQTT system for Weather Sensing and Astro Control
in DIY Astronomer
Posted · Edited by Gina
Rebooted the RPi and now the Dashboard output switch is locked in the off state. I can slide it over with the pointer but the colour doesn't change and it goes back to off. This seems to be a problem with the Node-RED Dashboard. OTOH MQTT Explorer has output = on.