Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Pseudomizer
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Pseudomizer

    @Pseudomizer

    0
    Reputation
    17
    Posts
    609
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Pseudomizer Follow

    Best posts made by Pseudomizer

    This user hasn't posted anything yet.

    Latest posts made by Pseudomizer

    • RE: ESP8266 WiFi gateway port for MySensors

      I have done EXTENSIVE testing and I got it working now but I don't understand why.

      It seems like my MyConfig.h is broken which is the one which I copied over from your development package. I used one of my MyConfig.h files and the module boot was successfull and it did not crash anymore. It is stable and fully integrated into Vera with sensors now.

      I also tested the different data rates. I tested 250KBPS and 1MBPS and both work fine as long as I configure the gateway and the sensor clients with the same data rate. If I use different data rates between client and gateway, the gateway does NOT crash but the sensor clients simply don't connect.

      Now I have a working MyConfig.h and a broken MyConfig.h. Here is the WORKING MyConfig.h file.

      /**
       * 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.
       */
      
      
      #ifndef MyConfig_h
      #define MyConfig_h
      #include <stdint.h>
      
      // Enable debug flag for debug prints. This will add a lot to the size of the final sketch but good
      // to see what is actually is happening when developing
      //#define DEBUG
      //#define MY_DEBUG_VERBOSE
      
      // Disable this line, If you are using TX(1), RX(0) as normal I/O pin
      #define ENABLED_SERIAL
      
      // Serial output baud rate (for debug prints and serial gateway)
      #define BAUD_RATE 115200
      
      
      /**********************************
      *  Over the air firmware updates
      ***********************************/
      
      // The following define enables the safe over-the-air firmware update feature
      // which requires external flash and the DualOptiBoot bootloader.
      // Note: You can still have OTA FW updates without external flash but it
      // requires the MYSBootloader and disabled MY_OTA_FIRMWARE_FEATURE
      //#define MY_OTA_FIRMWARE_FEATURE
      // Slave select pin for external flash
      #define MY_OTA_FLASH_SS 8
      // Flash jdecid
      #define MY_OTA_FLASH_JDECID 0x1F65
      
      
      /**********************************
      *  Information LEDs blinking
      ***********************************/
      // This feature enables LEDs blinking on message receive, transmit
      // or if some error occured. This was commonly used only in gateways,
      // but now can be used in any sensor node. Also the LEDs can now be
      // disabled in the gateway.
      
      // #define WITH_LEDS_BLINKING
      
      // The following setting allows you to inverse the blinking feature WITH_LEDS_BLINKING
      // When WITH_LEDS_BLINKING_INVERSE is enabled LEDSs are normally turned on and switches
      // off when blinking
      
      //#define WITH_LEDS_BLINKING_INVERSE
      
      
      // default LEDs blinking period in milliseconds
      #define DEFAULT_LED_BLINK_PERIOD 300
      // The RX LED default pin
      #define DEFAULT_RX_LED_PIN 6
      // The TX LED default pin
      #define DEFAULT_TX_LED_PIN 5
      // The Error LED default pin
      #define DEFAULT_ERR_LED_PIN 4
      
      
      /**********************************
      *  Message Signing Settings
      ***********************************/
      // Disable to completly disable signing functionality in library
      //#define MY_SIGNING_FEATURE
      
      // Define a suitable timeout for a signature verification session
      // Consider the turnaround from a nonce being generated to a signed message being received
      // which might vary, especially in networks with many hops. 5s ought to be enough for anyone.
      #define MY_VERIFICATION_TIMEOUT_MS 5000
      
      // Enable to turn on whitelisting
      // When enabled, a signing node will salt the signature with it's unique signature and nodeId.
      // The verifying node will look up the sender in a local table of trusted nodes and
      // do the corresponding salting in order to verify the signature.
      // For this reason, if whitelisting is enabled on one of the nodes in a sign-verify pair, both
      // nodes have to implement whitelisting for this to work.
      // Note that a node can still transmit a non-salted message (i.e. have whitelisting disabled)
      // to a node that has whitelisting enabled (assuming the receiver does not have a matching entry
      // for the sender in it's whitelist)
      //#define MY_SECURE_NODE_WHITELISTING
      
      // MySigningAtsha204 default setting
      #define MY_ATSHA204_PIN 17 // A3 - pin where ATSHA204 is attached
      
      // MySigningAtsha204Soft default settings
      #define MY_RANDOMSEED_PIN 7 // A7 - Pin used for random generation (do not connect anything to this)
      
      // Key to use for HMAC calculation in MySigningAtsha204Soft (32 bytes)
      #define MY_HMAC_KEY 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
      
      /**********************************
      *  NRF24L01 Driver Defaults
      ***********************************/
      #define RF24_CE_PIN		   9
      #define RF24_CS_PIN		   10
      #define RF24_PA_LEVEL 	   RF24_PA_MAX
      #define RF24_PA_LEVEL_GW   RF24_PA_LOW
      // RF channel for the sensor net, 0-127
      #define RF24_CHANNEL	   76
      //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
      //#define RF24_DATARATE 	   RF24_1MBPS
      #define RF24_DATARATE 	   RF24_250KBPS
      // This is also act as base value for sensor nodeId addresses. Change this (or channel) if you have more than one sensor network.
      #define RF24_BASE_RADIO_ID ((uint64_t)0xA8A8E1FC00LL)
      
      // Enable SOFTSPI for NRF24L01 when using the W5100 Ethernet module
      //#define SOFTSPI
      #ifdef SOFTSPI
      	// Define the soft SPI pins used for NRF radio
      	const uint8_t SOFT_SPI_MISO_PIN = 16;
          const uint8_t SOFT_SPI_MOSI_PIN = 15;
          const uint8_t SOFT_SPI_SCK_PIN = 14;
      #endif
      
      
      /**********************************
      *  RFM69 Driver Defaults
      ***********************************/
      // Default network id. Use the same for all nodes that will talk to each other
      #define RFM69_NETWORKID     100
      
      // Default frequency to use. This must match the hardware version of the RFM69 radio (uncomment one):
      // #define RFM69_FREQUENCY   RF69_433MHZ
      #define RFM69_FREQUENCY   RF69_868MHZ
      //#define FREQUENCY     RF69_915MHZ
      
      // Enable this for encryption of packets
      //#define RFM69_ENABLE_ENCRYPTION
      #define RFM69_ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
      
      
      
      
      #endif
      
      

      And here is the NON WORKING MyConfig.h file.

      /**
       * 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.
       */
      
      
      #ifndef MyConfig_h
      #define MyConfig_h
      #include <stdint.h>
      
      // Enable debug flag for debug prints. This will add a lot to the size of the final sketch but good
      // to see what is actually is happening when developing
      #define DEBUG
      
      // Enable MY_DEBUG_VERBOSE flag for verbose debug prints. Requires DEBUG to be enabled.
      // This will add even more to the size of the final sketch!
      #define MY_DEBUG_VERBOSE
      
      // Disable this line, If you are using TX(1), RX(0) as normal I/O pin
      #define ENABLED_SERIAL
      
      // Serial output baud rate (for debug prints and serial gateway)
      #define BAUD_RATE 115200
      
      
      /**********************************
      *  Over the air firmware updates
      ***********************************/
      
      // The following define enables the safe over-the-air firmware update feature
      // which requires external flash and the DualOptiBoot bootloader.
      // Note: You can still have OTA FW updates without external flash but it
      // requires the MYSBootloader and disabled MY_OTA_FIRMWARE_FEATURE
      //#define MY_OTA_FIRMWARE_FEATURE
      // Slave select pin for external flash
      #define MY_OTA_FLASH_SS 8
      // Flash jdecid
      #define MY_OTA_FLASH_JDECID 0x1F65
      
      
      /**********************************
      *  Information LEDs blinking
      ***********************************/
      // This feature enables LEDs blinking on message receive, transmit
      // or if some error occured. This was commonly used only in gateways,
      // but now can be used in any sensor node. Also the LEDs can now be
      // disabled in the gateway.
      
      #define WITH_LEDS_BLINKING
      
      // The following setting allows you to inverse the blinking feature WITH_LEDS_BLINKING
      // When WITH_LEDS_BLINKING_INVERSE is enabled LEDSs are normally turned on and switches
      // off when blinking
      
      //#define WITH_LEDS_BLINKING_INVERSE
      
      
      // default LEDs blinking period in milliseconds
      #define DEFAULT_LED_BLINK_PERIOD 300
      // The RX LED default pin
      #define DEFAULT_RX_LED_PIN 6
      // The TX LED default pin
      #define DEFAULT_TX_LED_PIN 5
      // The Error LED default pin
      #define DEFAULT_ERR_LED_PIN 4
      
      
      /**********************************
      *  Message Signing Settings
      ***********************************/
      // Disable to completly disable signing functionality in library
      //#define MY_SIGNING_FEATURE
      
      // Define a suitable timeout for a signature verification session
      // Consider the turnaround from a nonce being generated to a signed message being received
      // which might vary, especially in networks with many hops. 5s ought to be enough for anyone.
      #define MY_VERIFICATION_TIMEOUT_MS 5000
      
      // Enable to turn on whitelisting
      // When enabled, a signing node will salt the signature with it's unique signature and nodeId.
      // The verifying node will look up the sender in a local table of trusted nodes and
      // do the corresponding salting in order to verify the signature.
      // For this reason, if whitelisting is enabled on one of the nodes in a sign-verify pair, both
      // nodes have to implement whitelisting for this to work.
      // Note that a node can still transmit a non-salted message (i.e. have whitelisting disabled)
      // to a node that has whitelisting enabled (assuming the receiver does not have a matching entry
      // for the sender in it's whitelist)
      //#define MY_SECURE_NODE_WHITELISTING
      
      // MySigningAtsha204 default setting
      #define MY_ATSHA204_PIN 17 // A3 - pin where ATSHA204 is attached
      
      // MySigningAtsha204Soft default settings
      #define MY_RANDOMSEED_PIN 7 // A7 - Pin used for random generation (do not connect anything to this)
      
      // Key to use for HMAC calculation in MySigningAtsha204Soft (32 bytes)
      #define MY_HMAC_KEY 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
      
      /**********************************
      *  NRF24L01 Driver Defaults
      ***********************************/
      #define RF24_CE_PIN		   9
      #define RF24_CS_PIN		   10
      #define RF24_PA_LEVEL 	   RF24_PA_MAX
      #define RF24_PA_LEVEL_GW   RF24_PA_LOW
      // RF channel for the sensor net, 0-127
      #define RF24_CHANNEL	   76
      //RF24_250KBPS for 250kbs, RF24_1MBPS for 1Mbps, or RF24_2MBPS for 2Mbps
      #define RF24_DATARATE 	   RF24_250KBPS
      // This is also act as base value for sensor nodeId addresses. Change this (or channel) if you have more than one sensor network.
      #define RF24_BASE_RADIO_ID ((uint64_t)0xA8A8E1FC00LL)
      
      // Enable SOFTSPI for NRF24L01 when using the W5100 Ethernet module
      //#define SOFTSPI
      #ifdef SOFTSPI
      	// Define the soft SPI pins used for NRF radio
      	const uint8_t SOFT_SPI_MISO_PIN = 16;
          const uint8_t SOFT_SPI_MOSI_PIN = 15;
          const uint8_t SOFT_SPI_SCK_PIN = 14;
      #endif
      
      
      /**********************************
      *  RFM69 Driver Defaults
      ***********************************/
      // Default network id. Use the same for all nodes that will talk to each other
      #define RFM69_NETWORKID     100
      
      // Default frequency to use. This must match the hardware version of the RFM69 radio (uncomment one):
      // #define RFM69_FREQUENCY   RF69_433MHZ
      #define RFM69_FREQUENCY   RF69_868MHZ
      //#define FREQUENCY     RF69_915MHZ
      
      // Enable this for encryption of packets
      //#define RFM69_ENABLE_ENCRYPTION
      #define RFM69_ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
      
      #endif
      

      I don't understand why the second one makes the module reboot constantly. However, I am happy now that it is working but I wanted to share my experience and maybe it can help others to troubleshoot this and understand why this was happening as I am sure I will not be the only one having that issue in the future.

      I do appreciate all the help so far and I wouldn't have been able to solve it without your help Yveaux. THANK YOU!!!

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      Thinking about the data rate... at the moment I don't have any other sensors powered on at all which means I am just installing the wifi gateway. There should be no mismatch in the data rates unless I would have at least one sensor with a different data rate causing the issue. The Wifi gateway should boot up successfully without any client sensor.

      Is my thinking correct?

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I tried multiple different data rates when I created the ethernet gateway from mysensors. It didn't work at all in terms of connecting the sensors to the gateway while the gateway was visible in Vera until I made them all the same data rate. If I recall correctly I got them working with both at 250kpbs or 1Mbps.

      Since I tried to build the wifi gateway I haven't checked the data rates. I am going to check this next.

      In regards to your other questions:
      I purchased 4 radios from Amazon:
      http://www.amazon.com/nRF24L01-Wireless-Transceiver-Arduino-Compatible/dp/B00E594ZX0/ref=cm_cr_pr_product_top?ie=UTF8

      Yes, those radios work totally fine with the ethernet gateway from mysensors and I had two sensors attached. My goal is to have a wireless gateway so I can place it anywhere in the house and your great work would enable me to do so. 😉

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      Thanks a lot. This version provides much more details but at this stage of my learning progress I am not able to understand all those registers where I have to rely on your help guys. I assume that my password is not being exposed here.

      ESP8266 MySensors Gateway
      Connecting to ZEUS
      scandone
      f 0, scandone
      .add 0
      aid 1
      pm open phy_2,type:2 0 0
      cnt

      connected with ZEUS, channel 6
      dhcp client start...
      ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
      .Connected!
      IP: 192.168.1.222
      write_register(0x04,0x5F)
      write_register(0x06,0x23)
      write_register(0x06,0x03)
      write_register(0x00,0x0E)
      write_register(0x07,0x70)
      write_register(0x05,0x4C)
      write_register(0x00,0x0E)
      STATUS 0x0E RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
      RX_ADDR_P0-1 0x0E0E0E0E0E 0707070707
      RX_ADDR_P2-5 0xFF C4 C5 C6
      TX_ADDR 0x0E0E0E0E0E
      RX_PW_P0-6 0x00 00 20 00 00 00
      EN_AA 0x3B
      EN_RXADDR 0x07
      RF_CH 0x4C
      RF_SETUP 0x03
      CONFIG 0x0E
      DYNPD/FEATURE 0x3F 06
      Data Rate 1MBPS
      Model nRF24L01+
      CRC Length 16 bits
      PA Power PA_LOW
      write_register(0x01,0x3F)
      write_register(0x01,0x3B)
      write_register(0x1D,0x06)
      FEATURE=0x06
      write_register(0x1C,0x3F)
      write_register(0x05,0x4C)
      write_register(0x06,0x0
      ets Jan 8 2013,rst cause:4, boot mode:(3,7)

      wdt reset
      load 0x4010f000, len 1264, room 16
      tail 0
      chksum 0x42
      csum 0x42
      ~ld

      ESP8266 MySensors Gateway
      Connecting to ZEUS
      scandone
      f 0, scandone
      .add 0
      aid 1
      pm open phy_2,type:2 0 0
      cnt

      connected with ZEUS, channel 6
      dhcp client start...
      ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
      .Connected!
      IP: 192.168.1.222
      write_register(0x04,0x5F)
      write_register(0x06,0x23)
      write_register(0x06,0x03)
      write_register(0x00,0x0E)
      write_register(0x07,0x70)
      write_register(0x05,0x4C)
      write_register(0x00,0x0E)
      STATUS 0x0E RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
      RX_ADDR_P0-1 0x0E0E0E0E0E 0707070707
      RX_ADDR_P2-5 0xFF C4 C5 C6
      TX_ADDR 0x0E0E0E0E0E
      RX_PW_P0-6 0x00 00 20 00 00 00
      EN_AA 0x3B
      EN_RXADDR 0x07
      RF_CH 0x4C
      RF_SETUP 0x03
      CONFIG 0x0E
      DYNPD/FEATURE 0x3F 06
      Data Rate 1MBPS
      Model nRF24L01+
      CRC Length 16 bits
      PA Power PA_LOW
      write_register(0x01,0x3F)
      write_register(0x01,0x3B)
      write_register(0x1D,0x06)
      FEATURE=0x06
      write_register(0x1C,0x3F)
      write_register(0x05,0x4C)
      write_register(0x06,0x0
      ets Jan 8 2013,rst cause:4, boot mode:(3,7)

      wdt reset
      load 0x4010f000, len 1264, room 16
      tail 0
      chksum 0x42
      csum 0x42
      ~ld

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I just replaced the NRF with a new NRF and then again as I have 4 total. With every single one the same error.

      The wiring matches exactly the picture from mysensors.

      This is driving me crazy...

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      The only changes to the sketch are the SSID, the pass and the debug line

      Serial.setDebugOutput(true);

      as instructed. No other changes were made.

      Here the the debug output....you will see multiple resets in a row based on the internal watchdog timer.

      ESP8266 MySensors Gateway
      Connecting to MYWIFI
      scandone
      f 0, scandone
      .add 0
      aid 1
      pm open phy_2,type:2 0 0
      cnt

      connected with MYWIFI, channel 6
      dhcp client start...
      ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
      .Connected!
      IP: 192.168.1.222

      ets Jan 8 2013,rst cause:4, boot mode:(3,6)

      wdt reset
      load 0x4010f000, len 1264, room 16
      tail 0
      chksum 0x42
      csum 0x42
      ~ld

      ESP8266 MySensors Gateway
      Connecting to MYWIFI
      scandone
      f 0, scandone
      .add 0
      aid 1
      pm open phy_2,type:2 0 0
      cnt

      connected with MYWIFI, channel 6
      dhcp client start...
      .......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
      .Connected!
      IP: 192.168.1.222

      ets Jan 8 2013,rst cause:4, boot mode:(3,6)

      wdt reset
      load 0x4010f000, len 1264, room 16
      tail 0
      chksum 0x42
      csum 0x42
      ~ld

      ESP8266 MySensors Gateway
      Connecting to MYWIFI
      scandone
      f 0, scandone
      .add 0
      aid 1
      pm open phy_2,type:2 0 0
      cnt

      connected with MYWIFI, channel 6
      dhcp client start...
      ......ip:192.168.1.222,mask:255.255.255.0,gw:192.168.1.1
      .Connected!
      IP: 192.168.1.222

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I even reflashed the ESP8266 with those instructions and then loaded the mysensors ino but still the same outcome. 😞

      http://benlo.com/esp8266/esp8266QuickStart.html

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I followed the instructions exactly as shown here and I purchased that exact equipment.

      http://www.mysensors.org/build/esp8266_gateway

      nodemcu.jpg

      I even powered the NRF24L01+ from a different power source just to make sure that power fluctuation is not the issue but it didn't make any difference.

      I even tried transfer rates 115k, 57k and 9600 Baud but none of that made any difference either.

      I also downloaded the flash eeprom ino program to clear all the data but again, no difference.

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I tried my Home Wifi and my Cell Hotspot. The crashes occur on both wifi networks. 😞

      posted in Development
      Pseudomizer
      Pseudomizer
    • RE: ESP8266 WiFi gateway port for MySensors

      I missed one line of error code above:

      ets Jan 8 2013,rst cause:4, boot mode:(3,6)

      posted in Development
      Pseudomizer
      Pseudomizer