Commit Graph

471 Commits

Author SHA1 Message Date
Sascha
7a524fe456
Update README.md
Added section on USE_ESPNOW.
2022-07-23 01:21:35 +02:00
Sascha
62c247275a Applied changes to FDRS_Sensor and FDRS_Gateway folders 2022-07-23 01:09:58 +02:00
Sascha
ae85886e65 added #define USE_ESPNOW to gateway code
Including sections which are ESPNOW specific only if #define USE_ESPNOW is enabled.
2022-07-23 01:05:01 +02:00
Sascha
5e85269373 Clean up of #72
- moved configuration checkup to external file to make sensor and gateway files smaller.
- for sensors the config now only is shown if the sensor does NOT return from Deep Sleep. For example when pressing the reset button or after a crash.
- for gateways the configuration is shown once and also can be forced to be shown with a reset. Code should work for ESP32 and ESP8266 - have only tested it with ESP32.
- fixed issue in fdrs_functions.h - if MQTT_AUTH was enabled but WIFI disabled, the compile crashed.
2022-07-22 23:41:52 +02:00
Timm Bogner
62685452ad
Merge pull request #72 from Gulpman/dev
Dev - partial fix of #71
2022-07-22 01:55:23 -05:00
Sascha
5027623cb8 Fixing configuration system - part 2: gateways
Further work on #71 :
- Added config code to fdrs_functions.h.
- Commented all local config settings -> global config settings will be taken by default.
- added a debugConfig function, to check from where settings have been taken. May be moved to a place where sensors and gateways can share code as this is needed only once. For the sake of simplicity the function made it into fdrs_sensor.h and fdrs_functions.h Needs to be refined, as there is redundancy right now.
2022-07-21 16:24:01 +02:00
Sascha
cfa57e388b Fixing configuration system - part 1: sensors
Fixed the configuration system for sensor nodes. Gateway nodes are still to be fixed (work still in process :) )
This has been addressed in #71

