💬 Advanced Gateway Options


  • Admin

    This thread contains comments for the article "Advanced Gateway Options" posted on MySensors.org.



  • MY_LEDS_BLINKING_FEATURE is now obsolete in the latest 2.1



  • Is there a new way to get the radio status LEDs?


  • Admin


  • Mod

    @Paul-Derbyshire thanks for noticing. I have removed MY_LEDS_BLINKING_FEATURE from the instructions.



  • 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?


  • Hardware Contributor

    @maghac said in 💬 Advanced Gateway Options:

    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).
    You should be able to use

    #define MY_WITH_LEDS_BLINKING_INVERSE
    

    But because of the weird wiring on esp8266 based boards it's always a hit or miss, some LEDs should be inversed, some other not. You may have to play with pull-ups or pull-downs resistors on some pins.



  • What would be needed to make this work with the MQTT gateway?



  • Hello Builders,

    i am building a arduino 2560 node and i would like to activate radio blinking LED.

    I have tested to insert lines regarding Blinking for pins 4,5,6 but there is a issue :

    0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    3 MCO:BGN:BFR
    203 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    208 !MCO:SLP:REP
    1 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    5 MCO:BGN:BFR
    205 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP
    0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    4 MCO:BGN:BFR
    204 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP
    1 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    5 MCO:BGN:BFR
    204 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP
    0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    4 MCO:BGN:BFR
    204 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP
    1 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    5 MCO:BGN:BFR
    204 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP
    0 MCO:BGN:INIT REPEATER,CP=RNNRA--,VER=2.1.1
    4 MCO:BGN:BFR
    204 MCO:SLP:MS=5000,SMS=0,I1=255,M1=255,I2=255,M2=255
    209 !MCO:SLP:REP

    Radio don't want initialized and probably the 2560 pinout don't work for blinking with pins 4,5,6.

    Are there a specific pinout for 2560 for radio blinking ?



  • For an RFM69HW, is anything other than '#define MY_RADIO_RFM69' required to make use of the higher tx power?


  • Mod



  • @mfalkvidd Thats great, many thanks!
    Still much to learn and finding important snippets of information here and there.

    I feel like both the options 'MY_RFM69_FREQUENCY RF69_433MHZ' and 'MY_IS_RFM69HW' should probably be mentioned in the SensebenderGatewaySerial.ino configuration file example lines.



  • This post is deleted!


  • is there a way to have one led that show if controller is connected to gateway ?



  • @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?



  • @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.



  • @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... 😉



  • 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



  • @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)
    


  • 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.



  • @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.



  • @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.



  • 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



  • @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
    


  • 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



  • 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.



  • 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



  • @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.



  • @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.



  • 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.



  • @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?



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



  • 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.



  • @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?



  • No I have a WIFI connection, not a serial gw. I had an Ethernet connection before but since they updated the libraries and the code I could never get my Ethernet gw working. So I built the WIFI gw and like I said the read outs on the serial monitor of the IDE shows the gw and the light sensor talking to one another but the plugin that is in Vera Plus does not allow "include" mode to operate at all, so I can not include any of my sensors into my Vera. Now I hope someone here who has built a gw with an ESP8266-E v3 LoLin can help , maybe it is not for Vera but perhaps they built it for another controller, but the principle is the same. I do know that a V2 of the same ESP8266 has a different pin out so I can't use that pin out from a V2 chip



  • @mntlvr How does your ESP8266 connect to your Vera?



  • Thru the plugin just like mt Ethernet W5100 did.



  • @mntlvr I think you're missing what I am asking. How does your ESP8266 PHYSICALLY connect to your vera, or doesn't it? In other words, is there a wire that connects your gateway to your vera?



  • I think you are miss-understanding me the Mysensors Plugin for Vera does all of the connecting to Vera. I have nothing connected to my Vera directly except the Vera address and the Ethernet Address which is applied to the plugin that you use to create the Icon for Mysensors. Whether I use the WiFi version or the Ethernet version the use the same plugin.Wireless except for the Address each unit has on the network



  • @mntlvr Sorry, I don't have ethernet or WiFi gateways, so I wasn't sure if or how they connected to the Vera. When you go to the properties on the MySensors plugin, is it that you have the start and stop buttons for inclusion, or do you not have the buttons?



  • Yes the inclusion buttons are under properties no need of having button on gw.
    How does you serial gw talk to your Vera ? Do you have a plugin that is used to create your Icon.

    See when the icon is created on my Vera Plus it shows the plugin version but not the library version so I know just by that issue the plugin is not configuring to any gw.



  • @strixx said in 💬 Advanced Gateway Options:

    @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.

    Strixx
    You have a WiFi gw up and working , right? What version of the MYSensors are you using? Also what type of Vera are you using. I am using a Vera3 and a Vera Plus? Also which plugin are you using for your Vera. I have built both WiFi and Ethernet and the sensors talk wonderfully to the gw's no matter which I power up but neither of my Vera's will configure and use the plugin that are the latest available from git-hub.



  • @mntlvr I believe the plugin is similar, if not the same for the serial gateway also. Did you enable the inclusion mode?

    // Enable inclusion mode
    #define MY_INCLUSION_MODE_FEATURE
    

    If you do a port scan of the IP address of the ESP8266, what ports does it show as open? Do you have this in you sketch?

    // The port to keep open on node server mode
    #define MY_PORT 5003
    


  • Oh yes I mentioned that several days ago.
    My vera's have port 3480 and 80 opened



  • @mntlvr But do you have port 5003 defined in the gateway sketch that you have on the ESP8266? You should be seeing a port 5003 open. If not, you will need to check the sketch and find out why? What happens if you open your web browser to port 80 at that IP address? Does it bring you to a configuration page?



  • @mntlvr Also, It's not the Vera's IP that you want to scan ports on. It would be the IP of the ESP8266.



  • @mntlvr

    Strixx
    You have a WiFi gw up and working , right? What version of the MYSensors are you using? Also what type of Vera are you using. I am using a Vera3 and a Vera Plus? Also which plugin are you using for your Vera. I have built both WiFi and Ethernet and the sensors talk wonderfully to the gw's no matter which I power up but neither of my Vera's will configure and use the plugin that are the latest available from git-hub.

    I don't use Vera. I use Domoticz.



  • okay thanks



  • @dbemowsk
    No the gw is the like the host and the Controller is like the client so If you look into the Ethernet or WiFi sketches it will explain that you must use the Controller's ip address so the gw knows where to send the information to and the Vera is the one that is listening so it has to have a port open not the gw. the sensors send the info to the gw and the gw acknowledges it received the message then passing that message on to the controller thru the plugin



  • What does the red error LED indicate? I'm seeing reds on my gateway sometimes.


  • Mod

    @nick-willis it indicates an error 😉 The list of possible errors is available at https://github.com/mysensors/MySensors/blob/121648f34bb45ab0e21fc4b4835959d27b28a9c6/core/MyIndication.h#L49
    Most common reason is probably transmit failure.
    The gateway debug log will provide more details.


  • Hardware Contributor

    Hi all!

    Im building myself a network rack which will house all gateways and other network equipment. This is a steal frame (ie true faradays cage). I will run the antennas outside with a magnetic base and these antennas with "extension" has worked fine for my 433mhz equipment.

    For the main 2.4ghz gateway im lookning at this:

    0_1551615916119_b118e965-1818-4ea7-b798-257ed351cadd-image.png

    I guess its just a matter of buy and try, but I know there are some antenna nerds in here so a couple of questions.

    • Even if it says wifi, i guess it works just as great for MySensors since its the same freq?
    • Will the extension cord impact the performance in any way?
    • It say 5dBi, what does this correspond to setting MySensors setting? (Ie. how would you config the gateway settings?)

    From MyConfig:

    /**
     * @def MY_RF24_PA_LEVEL
     * @brief Default RF24 PA level. Override in sketch if needed.
     * - RF24_PA_LOW = -12dBm
     * - RF24_PA_HIGH = -6dBm
     * - RF24_PA_MAX = 0dBm
     */```

  • Mod

    Even if it says wifi, i guess it works just as great for MySensors since its the same freq?

    Exactly

    Will the extension cord impact the performance in any way?

    Yes. There will be some attenuation in the cable. Cables have different attenuation at different frequencies, and there are different cables. Hopefully this cable works well with 2.4GHz but it would be hard to tell without a datasheet or by measuring the cable.

    It say 5dBi, what does this correspond to setting MySensors setting? (Ie. how would you config the gateway settings?)

    The antenna (or maybe the antenna + cable, depending on what the specification includes) has 5dBi gain. This means that you'll have to lower the tx power by 5dB to stay within legal limits, compared with an isotropic antenna.


  • Hardware Contributor

    @mfalkvidd - thanks, very good information!
    So to be legal I must go RF24_PA_HIGH = -6dBm (which is default?).

    No datasheet found, i guess I have to buy and try.



  • @sundberg84 Further to what @mfalkvidd said, please note that most manufacturers state dBi figures as comparatives for the marketplace, rarely do they test them to verify the value and predominantly quote theoretical values instead.
    A claimed 5dBi it is likely a 1/4 wave whip ONLY on an infinite ground plane, your actual gain will be less than this depending on attached surface, gain reducing as the area reduces, and the cable attenuating it further depending on the cable used.
    i.e. It works, it don't, adjust 😉


  • Hardware Contributor

    @zboblamont thanks!

    The "try, repeat" method was something i was expecting but always good to have the theory behind. But im still not quite understanding this with gain and the MySensors settings (which seems to be negative gain?)


  • Mod

    @sundberg84 dBm is just a different way to state output power. Often milliwatts is used. The neat thing with dB is that they can be added and subtracted easily, which cannot be done with milliwatts.

    Conversion table: https://www.rfcables.org/dbm-to-milli-watts-table.html

    Iirc, the max radiated ouput power for the 433MHz band in EU is 100mW which is 20dB.

    The max power for MySensors is 0dBwhich is 1 milliwatt.

    With 5dB gain from the antenna, the radiated output power will be 0dB+5dB=5dB which is sligthly above 3 milliwatt (the antenna "focuses" the signal so the signal becomes stronger). So you can use the max output power and still be below 100mW, no worries.

    Let's say you had an antenna with 25dB gain. Then you would have to use a max output power of -5dB from MySensors to be within legal limits (25-5=20).

    For reference, this is what a 25dB antenna looks like https://www.aliexpress.com/item/YAGI-25DB-2-4G-WiFi-Booster-Antenna-for-Wireless-IP-Camera-or-Router/1886239710.html



  • @sundberg84 I see @mfalkvidd has already covered dBm and strangely a thong, presumably a typo rather than domestic distraction 😉
    The point I was driving at is you can largely ignore dBi, it is a theoretical isotropic radiation. Beyond the ERP limitations, a touch up or down on power nobody will be screaming at, but it is pointless burning energy for no purpose, you will arrive at a reliable Gateway ERP by experimentation. I very much doubt it will exceed limitations with existing Nodes in any case if your previous antenna was lower gain of any order.
    Do the maths by all means, just don't get hung up on it. The thing to remember is that total power remains essentially constant, the lobe formation only squeezes it more tightly with higher gain. A 1/4 lambda is not a high gain antenna...


  • Mod

    must have been a freudian slip 😉


Log in to reply
 

Suggested Topics

  • 3
  • 163
  • 5
  • 109
  • 2
  • 10

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts