https://github.com/hardwario/enmon
Environmental Monitoring Toolkit for HARDWARIO Bridge Module
https://github.com/hardwario/enmon
ft260 hid iot sensor usb
Last synced: 8 months ago
JSON representation
Environmental Monitoring Toolkit for HARDWARIO Bridge Module
- Host: GitHub
- URL: https://github.com/hardwario/enmon
- Owner: hardwario
- License: mit
- Created: 2020-03-02T07:53:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T08:31:00.000Z (over 3 years ago)
- Last Synced: 2025-05-23T07:31:46.274Z (about 1 year ago)
- Topics: ft260, hid, iot, sensor, usb
- Language: C
- Homepage:
- Size: 129 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Repository: enmon
[](https://travis-ci.org/hardwario/enmon)
[](https://ci.appveyor.com/project/Hardwario/enmon)
[](https://github.com/hardwario/enmon/releases)
[](https://github.com/hardwario/enmon/blob/master/LICENSE)
[](https://twitter.com/hardwario_en)
This repository contains source code for the **Environmental Monitoring Toolkit**.
The result is a CLI utility (called `enmon`) that reads hardware sensor data via **HARDWARIO Bridge Module** such as:
* Temperature (from **Humidity Tag** or **Climate Module**)
* Humidity (from **Humidity Tag** or **Climate Module**)
* Illuminance (from **Lux Meter Tag** or **Climate Module**)
* Pressure (from **Barometer Tag** or **Climate Module**)
* Altitude (from **Barometer Tag** or **Climate Module**)
The read values are printed to the console (via `stdout`) and can be easily piped to other tools.
This tool is also integrated with **HARDWARIO Playground** so you can easily use it altogether with **Node-RED**.
> HARDWARIO Bridge Module does not need any drivers as it uses USB HID for communication.
## Requirements
* Host with Windows, macOS, or Linux operating system
* HARDWARIO Bridge Module
* Micro USB cable
## Build
You will need CMake + C compiler (GCC, LLVM Clang, or MSVC) to build the binary.
Just follow these steps:
1. Open the Terminal app or Command Prompt.
1. Clone the repository:
$ git clone https://github.com/hardwario/enmon.git
1. Go to the repository:
$ cd enmon
1. Create the `build` directory:
$ mkdir build
1. Go to the `build` directory:
$ cd build
1. Let CMake create the build script:
$ cmake ..
1. Start the actual build:
$ cmake --build .
The result is the single `enmon` (or `enmon.exe`) executable in the `build` directory. Feel free to copy it where you want.
## Usage
You can invoke the help:
$ ./enmon --help
Run without arguments will read the sensor data, print them, and exit:
$ ./enmon
@SENSOR: "Temperature",27.20
@SENSOR: "Humidity",50.2
@SENSOR: "Illuminance",25
@SENSOR: "Pressure",95306
@SENSOR: "Altitude",514.2
You can force the program to continuously read the sensors with a specified delay:
$ ./enmon --loop --delay=5
@SENSOR: "Temperature",27.20
@SENSOR: "Humidity",50.2
@SENSOR: "Illuminance",25
@SENSOR: "Pressure",95306
@SENSOR: "Altitude",514.2
@SENSOR: "Temperature",27.20
@SENSOR: "Humidity",50.2
@SENSOR: "Illuminance",25
@SENSOR: "Pressure",95306
@SENSOR: "Altitude",514.2
## Linux
On Linux, it is important to get the `udev` properly configured so you won't need the admin right to access the device. Please, follow these steps:
1. Install the dependencies:
# apt install -y build-essential cmake libudev-dev
1. Create the file `/etc/udev/rules.d/99-enmon.rules`:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6030", MODE="0666"
1. Reload the `udev` rules:
# udevadm control --reload
## License
This project is licensed under the [**MIT License**](https://opensource.org/licenses/MIT/) - see the [**LICENSE**](LICENSE) file for details.
---
Made with ❤️ by [**HARDWARIO a.s.**](https://www.hardwario.com/) in the heart of Europe.