Important: For this system to work and make the onboarding easier for new users, global settings must be used by default and therefore local settings must be commented out by default.
2022-07-21 14:01:51 +02:00
Sascha
d6201fdd6d Update fdrs_sensor.h
Missed one :)
2022-07-21 12:17:16 +02:00
Sascha
c27bffe1ec Further debug enhancements
Added Id and data content to debug message.
Also changed the order to meet the serial debug output of the gateway - this way it is much easier to check if what has been sent is what has been received.
2022-07-21 12:11:35 +02:00
Sascha
b73b7a4b1c Added LoRa Debug info for BAND and SF to all nodes for better debugging
As there is still a lot of redundancy in the project, in a first step I added the debug messages in each of the places.
2022-07-21 11:46:16 +02:00
Sascha
7526439d85 Return random vaule for sensor nodes
the return value in the sensor sketches was missing the random function. Fixed that.
2022-07-21 11:06:49 +02:00
Sascha
7c15bdf675 Update fdrs_globals.h
No change to the content - just putting blocks together for simpler overview.
2022-07-21 10:58:48 +02:00
Sascha
c0e28b0403 LoRa debug: show band and sf for better debugging 2022-07-20 21:56:19 +02:00
Timm Bogner
a8339f1136
Merge branch 'main' into dev 2022-07-20 13:40:12 -05:00
Timm Bogner
17e33b82af
Update README.md 2022-07-20 13:28:09 -05:00
Timm Bogner
699d7a2840 shwoop 2022-07-19 10:54:55 -05:00
Timm Bogner
5adb4a6728
Update README.md 2022-07-19 10:49:25 -05:00
Timm Bogner
1ce8a3eb2b dink
Changed the spammer a little and adjusted some other stuff.
2022-07-19 10:08:24 -05:00
Timm Bogner
6a5e7acd13 sensors are go 2022-07-19 08:39:06 -05:00
Timm Bogner
d3e137ab8b unifying gateways etc
more to come
2022-07-18 20:42:42 -05:00
Timm Bogner
c5f9064f03
Merge pull request #64 from Gulpman/dev
Small improvement to debug messages in fdrs_sensor.cpp
2022-07-15 10:04:17 -05:00
Sascha
087b9f30c8 house keeping
Added some comments for easier browsing through the source and corrected a type.
2022-07-15 14:09:40 +02:00
Sascha
dbf6d5b082 Removed double-include of fdrs_gateway_config.h
fdrs_gateway_config. h was included twice. I also simplified th USE_LED configuration block (was defined twice, could be done in one block.
2022-07-15 10:02:17 +02:00
Sascha
454365d453 House keeping on keywords.txt, library.properties and README.md
- added missing categories in keywords.txt
- added dependency of ArduinoJson in library.properties (I didn't add LoRa and PubSubClient but think they should go there as well)
- reformatted paragraph on dependencies  as list for better readability
2022-07-15 09:41:03 +02:00
Sascha
3878c27725 Fixed #59
Fixed #59 with the help of aviateur17. Explanation here: https://github.com/timmbogner/Farm-Data-Relay-System/issues/59#issuecomment-1183915731
2022-07-14 15:29:54 +02:00
Sascha
e958b328a0 Update fdrs_globals.h
Added header comment
2022-07-14 14:39:20 +02:00
Sascha
54b21e9a3b Fixed unallowed extra tokens after #endif
Extra tokens at end of #endif directive are not allowed. Arudino IDE does not care but Platform IO does. The specification forbids is as well, so adding a comment behind the endif is a good compromise between overview and conformity.
2022-07-14 13:58:34 +02:00
Sascha
c6b16143a9 Replaced undefined sleep_time with seconds 2022-07-13 12:58:36 +02:00
Sascha
4b2892dd55 Small improvement to debug messages in fdrs_sensor.cpp
Just two small additions making debugging a little bit more convenient:

- Added value of data to FDRSBase::load
- Added additional text tp FDRSLoRa::init
2022-07-13 08:21:16 +02:00
Timm Bogner
16507eb25a
Merge pull request #62 from thefeiter/use-internal-ntp-api
Use internal NTP api
2022-07-12 15:35:09 -05:00
theFeiter
d1872b1d53 replace external ntp with internal ntp 2022-07-12 21:32:27 +02:00
Timm Bogner
b91920517f
Merge pull request #58 from Gulpman/dev
Bugfix: Updated fdrs_sensor.h of Universal_Sensor_beta
2022-07-12 08:41:47 -05:00
Sascha
0fd7a84dca Added support to choose either LoRa or ESPNow sensor
by defining USE_LORA or USE_ESPNOW the sensor is set up as exactly that.
2022-07-12 15:12:34 +02:00
Sascha
daf4adefd9 Debug helper :)
I find it very convenient for testing to have altering values within the sensor sketches, as it is easier to see if new values are arriving. Therefore replaced the fixed humidity value to a random value between 0-100.
2022-07-12 11:21:46 +02:00
Sascha
ef573a8f45 Bugfix: Updated fdrs_sensor.h of Universal_Sensor_beta
A "LORA" was missing in the definition for FDRS_... Lora settings which led to a compile error. Fixed.
2022-07-12 11:11:31 +02:00
Timm Bogner
d952081a22
Merge pull request #56 from thefeiter/buffer-log-writes
Buffer log writes before saving them to the file.
2022-07-11 22:03:46 -05:00
Timm Bogner
5822d8e0d9 Merge branch 'dev' into okay-wait-now-i-really-got-this 2022-07-11 18:59:23 -05:00
Timm Bogner
7a6a411547
Merge pull request #57 from Gulpman/dev
Dev: Cleaned up naming of configuration files
2022-07-11 18:29:41 -05:00
Timm Bogner
d37fdec9fc moved to its folder 2022-07-11 12:54:01 -05:00
Sascha
0d7c767070 Added example from @Devilbinder to the repo
Added the example sketch.
At the moment this resides in a separate folder but after the Universal_Gateway has been finished this could be moved into the Full_System_Example or a generic Gateway_Examples folder.
2022-07-11 16:47:15 +02:00
Sascha
9ab5be2258 Update keywords.txt
Added further entries to keywords.txt
2022-07-11 16:29:16 +02:00
Sascha
700f87b6a4 houeskeeping in Universal Sensor's config file
Put FDRS_DEBUG to top
Some formatting and further explanations on the settings.
Uncommented local LoRa settings, so by default the global fdrs settings are taken.
This makes the setup process easier and less error-prone.
2022-07-11 16:25:03 +02:00
Sascha
acf53e6ed5 Refactored gateway config files
Refactored fdrs_config.h to fdrs_gateway_config.h
This way it is directly visible from within a folder, what the config is for.
2022-07-11 16:07:46 +02:00
Sascha
249904fbc4 Refactoring for easier understanding while coding
Step one: refactor sensor_setup.h -> fdrs_sensor.h
2022-07-11 15:59:47 +02:00
Sascha
52f0d0c9ce
Merge branch 'timmbogner:dev' into dev 2022-07-11 13:45:23 +02:00
theFeiter
85b1e16144 add newline 2022-07-11 12:55:45 +02:00
theFeiter
92c17d3567 release logbuffer every 10 seconds if not empty 2022-07-11 12:50:52 +02:00
theFeiter
48d2a6f012 only count seconds_since_reset when logging is enabled 2022-07-11 12:15:55 +02:00
Timm Bogner
3979c09dd7 changed reading_id to uint16_t 2022-07-10 20:38:43 -05:00
theFeiter
f29e7ce916 add defined filename 2022-07-10 19:50:47 +02:00