Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Gina

Beyond the Event Horizon
  • Posts

    45,326
  • Joined

  • Last visited

  • Days Won

    120

Posts posted by Gina

  1. 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.

    Quote

    ets 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

     

  2. 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

    • Like 1
  3. 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.

    690629086_Screenshotfrom2020-08-1516-47-10.png.4a6ba35d745a59a6c21903d5d2ffb11c.png

  4. 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".

  5. 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.
    1043181097_Screenshotfrom2020-08-1513-23-32.png.b41d4a1825ac8777f1501b238a1e5dbf.png

    This is the Node-RED Dashboard.  At first I could move the Output switch from OFF to ON but it won't go back,
    1319023842_Screenshotfrom2020-08-1513-27-57.png.ca13cc809e555103cd881ae9c471a383.png

    This seems to be saying that the ESP32 unit has received the on message but the LED isn't on.
    1141614256_Screenshotfrom2020-08-1513-33-20.png.8fbd3a2b43eed2cf20b6ec0200b8b090.png

    Seems to be nearly working but not quite.

  6. 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.

  7. 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:~ $

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.