Skip to main content

Run the NodeNs gateway

Project description

The purpose of this program - NodeNs Gateway - is to operate an MQTT gateway for connection to NodeNs sensors. The gateway will detect NodeNs sensors connected to the MQTT host, process their data, and optionally publish to a Cloud service and/or save to local storage.

Installation

NodeNs Gateway can be installed using pip:

pip install nodens.gateway

Troubleshooting

Installing PyYaml. Pip sometimes has trouble installing the PyYaml package. If you experience this, it may be easier to install it manually:

pip install pyyaml

Operation

NodeNs Gateway can be executed directly from the command line as follows:

python -m nodens.gateway

It can also be imported as a library into your own scripts: import nodens.gateway

On execution, as a first step it will search for the configuration file config-gateway.yaml to define the MQTT broker and other basic settings. The program will first search for the config file in the User's (your) default config folder, and then in the folder you've executed the program from. If the config file is not found, it will create one based on a default configuration. Click here for details of the Configuration.

If a Cloud service operation has been specified, the script will also search for relevant access tokens or certificates.

Configuration

Location of configuration file

The program will search for the configuration file config-gateway.yaml in the following order:

  1. In the user config folder, e.g.
    • Windows: /Users/<user>/AppData/Local/NodeNs/Gateway/
    • Unix: ~/.config/Gateway/
  2. In the current working folder.
  3. In /NodeNs/
  4. In /
  5. Otherwise, a default config file will be created in the user folder, and the program will print its location. Feel free to edit it as necessary!

Description of settings

Program

WRITE_FLAG : Set to 1 if you require sensor data to be saved to disk. Data will be saved in csv form to: <current folder>/Saved/ CLOUD_WRITE_TIME : How often data is saved to a Cloud service (if activated)

Sensor

Sensor_IP : IP address of the MQTT broker. Default: 10.3.141.1.

Thingsboard setup

Thingsboard provisioning: https://thingsboard.io/docs/paas/getting-started-guides/helloworld/#step-1-provision-device

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nodens_gateway-25.3.1.tar.gz (47.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nodens_gateway-25.3.1-py3-none-any.whl (50.2 kB view details)

Uploaded Python 3

File details

Details for the file nodens_gateway-25.3.1.tar.gz.

File metadata

  • Download URL: nodens_gateway-25.3.1.tar.gz
  • Upload date:
  • Size: 47.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for nodens_gateway-25.3.1.tar.gz
Algorithm Hash digest
SHA256 d3b9cb1a2a22e96a217e55df6cacf94e1db0420b7b25d9cffaf1166cdbb1b0c6
MD5 b6cd9624e14aed641307f05ab71d3ffc
BLAKE2b-256 3126066be5e7d47be744ad6d461bfe4f47f9b260baa8dbbcff266cd9150c36a3

See more details on using hashes here.

File details

Details for the file nodens_gateway-25.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for nodens_gateway-25.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6e614165149ec57252867148b779fd794b14b41a7c14b8916437e43d97b4dcd
MD5 ac00ebe2fd211c86cc679611b0935f82
BLAKE2b-256 8c488948e9fb7a3527fab088ea3f7715f487af0f77283ef1eec5ee3f4e7cd72d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page