Skip to main content

fdbk_ruuvi_reporter

CI Release

Getting started

Originally published in a Medium post.

Following steps assume that you have some RuuviTags transmitting data near the Raspberry Pi. The steps also require some Raspberry Pi, Unix, and AWS knowledge:

  • Setup a Raspberry Pi with a fresh Rasbian, connect it to internet, change your password, and optionally enable SSH.
  • Install required software dependencies on the Raspberry Pi:
sudo apt-get update
sudo apt-get install bluez-hcidump python3 python3-pip
sudo pip3 install fdbk_ruuvi_reporter fdbk_dynamodb_plugin
  • Create AWS DynamoDB tables and a reporter user with CloudFormation template.
  • Create Access key for the reporter user in AWS. Configure the access keys and region to the ~/.aws directory on the Raspberry Pi.
  • On Raspberry Pi, create topics for your RuuviTags with fdbk-ruuvi-reporter --create-topic ${name} ${mac} --db-connection fdbk_dynamodb_plugin where ${name} is the name for your sensor and ${mac} is the MAC address of the RuuviTag.
  • Try to run the reporter with fdbk-ruuvi-reporter -v -i 10 --db-connection fdbk_dynamodb_plugin, where -v is for verbose, -i 10 sets data push interval to ten seconds, and --db-connection fdbk_dynamodb_plugin specifies database connection to be used, here DynamoDB. Check from the AWS console that data is being transmitted.
  • Configure fdbk-ruuvi-reporter to start on reboot with crontab -e. For example, to transmit data every 15 minutes with output directed to file /home/pi/.reporter-log.txt, the crontab row would be:
@reboot /usr/local/bin/fdbk-ruuvi-reporter -v -i 900 --db-connection fdbk_dynamodb_plugin > /home/pi/.reporter-log.txt
  • Reboot the Raspberry Pi and check from the AWS console that data is being transmitted.

To access the data via fdbk development server on your development computer: Install fdbk and fdbk_dynamodb_plugin. Configure AWS credentials with read access rights to both topics and data tables. Run fdbk-server, which is provided by fdbk package, with DynamoDB plugin as the DB connection: fdbk-server --db-connection fdbk_dynamodb_plugin. Navigate to http://localhost:8080/overview to access overview of the data.

Development

Installation

Run:

pip install fdbk_ruuvi_reporter

to install from PyPI or download this repository and run

python setup.py install

to install from sources.

Testing

Check and automatically fix formatting with:

pycodestyle fdbk_ruuvi_reporter
autopep8 -aaar --in-place fdbk_ruuvi_reporter

Run static analysis with:

pylint -E --enable=invalid-name,unused-import,useless-object-inheritance fdbk_ruuvi_reporter

Run unit tests with command:

python3 -m unittest discover -s tst/

Get test coverage with commands:

coverage run --branch --source fdbk_ruuvi_reporter/ -m unittest discover -s tst/
coverage report -m

Metadata

Release files for fdbk-ruuvi-reporter 3.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fdbk-ruuvi-reporter 3.1.1
File Size Uploaded Provenance Actions
fdbk_ruuvi_reporter-3.1.1.tar.gz 4.8 kB Without provenance Details for fdbk_ruuvi_reporter-3.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fdbk-ruuvi-reporter 3.1.1
File Interpreter ABI Platform Actions
fdbk_ruuvi_reporter-3.1.1-py3-none-any.whl Python 3 none any Details for fdbk_ruuvi_reporter-3.1.1-py3-none-any.whl

Total release size: 10.9 kB

Release files / fdbk_ruuvi_reporter-3.1.1.tar.gz

Download URL fdbk_ruuvi_reporter-3.1.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
76c26c739abb5844375671e7b280bb40e45a7c2ca8e62ab2e43f5e5bcb774d3f
BLAKE2b-256 checksum
How to use checksums
37f6c4452ad4f441dce311315cc4bcc17d86633ed67ff6d6cc7eaa01886bc9d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / fdbk_ruuvi_reporter-3.1.1-py3-none-any.whl

Download URL fdbk_ruuvi_reporter-3.1.1-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8df406bc29ed1834effdbec7c35ce794bcb00c6a363eea8544e87f4e5f89345
BLAKE2b-256 checksum
How to use checksums
5e11dc65c66665cb643433c3d0066e3bc264607af0b00e4aa22e3b547556071d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Security for fdbk-ruuvi-reporter 3.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page