Skip to content

wesback/fluksocore

Repository files navigation


| | | | | _____ ___ / | _ __ ___ | | | | | | | |/ / |/ _ | | / _ | '/ _
| | | | || | <_
\ (
) | || () | | | __/ || ||_,||__/_/ __/|_| __|

What is it?

This is some .NET Core code that will read the data from the MQTT feed coming from a Flukso device. It will send the output to the console or Azure Event Hubs, feel free to extend the code wherever needed.

Getting started

I have created this to run on a Raspberry PI using Docker. You can find the deployment scripts for Azure in the Terraform folder. For development replace the values marked with ### in appsettings.json. The docker-compose.yml file contains the same settings for execution in the container.

Terraform

Go to the Terraform folder and execute the following

az login 
terraform init 
terraform plan -out=out.tfplan
terraform apply out.tfplan

docker-compose

You can find the sensor id in your user settings on https://www.flukso.net/. Replace the values that are marked with ###.

version: '2.0'

services:
  fluksocore:
    image: wesback/fluksocore
    restart: always
    container_name: fluksocore
    environment:
      - FluksoServer:FluksoIP=###ipaddress###
      - EventHubs:EHConnectionString=Endpoint=sb://###namespace###.servicebus.windows.net/;SharedAccessKeyName=###keyname###;SharedAccessKey=###key###
      - EventHubs:EHEntityPath=###ehpath### 
      - Sensors:Electricity=###sensoride###
      - Sensors:Water=###sensoridw###
      - Sensors:Gas=###sensoridg###
      - Output:Console=false
      - Output:EventHubs=true

fluksocore.service

Now you can go ahead and add this as a service on your Raspberry PI.

cp fluksocore.service /etc/systemd/system
chmod 755 /etc/systemd/system/fluksocore.service
systemctl enable fluksocore.service
systemctl start fluksocore.service
systemctl status fluksocore.service

Releases

No releases published

Packages

No packages published