Arduino Library for Oregon sensors (433Mhz)
-
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/x4ifu4your comments are welcome
-
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
-
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'
-
Cool. Thank you for this nice addition!
-
you're welcome
it's not finish,but after my vacations, I will finish it
-
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
-
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#L55You 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
-
@hek thanks for your answer.
If I understood, I can use save & load state if:
- I start the ID from EEPROM_LOCAL_CONFIG_ADDRESS
Ex:
for (i=EEPROM_LOCAL_CONFIG_ADDRESS; i<COUNT_OREGON_SENSORS; i++){
- 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 ?
- I start the ID from EEPROM_LOCAL_CONFIG_ADDRESS
-
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)
-
Ok thanks.
I will do some enhancements before post my pool request.bye
-
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
-
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
-
Arduino has accepted my library
it available in libraries manager on the arduino IDE
-
Just for fun : https://youtu.be/2Um5PQ_tZXA