Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. ESP8266 as (MQTT) Gateway with I2C Sensors

ESP8266 as (MQTT) Gateway with I2C Sensors

Scheduled Pinned Locked Moved Hardware
mysensors
2 Posts 2 Posters 25 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sunseeker
    wrote on last edited by
    #1

    I want to use an ESP8266 (nodemcu) as MQTT gateway but instead building a client for the same room use it as Client as well.

    However after connecting NRF24 I do not know how to connect my I2C sensors because D2 is used by the NRF already.

    I searched for it but did not find a clear or working information on this. So I really would appreciate someone can give me a working solution to build a gateway including I2C support with one chip (nodemcu, Wemos, ???).

    Staub as below but need WiFi for Gateway function tying to use a nodemcu.

    Room sensor:
    Board - Arduino Nano with Shield to provide proper power and PINs
    Radio - NRF24
    I2C - BME280 (Temp, Hum, Pres)
    I2C - tsl2561 (Lux)
    PIN - Mosfet (Nightlight with little LED)
    PIN - MH-SR602 (PIR/Motion)

    BearWithBeardB 1 Reply Last reply
    1
    • S Sunseeker

      I want to use an ESP8266 (nodemcu) as MQTT gateway but instead building a client for the same room use it as Client as well.

      However after connecting NRF24 I do not know how to connect my I2C sensors because D2 is used by the NRF already.

      I searched for it but did not find a clear or working information on this. So I really would appreciate someone can give me a working solution to build a gateway including I2C support with one chip (nodemcu, Wemos, ???).

      Staub as below but need WiFi for Gateway function tying to use a nodemcu.

      Room sensor:
      Board - Arduino Nano with Shield to provide proper power and PINs
      Radio - NRF24
      I2C - BME280 (Temp, Hum, Pres)
      I2C - tsl2561 (Lux)
      PIN - Mosfet (Nightlight with little LED)
      PIN - MH-SR602 (PIR/Motion)

      BearWithBeardB Offline
      BearWithBeardB Offline
      BearWithBeard
      wrote on last edited by
      #2

      @Sunseeker According to the Connecting the Radio page, D2 is the default pin for the CE signal for the NRF24. If you'd like to use this pin for I2C, you can free it up by assigning a different pin for the CE signal by adding this line to your sketch:

      #define MY_RF24_CE_PIN pin

      IIRC, all available pins should work for this purpose (D0, D3, D4). Just pick one and if it doesn't work, use one of the other pins. Please make sure to add that line before #include <MySensors.h>.

      1 Reply Last reply
      1
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      10

      Online

      11.7k

      Users

      11.2k

      Topics

      113.0k

      Posts


      Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • MySensors
      • OpenHardware.io
      • Categories
      • Recent
      • Tags
      • Popular