Socket
Socket
Sign inDemoInstall

sensor-net-middleware

Package Overview
Dependencies
107
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sensor-net-middleware

Middleware for the Sensor-Net project.


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Sensor Net Middleware

This repository contains the middleware for the Sensor Net project.

Installation

The middleware can be installed as an npm package.

apt install git libzmq-dev cmake -y
npm i -g sensor-net-middleware

You may need to add the option "--unsafe-perm".

Running

The middleware package contains two binaries called "rawdatad" and "ingresd".

rawdatad

The Raw Data Daemon received the messages from the serial interface, decrypts and reformats them, and publishes them on a zeromq queue. It expects the Sensor Net decryption key to be supplied as the environment variable "SENSOR_NET_KEY".

SENSOR_NET_KEY=<secret key> ZEROMQ_SOCKET=tcp://127.0.0.1:3000 rawdatad

ingressd

The Ingress Daemon subscribes to the zeromq queue and forwards the messages to the database. To be able to use the Sensor Net back end API, it gets an access token from Auth0. It gets new tokens as required. The Ingress Daemon expects the following environment variables to be set:

  • ZEROMQ_SOCKET (optional, default: "tcp://127.0.0.1:3000")
  • ZEROMQ_TOPIC (optional, default: "sensor-net/data")
  • AUTH0_TENANT
  • AUTH0_REGION (e.g. "eu")
  • AUTH0_CLIENT_ID
  • AUTH0_CLIENT_SECRET
  • AUTH0_CLIENT_AUDIENCE

Troubleshooting

Installing nodejs on armv6l (RaspberryPi 1, Zero)

I found the node packages that ship with Raspbian to have problems. Therefore, I uninstalled them.

apt remove nodejs npm

Binary distributions packages for armv6 are available for version 10 from nodejs.org. They can be installed in the following way.

wget https://nodejs.org/dist/latest-v10.x/node-v10.20.0-linux-armv6l.tar.gz
sudo mkdir -p /usr/local/lib/nodejs
sudo tar -xvf node-v10.20.0-linux-armv6l.tar.gz -C /usr/local/lib/nodejs
chown -R root /usr/local/lib/nodejs
chgrp -R root /usr/local/lib/nodejs

Then add the path to the profile.

export PATH="/usr/local/lib/nodejs/node-v10.20.0-linux-armv6l/bin:$PATH"

FAQs

Last updated on 26 Apr 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc