Skip to content

Commit

Permalink
[Mois Labs] Naming things: Welcome, Mois Labs.
Browse files Browse the repository at this point in the history
- Add folder `moislabs`
- Rename program to `beescale-yun.ino`
- Improve README
  • Loading branch information
amotl committed May 31, 2023
1 parent 430f0eb commit e384c4f
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 69 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/platformio-ci.yaml
Expand Up @@ -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 }}
Expand All @@ -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/**'
Expand All @@ -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'
Expand Down Expand Up @@ -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
# ------------------------------------------
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions doc/source/firmware/moislabs
37 changes: 22 additions & 15 deletions doc/source/firmware/overview.md
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions doc/source/resources-md.md
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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/
Expand Down
11 changes: 8 additions & 3 deletions doc/source/resources.rst
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand All @@ -214,5 +215,9 @@
.. https://stackoverflow.com/questions/4550021/working-example-of-floating-image-in-restructured-text
.. |clearfix| raw:: html

<style>
.clearfix {
clear: both;
}
</style>
<div class="clearfix"></div>

File renamed without changes.
File renamed without changes.
107 changes: 68 additions & 39 deletions openhive/openhive-yun/README.rst → moislabs/beescale-yun/README.rst
Expand Up @@ -3,87 +3,92 @@
.. _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
<https://hiveeyes.org/docs/arduino/firmware/openhive/openhive-yun/README.html>`_,
<https://hiveeyes.org/docs/arduino/firmware/moislabs/beescale-yun/README.html>`_,
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 <https://github.com/bee-mois/beescale/blob/master/add_line2.php>`_
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
- `TSL25911`_ Ambient Light Sensor aka.
`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::
Expand All @@ -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.

Expand All @@ -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 <Bridge.h>
#include <HttpClient.h>

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/
File renamed without changes.
File renamed without changes.

0 comments on commit e384c4f

Please sign in to comment.