It's possible to build a WIFI enabled gateway running directly on an ESP8266 module.
The easiest build option is probably to use the NodeMcu Devkit v.10 (by the NodeMcu Team). Schematics and layout can be found here. This board has the ESP-12 module mounted. Just connect the radio, install gateway software and you're good to go.
The standard ESP8266 Gateway sketch can be used without modification (except for SSID & password).
To verify things you can connect a telnet session (e.g. putty) to the IP address mentioned in the serial output, port 5003 and send some serial commands!
Inclusion mode, is a feature which allows you to inform the controller that you want to add new devices during a short period (60 seconds default) by pressing a physical button on your gateway. Note: This function might not be supported by all the MySensors compatible controllers. To enable this feature in your gateway, set the following defines in your sketch before including MySensors.h.
// Enabled inclusion mode feature #define MY_INCLUSION_MODE_FEATURE // Enables inclusion-mode button feature on the gateway device #define MY_INCLUSION_BUTTON_FEATURE // Set which pin you have the inclusion button attached to #define MY_INCLUSION_MODE_BUTTON_PIN 3 // Set inclusion mode duration (in seconds) #define MY_INCLUSION_MODE_DURATION 60
Connect the push-button momentary-switch between GND and digital pin 3.
We support three LED feedback signals for radio activity - Read, Transmit, and Error. The Transmit LED is also used to provide visual feedback during active inclusion mode.
|Led color||Arduino Digital Pin||Function|
A good choice would be either a 2 or 3 mm green/yellow/red LEDs. You will also need 3 resistors in the range 270R-510R.
Each LED is connected by its anode (long leg) to +5V. The cathode (short leg) is connected through a resistor to one of the following digital pins of the Arduino:
To enable this feature, set the following defines in your sketch before including MySensors.h.
// Set blinking period (in milliseconds) #define MY_DEFAULT_LED_BLINK_PERIOD 300 #define MY_DEFAULT_ERR_LED_PIN 4 #define MY_DEFAULT_TX_LED_PIN 5 #define MY_DEFAULT_RX_LED_PIN 6