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. Troubleshooting
  3. How to use the Development branch for Sensor and Gateway

How to use the Development branch for Sensor and Gateway

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 4 Posters 3.2k Views 2 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.
  • ATXCoderA Offline
    ATXCoderA Offline
    ATXCoder
    wrote on last edited by
    #1

    I got past all my recent issues and actually got the "MQTT Gateway Client" using the development-branch of the library (https://github.com/mysensors/Arduino/tree/development). If I clear out my entire sketchbook folder and then place the "libraries" and "hardware" folders ONLY into the Sketchbook location, the gateway works fine. The issue is I can't make the DallasTemp Example sketch work. If I open the example and verify it, it compiles just fine. I can even upload it. When I start it though it contacts the gateway for a ID and obviously doesn't get one (I am using MYSController to view the controller logs and test) as my understanding is the Controller assigns the ID.

    If I clear everything out again from the sketch folder and use the 1.5 master library I can actually define a ID in the DallasTemp sketch:

    #define NODE_ID 12
    

    I also noticed that in the Setup() there seems to be a lot more code in the 1.5 Master that is missing in the Development DallasTemp Example.

    void setup()  
    { 
      // Startup up the OneWire library
      sensors.begin();
      // requestTemperatures() will not block current thread
      sensors.setWaitForConversion(false);
    
      // Startup and initialize MySensors library. Set callback for incoming messages. 
      gw.begin(NULL, NODE_ID, false);
    
      // Send the sketch version information to the gateway and Controller
      gw.sendSketchInfo("Temperature Sensor", "1.1");
    
      // Fetch the number of attached temperature sensors  
      numSensors = sensors.getDeviceCount();
    
      // Present all sensors to controller
      for (int i=0; i<numSensors && i<MAX_ATTACHED_DS18B20; i++) {   
         gw.present(i, S_TEMP);
      }
    }
    

    If I try to place MySensor gw(); in the Dallas Temp Example from the DEV library I get the following error:

    Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"
    
    Build options changed, rebuilding all
    
    Using library SPI in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI 
    
    Using library MySensors in folder: C:\Users\Thomas\Documents\Arduino\libraries\MySensors 
    
    Using library DallasTemperature in folder: C:\Users\Thomas\Documents\Arduino\libraries\DallasTemperature (legacy)
    
    Using library OneWire in folder: C:\Users\Thomas\Documents\Arduino\libraries\OneWire (legacy)
    
    
    
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10605 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard -IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI -IC:\Users\Thomas\Documents\Arduino\libraries\MySensors -IC:\Users\Thomas\Documents\Arduino\libraries\DallasTemperature -IC:\Users\Thomas\Documents\Arduino\libraries\OneWire C:\Users\Thomas\AppData\Local\Temp\build8610461630186494850.tmp\DallasTemperatureSensor.cpp -o C:\Users\Thomas\AppData\Local\Temp\build8610461630186494850.tmp\DallasTemperatureSensor.cpp.o 
    
    DallasTemperatureSensor.ino:53:1: error: 'MySensor' does not name a type
    'MySensor' does not name a type
    
    

    To sum it all up
    I can build a sensor with a manually assigned ID using the MASTER library and then a MQTT Gateway Client with the DEVELOPMENT library (after clearing out the master library). Questions are:

    1. How exactly do we use the DEV library? Do you create the Gateway using DEV and the Sensors using Master?

    2. Do you install the Master first and then the DEV over it? (I can't seem to get that to work in Windows 8.1)

    3. If you build both the Sensor and Gateway using the DEV library, then how do you define a NODE_ID in the sensor sketch? If I build both Sensor and Gateway using DEV then the sensor just sits there asking for a ID that it will never get (I am using OpenHab as my controller and right now it seems easier to just manually assign each sensor a ID).

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by
      #2

      @ATXCoder

      Development is what it says, we are using it for active development of core.. It should compile fine (we have jenkins for checking that for us) but there might be some other problems here and there, that won't show up at compile time.

      1 Reply Last reply
      0
      • hekH Offline
        hekH Offline
        hek
        Admin
        wrote on last edited by
        #3
        1. You should be able to mix versions.
        2. You must remove the whole MySensors library folder and replace it with the dev-version.
        3. Add #define MY_NODE_ID xxx before the inclusion of MySensor.h
        1 Reply Last reply
        0
        • rmtuckerR Offline
          rmtuckerR Offline
          rmtucker
          wrote on last edited by
          #4

          Are there any instructions on how to use the development version with an Arduino gateway with the wiznet W1500 shield and nrf radio?
          The Config file is different and there now seems to be a dedicated sketch for the W1500.
          I would like to update to some of the newer features but i can not understand what needs to be altered in the config file etc.
          The instructions on the website are only for the stable version i presume.

          1 Reply Last reply
          1
          • hekH Offline
            hekH Offline
            hek
            Admin
            wrote on last edited by
            #5

            @rmtucker

            The configuration is in the sketch. Unless you want to do something very exotic.

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


            11

            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