💬 Building a WiFi Gateway using ESP8266
-
This thread contains comments for the article "Building a WiFi Gateway using ESP8266" posted on MySensors.org.
-
Uploaded this sktech to a NodeMcu yesterday, i can add it in domoticz. When i try to add a light sensor, it shows up as a light sensor node in domoticz under the Mysensors lan gateway. but it does not show any device. Anyone who have an idea?
-
Cool, I downloaded it and replaced the old master brach.
Still get the same effect.
I paste my sketch here, all except the wifi part, that works. Tell me if I should include it here as well. But I feel its something in this below part that is failing on me#include <MySensors.h> //###################### LIGHT SENSOR ##################### #define CHILD_ID_LIGHT 0 #define LIGHT_SENSOR_ANALOG_PIN 0 unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds) MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL); int lastLightLevel; //######################################################### void setup() { } void presentation() { //###################### LIGHT SENSOR ##################### // Send the sketch version information to the gateway and Controller sendSketchInfo("Light Sensor", "1.0"); // Register all sensors to gateway (they will be created as child devices) present(CHILD_ID_LIGHT, S_LIGHT_LEVEL); //######################################################### } void loop() { //###################### LIGHT SENSOR ##################### int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23; Serial.println(lightLevel); if (lightLevel != lastLightLevel) { send(msg.set(lightLevel)); lastLightLevel = lightLevel; } sleep(SLEEP_TIME); //######################################################### } -
A couple of ESP-12E modules arrived in the mail last Friday and I uploaded the ESP8266 MQTT GW sketch. It worked immediately. Fantastic!
I am using a cloudserver MQTT broker on cloudmqtt.com and the OpenHab controller subscribes to that as well.Just a question... I tried to enable the LED BLINKING feature but it seems there are no free pins on the ESP-12 module. I've tried the not connected pins but whatever pin I select (0,1,3,4,9,10) this seems to stop the GW from starting. Ideas anyone?
-
A couple of ESP-12E modules arrived in the mail last Friday and I uploaded the ESP8266 MQTT GW sketch. It worked immediately. Fantastic!
I am using a cloudserver MQTT broker on cloudmqtt.com and the OpenHab controller subscribes to that as well.Just a question... I tried to enable the LED BLINKING feature but it seems there are no free pins on the ESP-12 module. I've tried the not connected pins but whatever pin I select (0,1,3,4,9,10) this seems to stop the GW from starting. Ideas anyone?
@bgunnarb great that you got it working so quickly!
Not sure which numbering scheme you are using (there are unfortunately many ways to number the ESP pins) but many of the pins have special use and are therefore hard to utilize. Some of my notes on the subject:
GPIO0, gpio2 an gpio15 are tricky but can be used if special care is taken: http://www.instructables.com/id/ESP8266-Using-GPIO0-GPIO2-as-inputs/?ALLSTEPS
gpio16 also seems special, see http://bbs.espressif.com/viewtopic.php?t=632
GPIO6-GPIO11 are typically used to interface with the flash memory ICs on most esp8266 modules, so these pins should not generally be used.
http://www.esp8266.com/wiki/doku.php?id=esp8266_gpio_pin_allocations has lots of information on the pins.Kolban's book on ESP has a nice clear and color-coded table describing which pins are "safe" to use without any hassle.
-
Please add a wiring diagram for the RFM69.
I found this:
https://forum.mysensors.org/topic/3061/solved-esp8266-gateway-with-rfm69-wdt-issues/4But I miss the CE in that post.
-
There is no CE pin on the RFM69
-
There is no CE pin on the RFM69
@korttoma
:open_mouth:
Shame on me... I am using a NRF2RFM69 adapter with a CE pin and didn't realize it has no function. -
I'm currently adding some wifi gateways at work, I was wondering:
- is ATSHA204 signing support something planned, or will it stay on soft-sign only mode?
- is IRQ support something planned too?
It's mostly to see if I need to plan to add these features on the PCB for later, or not.
Thanks!
-
@FotoFieber Did you come right with the RFM69? I also struggling to get it working and need to confirm the wiring diagram.