NodeMcu Lua WiFi gateway with RFM69HW



  • All I have done here

    Pin mapping:
    RFM69HW <-> ESP8266
    DIO0 <-> GPIO4
    SCK <-> GPIO14
    MOSI <-> GPIO13
    MISO <-> GPIO12
    CS <-> GPIO15

    I added only a single line (#define MY_RFM69_FREQUENCY RF69_433MHZ) and changed the IP, LED and Password

    #include <EEPROM.h>
    #include <SPI.h>
    
    // Enable debug prints to serial monitor
    #define MY_DEBUG 
    
    // Use a bit lower baudrate for serial prints on ESP8266 than default in MyConfig.h
    #define MY_BAUD_RATE 9600
    
    // Enables and select radio type (if attached)
    //#define MY_RADIO_NRF24
    #define MY_RADIO_RFM69
    #define MY_RFM69_FREQUENCY   RF69_433MHZ
    
    
    // Gateway mode always enabled for ESP8266. But we add this anyway ;)
    #define MY_GATEWAY_ESP8266
    
    #define MY_ESP8266_SSID "mySSID"
    #define MY_ESP8266_PASSWORD "myPassword"
    
    // Enable UDP communication
    //#define MY_USE_UDP
    
    // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
    #define MY_IP_ADDRESS 192,168,0,198
    
    // If using static ip you need to define Gateway and Subnet address as well
    #define MY_IP_GATEWAY_ADDRESS 192,168,0,8
    #define MY_IP_SUBNET_ADDRESS 255,255,255,0
    
    // The port to keep open on node server mode 
    #define MY_PORT 5003      
    
    // How many clients should be able to connect to this gateway (default 1)
    #define MY_GATEWAY_MAX_CLIENTS 2
    
    // Controller ip address. Enables client mode (default is "server" mode). 
    // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere. 
    //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 68
    
    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    
    // Enable Inclusion mode button on gateway
    // #define MY_INCLUSION_BUTTON_FEATURE
    // Set inclusion mode duration (in seconds)
    #define MY_INCLUSION_MODE_DURATION 60 
    // Digital pin used for inclusion mode button
    #define MY_INCLUSION_MODE_BUTTON_PIN  3 
    
     
    // Flash leds on rx/tx/err
    // #define MY_LEDS_BLINKING_FEATURE
    // Set blinking period
    // #define MY_DEFAULT_LED_BLINK_PERIOD 300
    
    // Led pins used if blinking feature is enabled above
    #define MY_DEFAULT_ERR_LED_PIN 16  // Error led pin
    #define MY_DEFAULT_RX_LED_PIN  16  // Receive led pin
    #define MY_DEFAULT_TX_LED_PIN  16  // the PCB, on board LED
    
    #if defined(MY_USE_UDP)
      #include <WiFiUDP.h>
    #else
      #include <ESP8266WiFi.h>
    #endif
    
    #include <MySensor.h>
    
    void setup() { 
    }
    
    void presentation() {
      // Present locally attached sensors here    
    }
    
    
    void loop() {
      // Send locally attech sensors data here
    }
    
    

    upload-9385a23a-641c-4f5a-9095-6f7c666f1d44

    upload-cc2ea0a1-ef66-4ef7-b528-08d5b821368a

    The gateway is connected, but I can not add to the Domoticz. How can I check RFM69HW? I have a remote COCO AYCT-102.


  • Hardware Contributor

    It looks like your gateway is connected to Domoticz: "

    Gateway ready...
    Gateway version 1.6.0-beta
    

    What do you want to add?



  • I want to add any 433Rya sensor. Or to start to see the code sent to the remote 433RYA COCO AYCT-102. But when you press the buttons on the remote nothing happens ... (

    2016-01-18 16:16:07.851 New sensors allowed for 5 minutes...
    2016-01-18 16:16:58.596 MySensors: Gateway Ready...
    

  • Hardware Contributor

    I dont know much about the 433mhz and RFM69HW. But the 433mhz specific codes isnt coded in the mysensors gw i think.
    If you want it to appear in Domoticz i think you need to bridge the gw to understand those codes and send it to Domoticz the right way.
    At this point MySensors only knows the MySensors codes.

    There are products that has do only this (433mhz + specidic codes). For Domoticz i use RFLink, but there is Telstick and RFXCom as well.



  • @sundberg84 said:

    At this point MySensors only knows the MySensors codes.

    Ok. Tanks
    So I will buy RFLink


  • Hardware Contributor

    @ansh it's the cheapest diy kit. I found it great and fun. If you want a more commercial product I think rfxcom is the biggest. Check so your 433mhz components are supported before you buy.


Log in to reply
 

Suggested Topics

  • 5
  • 1
  • 1
  • 3
  • 1
  • 2

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts