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 1.7k 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.

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

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

        Nca78N 1 Reply Last reply
        0
        • simboS simbo

          @Nca78

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

          Nca78N Offline
          Nca78N 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?

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

                YveauxY Offline
                YveauxY 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
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                18

                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