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. Announcements
  3. 💬 Advanced Gateway Options

💬 Advanced Gateway Options

Scheduled Pinned Locked Moved Announcements
59 Posts 16 Posters 8.2k Views 13 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.
  • maghacM maghac

    Got the LEDs working now, after some issues relating to the weird GPIO mapping on the NodeMCU.

    However, they are always on, and only blink off when receiving or transmitting. Is this intended? Can it be inverted (so they are off normally but only on when there is activity).

    Also, under what circumstances will the ERR led blink?

    S Offline
    S Offline
    Strixx
    wrote on last edited by
    #15

    @maghac What pins are you using for the LEDs? I have been investigating the GPIO vs PIN layout for the NodeMCU now for several hours. And I am still not shore which I shall use.
    I have found complete maps for the GPIO and thought I had it all figured out. But then I saw in the example code for the gateway (GatewayESP8266.ino) the following:

    /*
     * Inclusion mode button:
     * - Connect GPIO5 via switch to GND ('inclusion switch')
    */
    ....
    // Digital pin used for inclusion mode button
    //#define MY_INCLUSION_MODE_BUTTON_PIN  3
    

    But on NodeMCU GPIO5 is PIN D1 and not D3 (which is GPIO0)

    So please... Anyone... What pins on the NodeMCU is usable for connecting radio traffic LEDs, and how do I name them in the code?

    maghacM 1 Reply Last reply
    0
    • S Strixx

      @maghac What pins are you using for the LEDs? I have been investigating the GPIO vs PIN layout for the NodeMCU now for several hours. And I am still not shore which I shall use.
      I have found complete maps for the GPIO and thought I had it all figured out. But then I saw in the example code for the gateway (GatewayESP8266.ino) the following:

      /*
       * Inclusion mode button:
       * - Connect GPIO5 via switch to GND ('inclusion switch')
      */
      ....
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN  3
      

      But on NodeMCU GPIO5 is PIN D1 and not D3 (which is GPIO0)

      So please... Anyone... What pins on the NodeMCU is usable for connecting radio traffic LEDs, and how do I name them in the code?

      maghacM Offline
      maghacM Offline
      maghac
      wrote on last edited by
      #16

      @Strixx Sorry, I don't remember and I have since then stopped using the LEDs. Couldn't get the inverse feature to work and I realized having LED indicators were not all that useful anyway in the end. If the gateway works, I will see it on MQTT traffic anyway.

      S 1 Reply Last reply
      1
      • maghacM maghac

        @Strixx Sorry, I don't remember and I have since then stopped using the LEDs. Couldn't get the inverse feature to work and I realized having LED indicators were not all that useful anyway in the end. If the gateway works, I will see it on MQTT traffic anyway.

        S Offline
        S Offline
        Strixx
        wrote on last edited by
        #17

        @maghac Well... I guess you are right about how useful the LEDs are. But I still would like to learn how to use the NodeMCU. And then there is also this, shall we call it OCD... ;-)

        1 Reply Last reply
        0
        • mntlvrM Offline
          mntlvrM Offline
          mntlvr
          wrote on last edited by
          #18

          So what is the finial solution to using the Led's on a ESP 8266-E gateway are they of any use if using a Vera Controller?
          I have used them when I had a working Ethernet gateway but I am wanting to use an Esp 8266-E gateway now . What pins do one use on ESP device
          Thanks for the help

          S 2 Replies Last reply
          0
          • mntlvrM mntlvr

            So what is the finial solution to using the Led's on a ESP 8266-E gateway are they of any use if using a Vera Controller?
            I have used them when I had a working Ethernet gateway but I am wanting to use an Esp 8266-E gateway now . What pins do one use on ESP device
            Thanks for the help

            S Offline
            S Offline
            Strixx
            wrote on last edited by
            #19

            @mntlvr I am using D1, D9 and D10. And it works perfectly on NodeMCU 0.9. Without the need of "MY_WITH_LEDS_BLINKING_INVERSE".

            Here is the code:

            // Set blinking period (in milliseconds)
            #define MY_DEFAULT_LED_BLINK_PERIOD 300
            
            // Flash leds on rx/tx/err
            // Led pins used if blinking feature is enabled above
            // Internal onboard LED is PIN 16 
            #define MY_DEFAULT_ERR_LED_PIN D10  // Error led pin (Red)
            #define MY_DEFAULT_RX_LED_PIN  D9  // Receive led pin (Yellow)
            #define MY_DEFAULT_TX_LED_PIN  D1  // Transmit led pin (Green)
            
            1 Reply Last reply
            0
            • mntlvrM Offline
              mntlvrM Offline
              mntlvr
              wrote on last edited by
              #20

              Thanks Strixx
              I am using D4 D5 D9 D10
              and as soon as I can get the unit to work with either of my Vera's I will know if mine works. It seems sinceI have gone over to the newest Library none of the gateways I build works.

              S 1 Reply Last reply
              0
              • mntlvrM mntlvr

                So what is the finial solution to using the Led's on a ESP 8266-E gateway are they of any use if using a Vera Controller?
                I have used them when I had a working Ethernet gateway but I am wanting to use an Esp 8266-E gateway now . What pins do one use on ESP device
                Thanks for the help

                S Offline
                S Offline
                Strixx
                wrote on last edited by
                #21

                @mntlvr said in 💬 Advanced Gateway Options:

                So what is the finial solution to using the Led's on a ESP 8266-E gateway are they of any use if using a Vera Controller?

                I have had a lot of help with the leds. I have noticed that you get a lot of errors (in some positions it is impossible to communicate with the nodes at all) if not the radio is positioned to close to the ESP. It seems to me that the radio on the NodeMCU interferes with the NRF24L01+PA+LNA that i am using on my gateway. I found I thread on this forum about it but can't find it again.

                So thanks to the leds I have been able to build a box where i have no transmission errors due to interference.

                mntlvrM 1 Reply Last reply
                0
                • mntlvrM mntlvr

                  Thanks Strixx
                  I am using D4 D5 D9 D10
                  and as soon as I can get the unit to work with either of my Vera's I will know if mine works. It seems sinceI have gone over to the newest Library none of the gateways I build works.

                  S Offline
                  S Offline
                  Strixx
                  wrote on last edited by
                  #22

                  @mntlvr said in 💬 Advanced Gateway Options:

                  Thanks Strixx
                  I am using D4 D5 D9 D10
                  and as soon as I can get the unit to work with either of my Vera's I will know if mine works. It seems sinceI have gone over to the newest Library none of the gateways I build works.

                  Don't know what radio you are using, but for the NRF24L01+ D5 is used for the radio.

                  And D4 is not possible to use for LED. It can not be high or low on boot. That has some special purpose.

                  The only pins available for LED is the ones I use. D1, D9 and D10.

                  I use D4 for inclusion button. That works as long as I don't press the button at startup of gateway. Then it will not start.

                  1 Reply Last reply
                  0
                  • mntlvrM Offline
                    mntlvrM Offline
                    mntlvr
                    wrote on last edited by mntlvr
                    #23

                    Yes on the 8266-E devkit V3 ,D1 is GPIO 5, D9 is the GPIO 03 (RX) and D10 is GPIO 01 (TX) D5 is GPIO 14 so I am using GPIO 05 and 01 and 03 and 02 . So I guess I am not clear as to what you use GPIO pins or lettered pins on 8266. On V3 of the 8266-E the builtin LED is on GPIO 2 which is D4 so when I tried your hookup All I got was Builtin LED on 100% and exception errors and would not boot
                    I will wait for your reply and thanks this may help if I am on the same page as you

                    S 1 Reply Last reply
                    0
                    • mntlvrM mntlvr

                      Yes on the 8266-E devkit V3 ,D1 is GPIO 5, D9 is the GPIO 03 (RX) and D10 is GPIO 01 (TX) D5 is GPIO 14 so I am using GPIO 05 and 01 and 03 and 02 . So I guess I am not clear as to what you use GPIO pins or lettered pins on 8266. On V3 of the 8266-E the builtin LED is on GPIO 2 which is D4 so when I tried your hookup All I got was Builtin LED on 100% and exception errors and would not boot
                      I will wait for your reply and thanks this may help if I am on the same page as you

                      S Offline
                      S Offline
                      Strixx
                      wrote on last edited by
                      #24

                      @mntlvr
                      I have the NodeMCU 0.9. This is the PIN layout and what I am using:

                      //LEDs
                      D1    GPIO 5
                      D9    GPIO 3
                      D10   GPIO 1
                      
                      //Inclusion button
                      D4    GPIO 2
                      
                      //Radio
                      D2    GPIO 4
                      D5    GPIO 14
                      D6    GPIO 12
                      D7    GPIO 13
                      D8    GPIO 15
                      
                      1 Reply Last reply
                      0
                      • mntlvrM Offline
                        mntlvrM Offline
                        mntlvr
                        wrote on last edited by mntlvr
                        #25

                        Okay we are on the same page,this is good Do you have a Vera Controller?
                        I am using a Vera Plus and a Vera3.Now in the Plus the plugin says it is connected to my GW using port even thou my sketch says to use a different port.
                        Here is latest pin mapping for my 88266 v3

                        IO index ESP8266 pin IO index ESP8266 pin
                        0 [*] GPIO16 7 GPIO13
                        1 GPIO5 8 GPIO15
                        2 GPIO4 9 GPIO3
                        3 GPIO0 10 GPIO1
                        4 GPIO2 11 GPIO9
                        5 GPIO14 12 GPIO10
                        6 GPIO12

                        here is my sketch is yours the same (except for ip addresses) and if you use a Vera how is your plugin configured. Also I am using the latest U17 mysensors software

                        The MySensors Arduino library handles the wireless radio link and protocol
                         * between your home built sensors/actuators and HA controller of choice.
                         * The sensors forms a self healing radio network with optional repeaters. Each
                         * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                         * network topology allowing messages to be routed to nodes.
                         *
                         * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                         * Copyright (C) 2013-2015 Sensnology AB
                         * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                         *
                         * Documentation: http://www.mysensors.org
                         * Support Forum: http://forum.mysensors.org
                         *
                         * This program is free software; you can redistribute it and/or
                         * modify it under the terms of the GNU General Public License
                         * version 2 as published by the Free Software Foundation.
                         *
                         *******************************
                         *
                         * REVISION HISTORY
                         * Version 1.0 - Henrik EKblad
                         * Contribution by a-lurker and Anticimex,
                         * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
                         * Contribution by Ivo Pullens (ESP8266 support)
                         *
                         * DESCRIPTION
                         * The EthernetGateway sends data received from sensors to the WiFi link.
                         * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
                         *
                         * VERA CONFIGURATION:
                         * Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
                         * E.g. If you want to use the defualt values in this sketch enter: 192.168.254.66:5003
                         *
                         * LED purposes:
                         * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch, only the LEDs that is defined is used.
                         * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
                         * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
                         * - ERR (red) - fast blink on error during transmission error or recieve crc error
                         *
                         * See http://www.mysensors.org/build/esp8266_gateway for wiring instructions.
                         * nRF24L01+  ESP8266
                         * VCC        VCC
                         * CE         GPIO4 D2 // GPIO 4
                         * CSN/CS     GPIO15 D8// GPIO 15
                         * SCK        GPIO14 D5 //GPIO 14
                         * MISO       GPIO12 D7 // GPIO 13
                         * MOSI       GPIO13 D6// GPIO 12
                         * GND        GND
                         *
                         * Not all ESP8266 modules have all pins available on their external interface.
                         * This code has been tested on an ESP-12 module.
                         * The ESP8266 requires a certain pin configuration to download code, and another one to run code:
                         * - Connect REST (reset) via 10K pullup resistor to VCC, and via switch to GND ('reset switch')
                         * - Connect GPIO15 via 10K pulldown resistor to GND
                         * - Connect CH_PD via 10K resistor to VCC
                         * - Connect GPIO2 via 10K resistor to VCC
                         * - Connect GPIO0 via 10K resistor to VCC, and via switch to GND ('bootload switch')
                         *
                         * Inclusion mode button:
                         * - Connect GPIO2 via switch to GND ('inclusion switch') D4 GPIO 2
                         *
                         * Make sure to fill in your ssid and WiFi password below for ssid & pass.
                         */
                        
                        // 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 115200
                        
                        // Enables and select radio type (if attached)
                        #define MY_RADIO_NRF24
                        
                        #define MY_GATEWAY_ESP8266
                        
                        #define MY_ESP8266_SSID "name"
                        #define MY_ESP8266_PASSWORD "password"
                        
                        // Enable UDP communication
                         #define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
                        
                        // Set the hostname for the WiFi Client. This is the hostname
                        // it will pass to the DHCP server if not static.
                         #define MY_ESP8266_HOSTNAME "sensor-gateway"
                        
                        // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
                        // #define MY_IP_ADDRESS 192.168.xxx.xxx
                        
                        // If using static ip you can define Gateway and Subnet address as well
                         //#define MY_IP_GATEWAY_ADDRESS 192.168.xxx.xxx
                         //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
                        
                        // The port to keep open on node server mode
                         #define MY_PORT 3480 // 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, 254, xxx // Vera Plus address 192.168.254.068 Vera3 Address
                        // 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  2 //D4 also Builtin LED
                        
                        // Set blinking period
                         #define MY_DEFAULT_LED_BLINK_PERIOD 300
                        
                        // Flash leds on rx/tx/err
                        // Led pins used if blinking feature is enabled above
                         #define MY_DEFAULT_ERR_LED_PIN 3  // Red Error led pin //D9_____________This does not work
                        #define MY_DEFAULT_ERR_LED_PIN 10  // Red Error led pin //D12 ******* This works
                         #define MY_DEFAULT_RX_LED_PIN  1  // Green Receive led pin // D10_____________ This does not work
                        #define MY_DEFAULT_RX_LED_PIN  9  // Green Receive led pin // D11*******This works
                         #define MY_DEFAULT_TX_LED_PIN  5  // Blue Transmit LED // D1
                        
                        #if defined(MY_USE_UDP)
                        #include <WiFiUdp.h>
                        #endif
                        
                        #include <ESP8266WiFi.h>
                        #include <MySensors.h>
                        
                        void setup()
                        {
                        	// Setup locally attached sensors
                        }
                        
                        void presentation()
                        {
                        	// Present locally attached sensors here
                        }
                        
                        void loop()
                        {
                        	// Send locally attached sensors data here
                        }
                        

                        It will not work for me with this configuration.
                        but if I use the ****** Configuration it works

                        and here is output of working configuration:

                        532 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                        582 GWT:TIN:CONNECTING...
                        584 GWT:TIN:IP=192.168.254.125
                        587 MCO:BGN:STP
                        588 MCO:BGN:INIT OK,TSP=1
                        633 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        3441 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        3896 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4424
                        4121 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                        4556 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                        5755 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        8763 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        9875 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        pm open,type:2 0
                        10877 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        14047 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                        14086 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        14717 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1574
                        15999 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        19408 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        20422 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                        21121 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        24732 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        25940 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                        29373 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:736
                        34999 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4413
                        42034 TSF:MSG:READ,24-24-0,s=24,c=1,t=16,pt=0,l=1,sg=0:0
                        45115 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1586
                        59511 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:739
                        66107 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4428
                        75513 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1604
                        80151 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                        80291 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        83273 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        87705 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        88597 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        89649 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:740
                        89684 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        92827 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        93918 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        94376 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        97207 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4458
                        97949 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        99071 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        99240 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        103071 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        103698 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                        103766 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                        104129 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                        104562 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                        105911 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1617
                        108193 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                        Now I do not know if the 0 (READ,9-6-0) means it is not sending it anywhere
                        but you can see it is reading my sensors output (MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1586) output message from my LUX sensor
                        

                        What firmware is in your 8266?
                        I do not know if this helps but I can tell you the "inclusion" still does not work
                        Waiting for your reply
                        Thanks

                        S 1 Reply Last reply
                        0
                        • dbemowskD Offline
                          dbemowskD Offline
                          dbemowsk
                          wrote on last edited by
                          #26

                          PLEASE, if you post code, post it as a code block. It is MUCH easier to read. Edit your post, highlight the code and click on the </> icon. If you are pasting code into a new message, click the </> icon and then paste. The code gets surrounded by "```" (without quotes) at the beginning and end. Make sure you click out of your code block when finishing your message.

                          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                          1 Reply Last reply
                          0
                          • mntlvrM Offline
                            mntlvrM Offline
                            mntlvr
                            wrote on last edited by mntlvr
                            #27

                            You are very correct, and I thank you. One day I will learn to use this forum correctly, that could be when I can build a gw that actually works? LOL
                            Also why does my Plugin in Vera say it is using plugin "Version 1.5" if I am using the latest software from the GitHub site, which I would say is to use the 2.2 library

                            dbemowskD 1 Reply Last reply
                            1
                            • mntlvrM mntlvr

                              Okay we are on the same page,this is good Do you have a Vera Controller?
                              I am using a Vera Plus and a Vera3.Now in the Plus the plugin says it is connected to my GW using port even thou my sketch says to use a different port.
                              Here is latest pin mapping for my 88266 v3

                              IO index ESP8266 pin IO index ESP8266 pin
                              0 [*] GPIO16 7 GPIO13
                              1 GPIO5 8 GPIO15
                              2 GPIO4 9 GPIO3
                              3 GPIO0 10 GPIO1
                              4 GPIO2 11 GPIO9
                              5 GPIO14 12 GPIO10
                              6 GPIO12

                              here is my sketch is yours the same (except for ip addresses) and if you use a Vera how is your plugin configured. Also I am using the latest U17 mysensors software

                              The MySensors Arduino library handles the wireless radio link and protocol
                               * between your home built sensors/actuators and HA controller of choice.
                               * The sensors forms a self healing radio network with optional repeaters. Each
                               * repeater and gateway builds a routing tables in EEPROM which keeps track of the
                               * network topology allowing messages to be routed to nodes.
                               *
                               * Created by Henrik Ekblad <henrik.ekblad@mysensors.org>
                               * Copyright (C) 2013-2015 Sensnology AB
                               * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors
                               *
                               * Documentation: http://www.mysensors.org
                               * Support Forum: http://forum.mysensors.org
                               *
                               * This program is free software; you can redistribute it and/or
                               * modify it under the terms of the GNU General Public License
                               * version 2 as published by the Free Software Foundation.
                               *
                               *******************************
                               *
                               * REVISION HISTORY
                               * Version 1.0 - Henrik EKblad
                               * Contribution by a-lurker and Anticimex,
                               * Contribution by Norbert Truchsess <norbert.truchsess@t-online.de>
                               * Contribution by Ivo Pullens (ESP8266 support)
                               *
                               * DESCRIPTION
                               * The EthernetGateway sends data received from sensors to the WiFi link.
                               * The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
                               *
                               * VERA CONFIGURATION:
                               * Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
                               * E.g. If you want to use the defualt values in this sketch enter: 192.168.254.66:5003
                               *
                               * LED purposes:
                               * - To use the feature, uncomment any of the MY_DEFAULT_xx_LED_PINs in your sketch, only the LEDs that is defined is used.
                               * - RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
                               * - TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
                               * - ERR (red) - fast blink on error during transmission error or recieve crc error
                               *
                               * See http://www.mysensors.org/build/esp8266_gateway for wiring instructions.
                               * nRF24L01+  ESP8266
                               * VCC        VCC
                               * CE         GPIO4 D2 // GPIO 4
                               * CSN/CS     GPIO15 D8// GPIO 15
                               * SCK        GPIO14 D5 //GPIO 14
                               * MISO       GPIO12 D7 // GPIO 13
                               * MOSI       GPIO13 D6// GPIO 12
                               * GND        GND
                               *
                               * Not all ESP8266 modules have all pins available on their external interface.
                               * This code has been tested on an ESP-12 module.
                               * The ESP8266 requires a certain pin configuration to download code, and another one to run code:
                               * - Connect REST (reset) via 10K pullup resistor to VCC, and via switch to GND ('reset switch')
                               * - Connect GPIO15 via 10K pulldown resistor to GND
                               * - Connect CH_PD via 10K resistor to VCC
                               * - Connect GPIO2 via 10K resistor to VCC
                               * - Connect GPIO0 via 10K resistor to VCC, and via switch to GND ('bootload switch')
                               *
                               * Inclusion mode button:
                               * - Connect GPIO2 via switch to GND ('inclusion switch') D4 GPIO 2
                               *
                               * Make sure to fill in your ssid and WiFi password below for ssid & pass.
                               */
                              
                              // 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 115200
                              
                              // Enables and select radio type (if attached)
                              #define MY_RADIO_NRF24
                              
                              #define MY_GATEWAY_ESP8266
                              
                              #define MY_ESP8266_SSID "name"
                              #define MY_ESP8266_PASSWORD "password"
                              
                              // Enable UDP communication
                               #define MY_USE_UDP  // If using UDP you need to set MY_CONTROLLER_IP_ADDRESS below
                              
                              // Set the hostname for the WiFi Client. This is the hostname
                              // it will pass to the DHCP server if not static.
                               #define MY_ESP8266_HOSTNAME "sensor-gateway"
                              
                              // Enable MY_IP_ADDRESS here if you want a static ip address (no DHCP)
                              // #define MY_IP_ADDRESS 192.168.xxx.xxx
                              
                              // If using static ip you can define Gateway and Subnet address as well
                               //#define MY_IP_GATEWAY_ADDRESS 192.168.xxx.xxx
                               //#define MY_IP_SUBNET_ADDRESS 255,255,255,0
                              
                              // The port to keep open on node server mode
                               #define MY_PORT 3480 // 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, 254, xxx // Vera Plus address 192.168.254.068 Vera3 Address
                              // 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  2 //D4 also Builtin LED
                              
                              // Set blinking period
                               #define MY_DEFAULT_LED_BLINK_PERIOD 300
                              
                              // Flash leds on rx/tx/err
                              // Led pins used if blinking feature is enabled above
                               #define MY_DEFAULT_ERR_LED_PIN 3  // Red Error led pin //D9_____________This does not work
                              #define MY_DEFAULT_ERR_LED_PIN 10  // Red Error led pin //D12 ******* This works
                               #define MY_DEFAULT_RX_LED_PIN  1  // Green Receive led pin // D10_____________ This does not work
                              #define MY_DEFAULT_RX_LED_PIN  9  // Green Receive led pin // D11*******This works
                               #define MY_DEFAULT_TX_LED_PIN  5  // Blue Transmit LED // D1
                              
                              #if defined(MY_USE_UDP)
                              #include <WiFiUdp.h>
                              #endif
                              
                              #include <ESP8266WiFi.h>
                              #include <MySensors.h>
                              
                              void setup()
                              {
                              	// Setup locally attached sensors
                              }
                              
                              void presentation()
                              {
                              	// Present locally attached sensors here
                              }
                              
                              void loop()
                              {
                              	// Send locally attached sensors data here
                              }
                              

                              It will not work for me with this configuration.
                              but if I use the ****** Configuration it works

                              and here is output of working configuration:

                              532 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                              582 GWT:TIN:CONNECTING...
                              584 GWT:TIN:IP=192.168.254.125
                              587 MCO:BGN:STP
                              588 MCO:BGN:INIT OK,TSP=1
                              633 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              3441 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              3896 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4424
                              4121 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                              4556 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                              5755 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              8763 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              9875 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              pm open,type:2 0
                              10877 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              14047 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                              14086 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              14717 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1574
                              15999 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              19408 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              20422 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                              21121 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              24732 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              25940 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                              29373 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:736
                              34999 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4413
                              42034 TSF:MSG:READ,24-24-0,s=24,c=1,t=16,pt=0,l=1,sg=0:0
                              45115 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1586
                              59511 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:739
                              66107 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4428
                              75513 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1604
                              80151 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                              80291 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              83273 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              87705 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              88597 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              89649 TSF:MSG:READ,1-1-0,s=1,c=1,t=23,pt=3,l=2,sg=0:740
                              89684 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              92827 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              93918 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              94376 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              97207 TSF:MSG:READ,3-3-0,s=3,c=1,t=23,pt=3,l=2,sg=0:4458
                              97949 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              99071 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              99240 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              103071 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              103698 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:0
                              103766 TSF:MSG:READ,27-27-0,s=27,c=1,t=16,pt=0,l=1,sg=0:0
                              104129 TSF:MSG:READ,23-6-0,s=23,c=1,t=16,pt=0,l=1,sg=0:1
                              104562 TSF:MSG:READ,22-22-0,s=22,c=1,t=16,pt=0,l=1,sg=0:0
                              105911 TSF:MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1617
                              108193 TSF:MSG:READ,21-21-0,s=21,c=1,t=16,pt=0,l=1,sg=0:0
                              Now I do not know if the 0 (READ,9-6-0) means it is not sending it anywhere
                              but you can see it is reading my sensors output (MSG:READ,9-6-0,s=9,c=1,t=23,pt=3,l=2,sg=0:1586) output message from my LUX sensor
                              

                              What firmware is in your 8266?
                              I do not know if this helps but I can tell you the "inclusion" still does not work
                              Waiting for your reply
                              Thanks

                              S Offline
                              S Offline
                              Strixx
                              wrote on last edited by Strixx
                              #28

                              @mntlvr I use Domoticz, not Vera. So I can't answer any questions about that controller.

                              But here is my code for the ESP8266 Gateway. I am using 2.2.0 library.

                              // 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
                              // Set the frequency to channel 110 (2,510MHz), to prevent interference of WiFi channel 14 (-2,495MHz)
                              #define MY_RF24_CHANNEL 110
                              
                              // ESP8266 Gateway
                              #define MY_GATEWAY_ESP8266
                              
                              // WiFi settings
                              #define MY_ESP8266_SSID "wifi"
                              #define MY_ESP8266_PASSWORD "password"
                              
                              // Set the hostname for the WiFi Client. This is the hostname
                              // it will pass to the DHCP server if not static.
                              #define MY_ESP8266_HOSTNAME "MySensor_GW"
                              
                              // 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
                              
                              // 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  D4
                              
                              // Set blinking period (in milliseconds)
                              #define MY_DEFAULT_LED_BLINK_PERIOD 300
                              
                              // Flash leds on rx/tx/err
                              // Led pins used if blinking feature is enabled above
                              // Internal onboard LED is PIN 16 
                              #define MY_DEFAULT_ERR_LED_PIN D10  // Error led pin (Red)
                              #define MY_DEFAULT_RX_LED_PIN  D9  // Receive led pin (Yellow)
                              #define MY_DEFAULT_TX_LED_PIN  D1  // Transmit led pin (Green)
                              
                              #include <ESP8266WiFi.h>
                              
                              #include <MySensors.h>
                              
                              void setup()
                              {
                              }
                              
                              void presentation()
                              {
                              	// Present locally attached sensors here
                              }
                              
                              
                              void loop()
                              {
                              	// Send locally attached sensors data here
                              }
                              

                              Be aware that if you use D4 for inclusion button the button can not be pushed at start of gateway. Then the gateway will not boot correct.

                              1 Reply Last reply
                              0
                              • mntlvrM mntlvr

                                You are very correct, and I thank you. One day I will learn to use this forum correctly, that could be when I can build a gw that actually works? LOL
                                Also why does my Plugin in Vera say it is using plugin "Version 1.5" if I am using the latest software from the GitHub site, which I would say is to use the 2.2 library

                                dbemowskD Offline
                                dbemowskD Offline
                                dbemowsk
                                wrote on last edited by
                                #29

                                @mntlvr You are mistaking the plugin version with the library version. I am going to assume you are using UI7 and not UI5. Go to your devices list. On the MySensors plugin, click the right arrow icon:
                                0_1523020957054_c89ffbac-c879-4984-85f6-9048eab72898-image.png
                                Once there, click on Settings and you should see something like this:
                                0_1523020972762_b7130180-69a1-4415-8353-661233f4f129-image.png
                                Right under the plugin version you will see what library version you got from Github. Remember though that that is ONLY for your gateway and NOT NECESSARILY what library your nodes are running on.

                                Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                                mntlvrM 1 Reply Last reply
                                1
                                • mntlvrM Offline
                                  mntlvrM Offline
                                  mntlvr
                                  wrote on last edited by
                                  #30

                                  No I am using my Vera3 U15 and Library version is 1.4.1 . I am not going to keep this gw, just had to see if it was a problem with my Vera's or the library versions I am using so now I am uninstalling Arduino and all of the libraries and going to install Arduino IDE 1.6.4 and MYSensors Library 1.4.1 and go from their if that works I will install a later version of MYSensors.

                                  1 Reply Last reply
                                  0
                                  • dbemowskD dbemowsk

                                    @mntlvr You are mistaking the plugin version with the library version. I am going to assume you are using UI7 and not UI5. Go to your devices list. On the MySensors plugin, click the right arrow icon:
                                    0_1523020957054_c89ffbac-c879-4984-85f6-9048eab72898-image.png
                                    Once there, click on Settings and you should see something like this:
                                    0_1523020972762_b7130180-69a1-4415-8353-661233f4f129-image.png
                                    Right under the plugin version you will see what library version you got from Github. Remember though that that is ONLY for your gateway and NOT NECESSARILY what library your nodes are running on.

                                    mntlvrM Offline
                                    mntlvrM Offline
                                    mntlvr
                                    wrote on last edited by
                                    #31

                                    @dbemowsk said in 💬 Advanced Gateway Options:

                                    @mntlvr You are mistaking the plugin version with the library version. I am going to assume you are using UI7 and not UI5. Go to your devices list. On the MySensors plugin, click the right arrow icon:
                                    0_1523020957054_c89ffbac-c879-4984-85f6-9048eab72898-image.png
                                    Once there, click on Settings and you should see something like this:
                                    0_1523020972762_b7130180-69a1-4415-8353-661233f4f129-image.png
                                    Right under the plugin version you will see what library version you got from Github. Remember though that that is ONLY for your gateway and NOT NECESSARILY what library your nodes are running on.

                                    I am now using the library 2.2 with IDE 1.84 and now and the latest U17 files for Vera.
                                    I can ot get my Vera Plus to create the device. So what can I do now?

                                    dbemowskD 1 Reply Last reply
                                    0
                                    • mntlvrM mntlvr

                                      @dbemowsk said in 💬 Advanced Gateway Options:

                                      @mntlvr You are mistaking the plugin version with the library version. I am going to assume you are using UI7 and not UI5. Go to your devices list. On the MySensors plugin, click the right arrow icon:
                                      0_1523020957054_c89ffbac-c879-4984-85f6-9048eab72898-image.png
                                      Once there, click on Settings and you should see something like this:
                                      0_1523020972762_b7130180-69a1-4415-8353-661233f4f129-image.png
                                      Right under the plugin version you will see what library version you got from Github. Remember though that that is ONLY for your gateway and NOT NECESSARILY what library your nodes are running on.

                                      I am now using the library 2.2 with IDE 1.84 and now and the latest U17 files for Vera.
                                      I can ot get my Vera Plus to create the device. So what can I do now?

                                      dbemowskD Offline
                                      dbemowskD Offline
                                      dbemowsk
                                      wrote on last edited by
                                      #32

                                      @mntlvr Are you saying that it won't create the MySensors plugin itself, or one of your nodes under that?

                                      Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                      Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                                      1 Reply Last reply
                                      0
                                      • mntlvrM Offline
                                        mntlvrM Offline
                                        mntlvr
                                        wrote on last edited by mntlvr
                                        #33

                                        It creates the MySensor plugin but will not allow any inclusions, I have inclusions loaded into the gw but did not attach a button or leds to it but with inclusions loaded in gw Vera Plugin should allow me to "include" but the plugin button does nothing, so I do not have any nodes. Also I know the Vera is talking with the gateway because in advanced options the correct ip address is there and so is the proper port. I use a Port scanner to scan the ports available and report the ports that are open on each device on my network both of my controllers have port 80 and port 4380 open.

                                        dbemowskD 1 Reply Last reply
                                        0
                                        • mntlvrM mntlvr

                                          It creates the MySensor plugin but will not allow any inclusions, I have inclusions loaded into the gw but did not attach a button or leds to it but with inclusions loaded in gw Vera Plugin should allow me to "include" but the plugin button does nothing, so I do not have any nodes. Also I know the Vera is talking with the gateway because in advanced options the correct ip address is there and so is the proper port. I use a Port scanner to scan the ports available and report the ports that are open on each device on my network both of my controllers have port 80 and port 4380 open.

                                          dbemowskD Offline
                                          dbemowskD Offline
                                          dbemowsk
                                          wrote on last edited by
                                          #34

                                          @mntlvr Sorry if I missed this, but how do you have the gateway connected to your Vera? I recall you mentioning about a serial connection earlier. So is it that you have a serial connection to your Vera from your ESP8266 to where the ESP is just acting as a bridge between the wireless side to the serial side connected to the Vera?

                                          Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                                          Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

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


                                          20

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 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