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. My Project
  3. Arduino Library for Oregon sensors (433Mhz)

Arduino Library for Oregon sensors (433Mhz)

Scheduled Pinned Locked Moved My Project
14 Posts 2 Posters 12.6k Views 5 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.
  • M Offline
    M Offline
    mickaelh51
    wrote on last edited by mickaelh51
    #1

    Hi,
    I developed (modify) the originale Oregon library to be able to decode these sensors and send results in MySensors.
    Tested with : THGR228N and THGN132N
    It's a beta version ... many enhancements must be necessary, but it works
    https://goo.gl/x4ifu4

    your comments are welcome ;)

    Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
    Gateway: Arduino UNO :: W5100 :: MQTTClient
    Software: MySensors 1.6beta

    1 Reply Last reply
    5
    • M Offline
      M Offline
      mickaelh51
      wrote on last edited by mickaelh51
      #2

      Just before my vacations, I added some features ;)

      • Auto discover Oregon sensors ID
      • Save ID on Arduino EEPROM
      • Add battery level to MySensors

      My GitHub: https://goo.gl/x4ifu4

      Results on My OpenHAB
      oregon_openhab.png

      Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
      Gateway: Arduino UNO :: W5100 :: MQTTClient
      Software: MySensors 1.6beta

      1 Reply Last reply
      1
      • M Offline
        M Offline
        mickaelh51
        wrote on last edited by mickaelh51
        #3

        there is this issue when I want "verify code" in codebender (see below), but with arduino soft 1.6.7 it works fine

        MySensors_433Mhz_Oregon.ino:66:19: error: use of undeclared identifier 'digitalPinToInterrupt'
        

        CodeBender version

        Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
        Gateway: Arduino UNO :: W5100 :: MQTTClient
        Software: MySensors 1.6beta

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

          Cool. Thank you for this nice addition!

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mickaelh51
            wrote on last edited by
            #5

            you're welcome ;)
            it's not finish,but after my vacations, I will finish it ;)

            Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
            Gateway: Arduino UNO :: W5100 :: MQTTClient
            Software: MySensors 1.6beta

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

              Ha @hek I use EEPROM memory writing like database of Oregon's IDs.
              But your framework use also EEPROM memory.
              there is a potential issue (coflict) between them ?

              if yes, what other library can I use ? I'm thinking at that: http://playground.arduino.cc/Code/StackArray

              thanks in advance

              Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
              Gateway: Arduino UNO :: W5100 :: MQTTClient
              Software: MySensors 1.6beta

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

                Yes, there might very well be a conflict unless us keep your writes above
                https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MySensorCore.h#L55

                You can use the
                https://github.com/mysensors/Arduino/blob/development/libraries/MySensors/core/MySensorCore.h#L159
                If you only need to save 255 bytes you can user the saveState/loadState functions. Othervise keep above thisl ;)

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mickaelh51
                  wrote on last edited by mickaelh51
                  #8

                  @hek thanks for your answer.

                  If I understood, I can use save & load state if:

                  1. I start the ID from EEPROM_LOCAL_CONFIG_ADDRESS
                    Ex:
                  for (i=EEPROM_LOCAL_CONFIG_ADDRESS; i<COUNT_OREGON_SENSORS; i++){
                  
                  1. I write <255 bytes

                  is it exact ?

                  thanks in advance

                  PS (10 mins after):
                  I don't understand, indeed with this variable:

                  EEPROM_CONTROLLER_CONFIG_ADDRESS (EEPROM_ROUTES_ADDRESS+256)
                  

                  we are beyond the maximum ID (255) no ?

                  Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                  Gateway: Arduino UNO :: W5100 :: MQTTClient
                  Software: MySensors 1.6beta

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

                    The usage of loadState/saveState looks fine in your sketch.
                    By using them you won't overwrite anything important in the EEPROM.

                    (You only need to roll your own thing if you need to save more than 255 bytes)

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mickaelh51
                      wrote on last edited by
                      #10

                      Ok thanks.
                      I will do some enhancements before post my pool request.

                      bye

                      Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                      Gateway: Arduino UNO :: W5100 :: MQTTClient
                      Software: MySensors 1.6beta

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mickaelh51
                        wrote on last edited by
                        #11

                        Hi, I finished my first complete library Oregon.h with 2 examples (1 with MySensors / 2 without MySensors).

                        I will test it next week and I will post it here.
                        After many tests I post a pool request in official mysensors project on github.

                        Did you have time to test the first version ?

                        thanks in advance

                        Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                        Gateway: Arduino UNO :: W5100 :: MQTTClient
                        Software: MySensors 1.6beta

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mickaelh51
                          wrote on last edited by mickaelh51
                          #12

                          First version of my official arduino library : https://github.com/Mickaelh51/Arduino-Oregon-Library

                          I asked at Arduino software to put this new library (1.5 arduino format) in their official "libraries manager" ==> https://github.com/arduino/Arduino/issues/4371

                          If they ok to include my library, the arduino IDE will be able to check the available updates.

                          This 1.0.0 version has been tested with : Arduino UNO / 433Mhz receiver / Oregeon sensor THGR228N.

                          I'm already working on developement github branch with many enhancements.
                          Ex: Data Checksum / Others sensors (OWL Electricty Meter / WGR918 Annometer / RGR918 Rain Guage / UV138 / THGR918 Outside Temp-Hygro / BTHR918 Temp-Hygro-Baro)

                          if you want to test master or developement branch, I'm free to discuss with you.

                          good playing ;)

                          Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                          Gateway: Arduino UNO :: W5100 :: MQTTClient
                          Software: MySensors 1.6beta

                          1 Reply Last reply
                          1
                          • M Offline
                            M Offline
                            mickaelh51
                            wrote on last edited by
                            #13

                            Arduino has accepted my library ;)
                            it available in libraries manager on the arduino IDE

                            Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                            Gateway: Arduino UNO :: W5100 :: MQTTClient
                            Software: MySensors 1.6beta

                            1 Reply Last reply
                            2
                            • M Offline
                              M Offline
                              mickaelh51
                              wrote on last edited by mickaelh51
                              #14

                              Just for fun : https://youtu.be/2Um5PQ_tZXA

                              Controller: OpenVZ :: OpenHab 1.8.0 :: MQTT Broker
                              Gateway: Arduino UNO :: W5100 :: MQTTClient
                              Software: MySensors 1.6beta

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


                              8

                              Online

                              11.7k

                              Users

                              11.2k

                              Topics

                              113.0k

                              Posts


                              Copyright 2019 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