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. Development
  3. Juggling different MySensor versions?

Juggling different MySensor versions?

Scheduled Pinned Locked Moved Development
18 Posts 8 Posters 5.4k Views 8 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.
  • hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #2

    Git is awesome and fast for switching branches.
    Having Eclipse/Arduino IDE pointing to the source-tree makes it really easy.

    1 Reply Last reply
    2
    • DidiD Offline
      DidiD Offline
      Didi
      wrote on last edited by
      #3

      @hek
      Can you give some more info

      if (knowledge == 0) { use BRAIN; use GOOGLE;use SEARCH; } else {make POST;}

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

        Crash course:

        1. Install git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
        2. Clone the repository:
          > git clone https://github.com/mysensors/Arduino.git
        3. Open Arduino IDE/Preferences. Point the sketchbook location to the libraries folder of the cloned repository.

        To switch between master/development just go to the cloned repository and do

        > git checkout development
        or
        > git checkout master

        Guess there are GUI-Git tools that do this without typing in a shell as well.

        1 Reply Last reply
        1
        • TD22057T Offline
          TD22057T Offline
          TD22057
          Hardware Contributor
          wrote on last edited by
          #5

          I think what @hek is suggesting is something like this: clone the repository and branches (dev, main, etc) to your local machine. Point the IDE at that location. Then when you want to do a build with a different version, use git to switch the repository to the other branch. And better yet, tag the software you use for a specific sensor deployment when you build it, then when you need to go back to it, checkout the tag.

          If that doesn't sound good, you may want to look at other IDE/build choices. Any of the Arduino make/cmake systems will let you explicitly point a compile step at different directories to pick up specific versions of the software. So you can have all the branches checked out and sitting there on a disk and just point at different ones as part of the build process. You should still use tags to track exactly what you deployed, but it lets you keep all the versions of the library you're using visible and it may be less confusing than trying to remember to switch the code using git. It's just more expensive (in time) to set up the initial build system to use this vs the Arduino IDE.

          DidiD 1 Reply Last reply
          0
          • TD22057T TD22057

            I think what @hek is suggesting is something like this: clone the repository and branches (dev, main, etc) to your local machine. Point the IDE at that location. Then when you want to do a build with a different version, use git to switch the repository to the other branch. And better yet, tag the software you use for a specific sensor deployment when you build it, then when you need to go back to it, checkout the tag.

            If that doesn't sound good, you may want to look at other IDE/build choices. Any of the Arduino make/cmake systems will let you explicitly point a compile step at different directories to pick up specific versions of the software. So you can have all the branches checked out and sitting there on a disk and just point at different ones as part of the build process. You should still use tags to track exactly what you deployed, but it lets you keep all the versions of the library you're using visible and it may be less confusing than trying to remember to switch the code using git. It's just more expensive (in time) to set up the initial build system to use this vs the Arduino IDE.

            DidiD Offline
            DidiD Offline
            Didi
            wrote on last edited by
            #6

            @TD22057
            I understand that,what was confusing me was the Eclipse/Arduino IDE thing

            if (knowledge == 0) { use BRAIN; use GOOGLE;use SEARCH; } else {make POST;}

            1 Reply Last reply
            0
            • mfalkviddM Offline
              mfalkviddM Offline
              mfalkvidd
              Mod
              wrote on last edited by mfalkvidd
              #7

              Thanks for the feedback. I'll go for the git solution.

              1 Reply Last reply
              1
              • fetsF Offline
                fetsF Offline
                fets
                wrote on last edited by
                #8

                Can somebody gives a way to make a diff between my local version and the online repository.

                When I use git diff (or git status), it only gives differences between local files and local repository (stuck at the version/date when I cloned it).
                My purpose is to compare my version vs online development branch.

                mfalkviddM 1 Reply Last reply
                0
                • fetsF fets

                  Can somebody gives a way to make a diff between my local version and the online repository.

                  When I use git diff (or git status), it only gives differences between local files and local repository (stuck at the version/date when I cloned it).
                  My purpose is to compare my version vs online development branch.

                  mfalkviddM Offline
                  mfalkviddM Offline
                  mfalkvidd
                  Mod
                  wrote on last edited by
                  #9

                  @fets git fetch --all will update your local repository with the changes on github.
                  You can then use

                  git diff origin/master localbranch
                  

                  or similar to compare.

                  fetsF 1 Reply Last reply
                  0
                  • mfalkviddM mfalkvidd

                    @fets git fetch --all will update your local repository with the changes on github.
                    You can then use

                    git diff origin/master localbranch
                    

                    or similar to compare.

                    fetsF Offline
                    fetsF Offline
                    fets
                    wrote on last edited by
                    #10

                    @mfalkvidd thanks. But is fetch only update local repository and not local files ? I wasn't sure

                    mfalkviddM 1 Reply Last reply
                    0
                    • fetsF fets

                      @mfalkvidd thanks. But is fetch only update local repository and not local files ? I wasn't sure

                      mfalkviddM Offline
                      mfalkviddM Offline
                      mfalkvidd
                      Mod
                      wrote on last edited by
                      #11

                      @fets not sure what you mean. The files are stored in the reprository (unless you have local changes that have not been committed).

                      fetsF 1 Reply Last reply
                      0
                      • mfalkviddM mfalkvidd

                        @fets not sure what you mean. The files are stored in the reprository (unless you have local changes that have not been committed).

                        fetsF Offline
                        fetsF Offline
                        fets
                        wrote on last edited by
                        #12

                        @mfalkvidd I use development version which is still evolving on github. BEFORE upgrading my local files, I would like to know the differences between my local version and the remote repo.

                        mfalkviddM 1 Reply Last reply
                        0
                        • fetsF fets

                          @mfalkvidd I use development version which is still evolving on github. BEFORE upgrading my local files, I would like to know the differences between my local version and the remote repo.

                          mfalkviddM Offline
                          mfalkviddM Offline
                          mfalkvidd
                          Mod
                          wrote on last edited by mfalkvidd
                          #13

                          @fets this should be sufficient:

                          git fetch --all # downloads all updates from github to the local git repository but does not update the current branch
                          git diff origin/development # shows difference between current branch/ref and development on github
                          
                          fetsF TheoLT 2 Replies Last reply
                          2
                          • mfalkviddM mfalkvidd

                            @fets this should be sufficient:

                            git fetch --all # downloads all updates from github to the local git repository but does not update the current branch
                            git diff origin/development # shows difference between current branch/ref and development on github
                            
                            fetsF Offline
                            fetsF Offline
                            fets
                            wrote on last edited by
                            #14

                            @mfalkvidd thanks.
                            I'll try next time i'll get repo files

                            1 Reply Last reply
                            1
                            • mfalkviddM mfalkvidd

                              @fets this should be sufficient:

                              git fetch --all # downloads all updates from github to the local git repository but does not update the current branch
                              git diff origin/development # shows difference between current branch/ref and development on github
                              
                              TheoLT Offline
                              TheoLT Offline
                              TheoL
                              Contest Winner
                              wrote on last edited by
                              #15

                              @mfalkvidd I'm really spoiled by my employee. I use different images for different versions. 1.5 though is the one I currently use on OsX - thus no virtual image.

                              1 Reply Last reply
                              0
                              • alexsh1A Offline
                                alexsh1A Offline
                                alexsh1
                                wrote on last edited by
                                #16

                                I'm using Windows
                                I have two Arduino installations.
                                One folder called 'Arduino-old' - with MySensors 1.5.4
                                Another folder called Arduino - with MySensors 2.0

                                If I need to work on an older version, I rename 'Arduino' to 'Arduino-new' and 'Arduino-old' to 'Arduino'

                                I have the same version of Arduino installed in both folders 1.6.9

                                Works fine for me

                                B 1 Reply Last reply
                                0
                                • alexsh1A alexsh1

                                  I'm using Windows
                                  I have two Arduino installations.
                                  One folder called 'Arduino-old' - with MySensors 1.5.4
                                  Another folder called Arduino - with MySensors 2.0

                                  If I need to work on an older version, I rename 'Arduino' to 'Arduino-new' and 'Arduino-old' to 'Arduino'

                                  I have the same version of Arduino installed in both folders 1.6.9

                                  Works fine for me

                                  B Offline
                                  B Offline
                                  boozz
                                  wrote on last edited by
                                  #17

                                  Hi all,

                                  I'm struggling somewhat with the different MySensor versions as well on Windows machines (windows XP, windows 7 and windows 10).
                                  I'm using sync (sync.com) to keep all versions of sketches (and libraries) on 3 computers in synchronised. Works perfect for me.

                                  I write my sketches using the notebook -while sitting in the livingroom with my family- and do the real debugging and testing and deploying at 2 different locations (in the attick and in my shed). In the preferences.txt (Arduino IDE... C:\Users\xxxxxx\AppData\Local\Arduino15\preferences.txt) I've declared the sketschbook location as being the 'sync' location. This is on all 3 computers the same.

                                  Here the trouble begins for 2 different MySensor versions: the libraries are in this 'sync' location as well. Even if multiple Arduino IDE's are installed, the preferences.txt remains the same one, always pointing at the same sync location....and thus the same libraries....

                                  My goal is to have 2 different configurations to switch between MySensors 1.5 and 2.0 while keeping the 'sync' option I created before. Has anyone an idea how to accomplish that? Would git be and option (I have zero experience with this) and how should this be implemented in Windows? Or would the method described by @alexsh1 a simple but robust solution. Any help appreciated!

                                  Thanks!

                                  Boozz

                                  1 Reply Last reply
                                  0
                                  • mfalkviddM Offline
                                    mfalkviddM Offline
                                    mfalkvidd
                                    Mod
                                    wrote on last edited by
                                    #18

                                    I haven't tried yet, but I've been thinking about having two installations of the Arduino IDE. One for each MySensors version.

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


                                    16

                                    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