From e384c4f37b64d8af21eec74e6827b3517ae0cae2 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Wed, 31 May 2023 01:35:07 +0200 Subject: [PATCH] [Mois Labs] Naming things: Welcome, Mois Labs. - Add folder `moislabs` - Rename program to `beescale-yun.ino` - Improve README --- .github/workflows/platformio-ci.yaml | 25 ++-- doc/source/firmware/moislabs | 1 + doc/source/firmware/overview.md | 37 +++--- doc/source/resources-md.md | 5 +- doc/source/resources.rst | 11 +- .../beescale-yun}/.gitignore | 0 .../beescale-yun}/Makefile | 0 .../beescale-yun}/README.rst | 107 +++++++++++------- .../beescale-yun/beescale-yun.ino | 0 .../beescale-yun}/platformio.ini | 0 10 files changed, 117 insertions(+), 69 deletions(-) create mode 120000 doc/source/firmware/moislabs rename {openhive/openhive-yun => moislabs/beescale-yun}/.gitignore (100%) rename {openhive/openhive-yun => moislabs/beescale-yun}/Makefile (100%) rename {openhive/openhive-yun => moislabs/beescale-yun}/README.rst (50%) rename openhive/openhive-yun/openhive-yun.ino => moislabs/beescale-yun/beescale-yun.ino (100%) rename {openhive/openhive-yun => moislabs/beescale-yun}/platformio.ini (100%) diff --git a/.github/workflows/platformio-ci.yaml b/.github/workflows/platformio-ci.yaml index ea3560b..697b147 100644 --- a/.github/workflows/platformio-ci.yaml +++ b/.github/workflows/platformio-ci.yaml @@ -46,9 +46,9 @@ jobs: backdoor-any-rfm69: ${{ steps.changes.outputs.backdoor-any-rfm69 }} backdoor-multihop: ${{ steps.changes.outputs.backdoor-multihop }} backdoor-node-wifi-mqtt: ${{ steps.changes.outputs.backdoor-node-wifi-mqtt }} + moislabs-beescale-yun: ${{ steps.changes.outputs.moislabs-beescale-yun }} openhive-any-rfm69: ${{ steps.changes.outputs.openhive-any-rfm69 }} openhive-gsm-wifi: ${{ steps.changes.outputs.openhive-gsm-wifi }} - openhive-yun: ${{ steps.changes.outputs.openhive-yun }} openhive-scale-adjust: ${{ steps.changes.outputs.openhive-scale-adjust }} ringlabs-bienenwaage-20: ${{ steps.changes.outputs.ringlabs-bienenwaage-20 }} ringlabs-bienenwaage-50: ${{ steps.changes.outputs.ringlabs-bienenwaage-50 }} @@ -71,6 +71,9 @@ jobs: backdoor-node-wifi-mqtt: - 'backdoor/node-wifi-mqtt/**/*.ini' - 'backdoor/node-wifi-mqtt/**/*.ino' + moislabs-beescale-yun: + - 'moislabs/beescale-yun/**/*.ini' + - 'moislabs/beescale-yun/**/*.ino' openhive-any-rfm69: - 'openhive/gateway-rfm69-csv-sdcard/**' - 'openhive/gateway-rfm69-csv-uart/**' @@ -81,9 +84,6 @@ jobs: openhive-scale-adjust: - 'openhive/scale-adjust/**/*.ini' - 'openhive/scale-adjust/**/*.ino' - openhive-yun: - - 'openhive/openhive-yun/**/*.ini' - - 'openhive/openhive-yun/**/*.ino' ringlabs-bienenwaage-20: - 'ringlabs/bienenwaage-2.0/**/*.ini' - 'ringlabs/bienenwaage-2.0/**/*.ino' @@ -122,6 +122,16 @@ jobs: pip install --upgrade --requirement requirements-test.txt + # ------------------------------------------ + # Mois Labs + # ------------------------------------------ + + - name: Build moislabs-beescale-yun + if: ${{ needs.changes.outputs.moislabs-beescale-yun == 'true' }} + run: | + pio run --project-dir moislabs/beescale-yun + + # ------------------------------------------ # Backdoor # ------------------------------------------ @@ -177,14 +187,9 @@ jobs: pio run --project-dir openhive/scale-adjust/ADS1231 pio run --project-dir openhive/scale-adjust/HX711 - - name: Build openhive-yun - if: ${{ needs.changes.outputs.openhive-yun == 'true' }} - run: | - pio run --project-dir openhive/openhive-yun - # ------------------------------------------ - # ringlabs + # Ringlabs # ------------------------------------------ - name: Build ringlabs/bienenwaage-2.0 diff --git a/doc/source/firmware/moislabs b/doc/source/firmware/moislabs new file mode 120000 index 0000000..a4fb176 --- /dev/null +++ b/doc/source/firmware/moislabs @@ -0,0 +1 @@ +../../../moislabs \ No newline at end of file diff --git a/doc/source/firmware/overview.md b/doc/source/firmware/overview.md index d5639cf..b8f5594 100644 --- a/doc/source/firmware/overview.md +++ b/doc/source/firmware/overview.md @@ -11,21 +11,28 @@ open source projects. ## Groups -This section lists firmwares by group / origin, alphabetically and -chronologically sorted. +This section enumerates and groups firmwares by origin, chronologically sorted +in the order of appearance. -### Open Hive -All systems conceived by Open Hive and friends. +### Mois Labs -:::{note} **References:** -Markus Euskirchen and Clemens Gruber reported about the development progress. -- http://open-hive.org/ -- https://www.euse.de/wp/blog/series/bienenwaage/ -- https://www.euse.de/wp/blog/series/bienenwaage2/ - ::: +Collecting beehive sensor data since 2011. With the first »Hello, world« post in +[November 2011], and the most recent one in [May 2023], you can see that Markus +is surely one of the most avid and proficient data collectors, and inspired many +others to start similar projects. + +:::{seealso} +He published many articles about his journey, and it is a pleasure to read all +about the development progress in the [bienenwaage] and [bienenwaage2] sections +on his personal blog. +::: + +[bienenwaage]: https://www.euse.de/wp/blog/series/bienenwaage/ +[bienenwaage2]: https://www.euse.de/wp/blog/series/bienenwaage2/ +[November 2011]: https://www.euse.de/wp/blog/2011/11/bienen-ueberwachen/ +[May 2023]: https://www.euse.de/wp/blog/2023/05/wettermessung-direkt-am-stand/ -#### GSM, Wi-Fi ::::::{grid} 1 :margin: 0 @@ -38,13 +45,13 @@ Markus Euskirchen and Clemens Gruber reported about the development progress. :::{grid-item} :columns: 8 -[Open Hive Yún](#openhive-yun) +[](#beescale-yun) Running the [Mois Box], transmitting sensor data over HTTP, using the [Bridge Library for Yún devices]. -**Date:** 2014 -**Source:** [openhive-yun.ino] +**Date:** 2011 +**Source:** [beescale-yun.ino] ::: :::{grid-item} :columns: 4 @@ -477,8 +484,8 @@ backdoor/node-pipa/README backdoor/node-wifi-mqtt/README homie/node-homie-basic/README homie/node-homie-lowpower/README +moislabs/beescale-yun/README openhive/openhive-gsm-wifi/README -openhive/openhive-yun/README openhive/rfm69-gateway-sdcard/README openhive/rfm69-gateway-uart/README openhive/rfm69-node/README diff --git a/doc/source/resources-md.md b/doc/source/resources-md.md index f2add3c..448a646 100644 --- a/doc/source/resources-md.md +++ b/doc/source/resources-md.md @@ -3,6 +3,7 @@ [Hiveeyes project]: https://hiveeyes.org/ [Hiveeyes Arduino repository]: https://github.com/hiveeyes/arduino [Hiveeyes Backend]: https://getkotori.org/ +[Open Hive Bee Scale GSM]: https://community.hiveeyes.org/t/open-hive-bee-monitoring-system-hardware-overview-gsm-node/279 [Open Hive Box]: https://hiveeyes.org/docs/system/vendor/open-hive/#open-hive-seeeduino-stalker [Open Hive WiFi Solar]: https://community.hiveeyes.org/t/open-hive-wifi-solar-adafruit-huzzah/247 [node-rfm69-beradio.ino]: https://github.com/hiveeyes/arduino/blob/main/backdoor/node-rfm69-beradio/node-rfm69-beradio.ino @@ -15,7 +16,7 @@ [scale-adjust-ads1231.ino]: https://github.com/hiveeyes/arduino/blob/main/openhive/scale-adjust/ADS1231/scale-adjust-ads1231.ino [scale-adjust-hx711.ino]: https://github.com/hiveeyes/arduino/blob/main/openhive/scale-adjust/HX711/scale-adjust-hx711.ino [BERadio C++]: https://github.com/hiveeyes/arduino/tree/main/libraries/BERadio -[node-yun-http.ino]: https://github.com/hiveeyes/arduino/blob/main/openhive/openhive-yun/openhive-yun.ino +[beescale-yun.ino]: https://github.com/hiveeyes/arduino/blob/main/moislabs/beescale-yun/beescale-yun.ino [Mois Box]: https://www.euse.de/wp/blog/2017/03/bienenwaage-2_0/ [OpenHive-Lib]: https://github.com/hiveeyes/arduino/tree/main/libraries/OpenHive [openhive-gsm-wifi.ino]: https://github.com/hiveeyes/arduino/blob/main/openhive/openhive-gsm-wifi/openhive-gsm-wifi.ino @@ -35,6 +36,7 @@ [Microchip]: https://en.wikipedia.org/wiki/Microchip_Technology [AVR microcontroller family]: https://en.wikipedia.org/wiki/MegaAVR [ATmega328]: https://en.wikipedia.org/wiki/ATmega328 +[ATmega328P]: https://www.microchip.com/en-us/product/ATmega328P [Seeeduino Stalker v2.3]: https://web.archive.org/web/20180118214610/https://wiki.seeedstudio.com/wiki/Seeeduino_Stalker_v2.3 [ESP8266]: https://en.wikipedia.org/wiki/ESP8266 [ESP32]: https://en.wikipedia.org/wiki/ESP32 @@ -118,7 +120,6 @@ [LoRaWAN]: https://en.wikipedia.org/wiki/LoRaWAN#LoRaWAN [LTE Cat M1]: https://en.wikipedia.org/wiki/LTE-M [LTE Cat NB1]: https://en.wikipedia.org/wiki/Narrowband_IoT -[openhive-yun.ino]: https://github.com/hiveeyes/arduino/blob/main/openhive/openhive-yun/openhive-yun.ino [picocom]: https://github.com/npat-efault/picocom [pipa-espressif.ino]: https://github.com/hiveeyes/arduino/blob/main/backdoor/node-pipa/examples/pipa-espressif/pipa-espressif.ino [PlatformIO Registry]: https://registry.platformio.org/ diff --git a/doc/source/resources.rst b/doc/source/resources.rst index e5ad7fe..77f0dce 100644 --- a/doc/source/resources.rst +++ b/doc/source/resources.rst @@ -23,6 +23,7 @@ .. ----------- .. Open Hive +.. _Open Hive Bee Scale GSM: https://community.hiveeyes.org/t/open-hive-bee-monitoring-system-hardware-overview-gsm-node/279 .. _Open Hive Box: https://hiveeyes.org/docs/system/vendor/open-hive/#open-hive-seeeduino-stalker .. _Open Hive WiFi Solar: https://community.hiveeyes.org/t/open-hive-wifi-solar-adafruit-huzzah/247 @@ -45,7 +46,7 @@ .. _BERadio C++: https://github.com/hiveeyes/arduino/tree/main/libraries/BERadio .. Mois -.. _node-yun-http.ino: https://github.com/hiveeyes/arduino/blob/main/openhive/openhive-yun/openhive-yun.ino +.. _beescale-yun.ino: https://github.com/hiveeyes/arduino/blob/main/moislabs/beescale-yun/beescale-yun.ino .. _Mois Box: https://www.euse.de/wp/blog/2017/03/bienenwaage-2_0/ .. Open Hive @@ -85,6 +86,7 @@ .. _Microchip: https://en.wikipedia.org/wiki/Microchip_Technology .. _AVR microcontroller family: https://en.wikipedia.org/wiki/MegaAVR .. _ATmega328: https://en.wikipedia.org/wiki/ATmega328 +.. _ATmega328P: https://www.microchip.com/en-us/product/ATmega328P .. _Seeeduino Stalker v2.3: https://web.archive.org/web/20180118214610/https://wiki.seeedstudio.com/wiki/Seeeduino_Stalker_v2.3 .. Espressif @@ -197,7 +199,6 @@ .. _LoRaWAN: https://en.wikipedia.org/wiki/LoRaWAN#LoRaWAN .. _LTE Cat M1: https://en.wikipedia.org/wiki/LTE-M .. _LTE Cat NB1: https://en.wikipedia.org/wiki/Narrowband_IoT -.. _openhive-yun.ino: https://github.com/hiveeyes/arduino/blob/main/openhive/openhive-yun/openhive-yun.ino .. _picocom: https://github.com/npat-efault/picocom .. _pipa-espressif.ino: https://github.com/hiveeyes/arduino/blob/main/backdoor/node-pipa/examples/pipa-espressif/pipa-espressif.ino .. _PlatformIO Registry: https://registry.platformio.org/ @@ -214,5 +215,9 @@ .. https://stackoverflow.com/questions/4550021/working-example-of-floating-image-in-restructured-text .. |clearfix| raw:: html +
- diff --git a/openhive/openhive-yun/.gitignore b/moislabs/beescale-yun/.gitignore similarity index 100% rename from openhive/openhive-yun/.gitignore rename to moislabs/beescale-yun/.gitignore diff --git a/openhive/openhive-yun/Makefile b/moislabs/beescale-yun/Makefile similarity index 100% rename from openhive/openhive-yun/Makefile rename to moislabs/beescale-yun/Makefile diff --git a/openhive/openhive-yun/README.rst b/moislabs/beescale-yun/README.rst similarity index 50% rename from openhive/openhive-yun/README.rst rename to moislabs/beescale-yun/README.rst index aeaa20f..07937b5 100644 --- a/openhive/openhive-yun/README.rst +++ b/moislabs/beescale-yun/README.rst @@ -3,60 +3,62 @@ .. _mois-node: .. _mois-firmware: .. _node-yun-http: -.. _openhive-yun: +.. _beescale-yun: -################ -Mois sensor node -################ +###################### +Mois Labs Beescale Yún +###################### .. tip:: Please `continue reading this document on our documentation space - `_, + `_, all inline links will be working there. .. highlight:: bash -************ -Introduction -************ - -This firmware powers the `Mois Box`_, based on the `Arduino Yún Shield`_-compatible `Dragino Yun Shield v2.4`_. -Telemetry data is transmitted to a `custom PHP receiver program `_ -over HTTP using the `Yún HTTP Client`_ from the `Bridge Library for Yún devices`_. It is also stored locally on a SD card. -The most recent firmware version is always available at `node-yun-http.ino`_. +***** +About +***** +The second generation `Mois Box`_ is a beehive monitoring system based on the +`Arduino Yún Shield`_-compatible `Dragino Yun Shield v2.4`_. .. figure:: https://ptrace.hiveeyes.org/2017-03-21_mois-node-yun-http.jpg :alt: Mois Box with electronics - :width: 450px + :width: 350px :align: left `Mois Box`_ - .. figure:: http://www.dragino.com/media/k2/galleries/105/YunShieldv2.4_10.png :target: https://wiki1.dragino.com/index.php/Yun_Shield :alt: Dragino Yun Shield v2.4 - :width: 450px + :width: 350px :align: right `Dragino Yun Shield v2.4`_ - |clearfix| +Project repository +================== + +`@bee-mois`_ is maintaining the full sources, including all auxiliary helper programs, +within the `beescale repository`_. + -Platform and supported peripherals -================================== +******** +Hardware +******** Board ------ +===== - `Dragino Yun Shield v2.4`_ Sensors -------- +======= - ADS1231_ ADC weigh scale breakout board - DS18B20_ digital thermometer - DHT22_ (RHT03_) digital humidity/temperature sensor @@ -64,26 +66,29 @@ Sensors `Adafruit TSL2591 STEMMA QT`_ High Dynamic Range Digital Light Sensor -***** -Setup -***** -Clone git repository -==================== +******** +Firmware +******** + +The most recent firmware version is available at `beescale-yun.ino`_. + +Acquire source code +=================== :: # Acquire source code repository git clone https://github.com/hiveeyes/arduino # Select this firmware - cd arduino/openhive/openhive-yun + cd arduino/moislabs/beescale-yun -Configure firmware -================== +Configure +========= .. highlight:: c++ -Have a look at the source code `node-yun-http.ino`_ and adapt feature flags and setting +Have a look at the source code `beescale-yun.ino`_ and adapt feature flags and setting variables according to your environment. Configure load cell calibration settings:: @@ -98,18 +103,13 @@ Configure load cell calibration settings:: .. tip:: - Use :ref:`scale-adjust-firmware` to determine those values. - - -***** -Usage -***** - -.. highlight:: bash + Please use the corresponding :ref:`scale-adjust-firmware` to determine those values. Build ===== +.. highlight:: bash + The build system is based on `PlatformIO`_, which will install toolchains and build your customized firmware without efforts. All you need is a Python installation. @@ -130,5 +130,34 @@ Upload to MCU If you need to build for different targets, or if you want to modernize your dependencies, you may want to adjust the ``platformio.ini`` file, to match your needs. - In order to make changes to the firmware, edit the ``node-yun-http.ino`` file, and + In order to make changes to the firmware, edit the ``beescale-yun.ino`` file, and invoke ``make build`` to build it again. + + +********************* +Telemetry and backend +********************* + +The `Bridge Library for Yún devices`_ enables communication between the `ATmega328P`_ MCU +on the `Arduino Uno`_, and the `AR9331`_, in order to submit data from the sensor domain +to the Linux machine. It will enable transparent HTTP communication using the venerable +Arduino `HttpClient`_ library. + +.. code-block:: c++ + + #include + #include + + HttpClient client; + client.post(url); + +Using this HTTP client (example implementation at `Yún HTTP Client`_), telemetry data is +transmitted to a `custom PHP receiver program`_, and is also stored on the SD card attached +to the device. + + +.. _AR9331: http://en.techinfodepot.shoutwiki.com/wiki/Atheros_AR9331 +.. _@bee-mois: https://github.com/bee-mois +.. _beescale repository: https://github.com/bee-mois/beescale +.. _custom PHP receiver program: https://github.com/bee-mois/beescale/blob/master/add_line2.php +.. _HttpClient: https://www.arduino.cc/reference/en/libraries/httpclient/ diff --git a/openhive/openhive-yun/openhive-yun.ino b/moislabs/beescale-yun/beescale-yun.ino similarity index 100% rename from openhive/openhive-yun/openhive-yun.ino rename to moislabs/beescale-yun/beescale-yun.ino diff --git a/openhive/openhive-yun/platformio.ini b/moislabs/beescale-yun/platformio.ini similarity index 100% rename from openhive/openhive-yun/platformio.ini rename to moislabs/beescale-yun/platformio.ini