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. General Discussion
  3. How can I have a test environment separate from production

How can I have a test environment separate from production

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 2.2k Views 4 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.
  • simboS Offline
    simboS Offline
    simbo
    wrote on last edited by simbo
    #1

    Howdy,

    Title says it all. I'd like to have the ability to build and debug sensors with a test gateway and have a way to present to the production gateway when they've been tested.

    I am mostly using SenseBenders in my production setup, with a few Nano's as repeaters.

    Any ideas on how to be able to run up a sensor without it presenting to the production gateway?

    Why do I want to do this? I've had issues when using HomeAssistant keeping the state of test child sensors that change while I'm still working and debugging the sketch. I'd like to run a test HomeAssistant with the test gateway.

    Thanks,
    Simon.

    N 1 Reply Last reply
    1
    • simboS simbo

      Howdy,

      Title says it all. I'd like to have the ability to build and debug sensors with a test gateway and have a way to present to the production gateway when they've been tested.

      I am mostly using SenseBenders in my production setup, with a few Nano's as repeaters.

      Any ideas on how to be able to run up a sensor without it presenting to the production gateway?

      Why do I want to do this? I've had issues when using HomeAssistant keeping the state of test child sensors that change while I'm still working and debugging the sketch. I'd like to run a test HomeAssistant with the test gateway.

      Thanks,
      Simon.

      N Offline
      N Offline
      Nca78
      Hardware Contributor
      wrote on last edited by Nca78
      #2

      Hello, @simbo, I think the simple way is to just use a different radio channel for the test and the production environment ?

      simboS 1 Reply Last reply
      1
      • N Nca78

        Hello, @simbo, I think the simple way is to just use a different radio channel for the test and the production environment ?

        simboS Offline
        simboS Offline
        simbo
        wrote on last edited by simbo
        #3

        @Nca78

        Ok....That sounds reasonable. I am assuming that is set with the #define MY_RF24_CHANNEL?

        N 1 Reply Last reply
        0
        • simboS simbo

          @Nca78

          Ok....That sounds reasonable. I am assuming that is set with the #define MY_RF24_CHANNEL?

          N Offline
          N Offline
          Nca78
          Hardware Contributor
          wrote on last edited by
          #4

          @simbo yes it is :)

          1 Reply Last reply
          0
          • simboS Offline
            simboS Offline
            simbo
            wrote on last edited by
            #5

            Awesome...thanks.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mljbr4
              wrote on last edited by
              #6

              I have in mind to use a DIP switch on my sensors to switch between production and test. If the DIP switch is set to TEST I want to transmit on the Test Channel.

              Is it possible to set the MY_RF24_CHANNEL at run time, rather than at compile time?

              Y 1 Reply Last reply
              0
              • M mljbr4

                I have in mind to use a DIP switch on my sensors to switch between production and test. If the DIP switch is set to TEST I want to transmit on the Test Channel.

                Is it possible to set the MY_RF24_CHANNEL at run time, rather than at compile time?

                Y Offline
                Y Offline
                Yveaux
                Mod
                wrote on last edited by Yveaux
                #7

                @mljbr4 You can change it on the fly by calling

                RF24_setChannel( c );
                

                But, that's probably not going to work in your situation.... If you change it in before() it will be overwritten by the MySensors stack, if you do it in setup() you're already too late...

                What you could try is define a variable holding the channel, and make sure this gets set to the right value before MySensors starts, e.g.:

                uint8_t channel = 76;  // default
                #define MY_RF24_CHANNEL (channel)
                #include <MySensors.h>
                
                void before()
                {
                  channel = 90;  // debug channel
                }
                

                http://yveaux.blogspot.nl

                1 Reply Last reply
                3

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                13

                Online

                12.0k

                Users

                11.2k

                Topics

                113.4k

                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