Industrial IoT Messaging and Device Management Platform

Mainflux

build go report card coverage license chat

banner

Mainflux is modern, scalable, secure, open-source, and patent-free IoT cloud platform written in Go.

It accepts user and thing (sensor, actuator, application) connections over various network protocols (i.e. HTTP, MQTT, WebSocket, CoAP), thus making a seamless bridge between them. It is used as the IoT middleware for building complex IoT solutions.

For more details, check out the official documentation.

Mainflux is member of the Linux Foundation and an active contributor to the EdgeX Foundry project. It has been made with ❤️ by Mainflux Labs, which maintains the project and offers professional services around it.

Features

  • Multi-protocol connectivity and bridging (HTTP, MQTT, WebSocket and CoAP)
  • Device management and provisioning (Zero Touch provisioning)
  • Mutual TLS Authentication (mTLS) using X.509 Certificates
  • Fine-grained access control (policies, ABAC/RBAC)
  • Message persistence (Cassandra, InfluxDB, MongoDB and PostgresSQL)
  • Platform logging and instrumentation support (Grafana, Prometheus and OpenTracing)
  • Event sourcing
  • Container-based deployment using Docker and Kubernetes
  • LoRaWAN network integration
  • OPC UA integration
  • Edge Agent and Export services for remote IoT gateway management and edge computing
  • SDK
  • CLI
  • Small memory footprint and fast execution
  • Domain-driven design architecture, high-quality code and test coverage

Prerequisites

The following are needed to run Mainflux:

Developing Mainflux will also require:

Install

Once the prerequisites are installed, execute the following commands from the project's root:

docker-compose -f docker/docker-compose.yml up

This will bring up the Mainflux docker services and interconnect them. This command can also be executed using the project's included Makefile:

make run

If you want to run services from specific release checkout code from github and make sure that MF_RELEASE_TAG in .env is being set to match the release version

git checkout tags/<release_number> -b <release_number>
# e.g. `git checkout tags/0.12.0 -b 0.12.0`

Check that .env file contains:

MF_RELEASE_TAG=<release_number>

docker-compose should be used for development and testing deployments. For production we suggest using Kubernetes.

Usage

The quickest way to start using Mainflux is via the CLI. The latest version can be downloaded from the official releases page.

It can also be built and used from the project's root directory:

make cli
./build/mainflux-cli version

Additional details on using the CLI can be found in the CLI documentation.

Documentation

Official documentation is hosted at Mainflux Read The Docs page. Documentation is auto-generated, checkout the instructions on official docs repository:

If you spot an error or a need for corrections, please let us know - or even better: send us a PR.

Additional practical information, news and tutorials can be found on the Mainflux blog.

Authors

Main architect and BDFL of Mainflux project is @drasko.

Additionally, @nmarcetic and @janko-isidorovic assured overall architecture and design, while @manuio and @darkodraskovic helped with crafting initial implementation and continuously worked on the project evolutions.

Besides them, Mainflux is constantly improved and actively developed by @anovakovic01, @dusanb94, @srados, @gsaleh, @blokovi, @chombium, @mteodor and a large set of contributors.

Maintainers are listed in MAINTAINERS file.

The Mainflux team would like to give special thanks to @mijicd for his monumental work on designing and implementing a highly improved and optimized version of the platform, and @malidukica for his effort on implementing the initial user interface.

Contributing

Thank you for your interest in Mainflux and the desire to contribute!

  1. Take a look at our open issues. The good-first-issue label is specifically for issues that are great for getting started.
  2. Checkout the contribution guide to learn more about our style and conventions.
  3. Make your changes compatible to our workflow.

We're Hiring

If you are interested in working professionally on Mainflux, please head to company's careers page or shoot us an e-mail at [email protected].

The best way to grab our attention is by sending PRs 😎 .

Community

License

Apache-2.0

FOSSA Status

Owner
Comments
  • MF-1425 - Enhancement for external UUID

    MF-1425 - Enhancement for external UUID

    MF-1425 Enhancement to supply an external UUID for Things and Channels.

    • This entire feature would be switched off by default, and enabled by the new environment MF_THINGS_ALLOW_EXT_ID.
    • This environment is passed to the Things Service layer.
    • The IDProvider interface is updated to include FromString() to validate the externally supplied UUID.
    • A new local function createUid() is added to either generate a fresh UUID or to extract and validate the supplied UUID in the Things Service layer.
    • While creating a Thing or Channel if an "extid" tag is supplied inside "metadata", then the supplied external UUID is taken after validation.
    • If this "extid" is not supplied the default method of UUID generation is used.

    Usage: $ uuidgen 99336f21-bd45-4e47-87ab-f57505bf5ef2

    $ curl -s -S -i -X POST -H "Content-Type: application/json" -H "Authorization: ${TOKEN}" http://localhost/things -d '{"name": "u1_t1", "metadata": {"extid": "99336f21-bd45-4e47-87ab-f57505bf5ef2", "type": "device", "desc": "user1 thing1"}}'

    $ curl -s -S -i -X GET -H "Content-Type: application/json" -H "Authorization: ${TOKEN}" http://localhost/things {"total":1,"offset":0,"limit":10,"order":"","direction":"","things":[{"id":"99336f21-bd45-4e47-87ab-f57505bf5ef2","name":"u1_t1","key":"a87563c2-7a35-449d-b50a-c7a261a61aa5","metadata":{"desc":"user1 thing1","extid":"99336f21-bd45-4e47-87ab-f57505bf5ef2","type":"device"}}]}

    Pull request title should be MF-XXX - description or NOISSUE - description where XXX is ID of issue that this PR relate to. Please review the CONTRIBUTING.md file for detailed contributing guidelines.

    What does this do?

    Which issue(s) does this PR fix/relate to?

    Put here Resolves #XXX to auto-close the issue that your PR fixes (if such)

    List any changes that modify/break current functionality

    Have you included tests for your changes?

    Did you document any new/modified functionality?

    Notes

  • Containers can't connect: Failed to connect to postgres

    Containers can't connect: Failed to connect to postgres

    Hello, I use Windows-> virtualbox+ubuntuserver (22.04.1) + docker(20.10.17) + docker-compose(1.29.2) -> trying to run mainflux

    Do steps:

    git clone [https://github.com/mainflux/mainflux.git](https://github.com/mainflux/mainflux)
    cd mainflux
    sudo make run
    

    And then Mainflux running, and fisrt error - mainflux-auth trying to connect to postgres and failed, then same error: mainflux-coap trying to connect to broker and failed, etc And I don't understand how to fix this. Why they can't connect to each other? I check: are all of containers stay in one net - yes, all of them in docker_mainflux-base-net

    napster@salmon:~/mainflux$ sudo make run
    sed -i "s,file: brokers/.*.yml,file: brokers/nats.yml," docker/docker-compose.ym                                          l
    sed -i "s,MF_BROKER_URL: .*,MF_BROKER_URL: $\{MF_NATS_URL\}," docker/docker-comp                                          ose.yml
    docker-compose -f docker/docker-compose.yml up
    mainflux-auth-redis is up-to-date
    mainflux-auth-db is up-to-date
    mainflux-users-db is up-to-date
    mainflux-keto-db is up-to-date
    mainflux-es-redis is up-to-date
    mainflux-things-db is up-to-date
    mainflux-jaeger is up-to-date
    mainflux-broker is up-to-date
    mainflux-vernemq is up-to-date
    mainflux-keto is up-to-date
    mainflux-keto-migrate is up-to-date
    mainflux-auth is up-to-date
    mainflux-things is up-to-date
    mainflux-users is up-to-date
    mainflux-mqtt is up-to-date
    mainflux-coap is up-to-date
    mainflux-http is up-to-date
    mainflux-nginx is up-to-date
    Attaching to mainflux-auth-redis, mainflux-auth-db, mainflux-users-db, mainflux-keto-db, mainflux-es-redis, mainflux-things-db, mainflux-jaeger, mainflux-broker, mainflux-vernemq, mainflux-keto, mainflux-keto-migrate, mainflux-auth, mainflux-things, mainflux-users, mainflux-mqtt, mainflux-coap, mainflux-http, mainflux-nginx
    mainflux-auth   | {"level":"error","message":"Failed to connect to postgres: dial tcp 172.18.0.6:5432: connect: connection timed out","ts":"2022-08-23T07:58:57.483351911Z"}
    mainflux-auth   | {"level":"error","message":"Failed to connect to postgres: dial tcp 172.18.0.6:5432: connect: connection timed out","ts":"2022-08-23T08:01:10.600678469Z"}
    mainflux-auth   | {"level":"error","message":"Failed to connect to postgres: dial tcp 172.18.0.6:5432: connect: connection timed out","ts":"2022-08-23T08:03:23.721269587Z"}
    mainflux-auth   | {"level":"error","message":"Failed to connect to postgres: dial tcp 172.18.0.6:5432: connect: connection timed out","ts":"2022-08-24T10:52:37.601279534Z"}
    mainflux-auth   | {"level":"error","message":"Failed to connect to postgres: dial tcp 172.18.0.6:5432: connect: connection timed out","ts":"2022-08-24T10:54:50.72456827Z"}
    mainflux-auth-redis | 1:C 23 Aug 2022 07:56:21.373 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
    mainflux-auth-redis | 1:C 23 Aug 2022 07:56:21.397 # Redis version=6.2.2, bits=64, commit=00000000, modified=0, pid=1, just started
    mainflux-auth-redis | 1:C 23 Aug 2022 07:56:21.397 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
    mainflux-auth-redis | 1:M 23 Aug 2022 07:56:21.398 * monotonic clock: POSIX clock_gettime
    mainflux-auth-redis | 1:M 23 Aug 2022 07:56:21.406 * Running mode=standalone, port=6379.
    mainflux-auth-redis | 1:M 23 Aug 2022 07:56:21.413 # Server initialized
    mainflux-auth-redis | 1:M 23 Aug 2022 07:56:21.413 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
    mainflux-auth-redis | 1:M 23 Aug 2022 07:56:21.414 * Ready to accept connections
    mainflux-auth-db | The files belonging to this database system will be owned by user "postgres".
    mainflux-auth-db | This user must also own the server process.
    mainflux-auth-db |
    mainflux-auth-db | The database cluster will be initialized with locale "en_US.utf8".
    mainflux-auth-db | The default database encoding has accordingly been set to "UTF8".
    mainflux-auth-db | The default text search configuration will be set to "english".
    mainflux-auth-db |
    mainflux-auth-db | Data page checksums are disabled.
    mainflux-auth-db |
    mainflux-auth-db | fixing permissions on existing directory /var/lib/postgresql/data ... ok
    mainflux-auth-db | creating subdirectories ... ok
    mainflux-auth-db | selecting dynamic shared memory implementation ... posix
    mainflux-auth-db | selecting default max_connections ... 100
    mainflux-auth-db | selecting default shared_buffers ... 128MB
    mainflux-auth-db | selecting default time zone ... UTC
    mainflux-auth-db | creating configuration files ... ok
    mainflux-auth-db | running bootstrap script ... ok
    mainflux-auth-db | sh: locale: not found
    mainflux-auth-db | 2022-08-23 07:56:41.922 UTC [31] WARNING:  no usable system locales were found
    mainflux-auth-db | performing post-bootstrap initialization ... ok
    mainflux-auth-db | initdb: warning: enabling "trust" authentication for local connections
    mainflux-auth-db | You can change this by editing pg_hba.conf or using the option -A, or
    mainflux-auth-db | --auth-local and --auth-host, the next time you run initdb.
    mainflux-auth-db | syncing data to disk ... ok
    mainflux-auth-db |
    mainflux-auth-db |
    mainflux-auth-db | Success. You can now start the database server using:
    mainflux-auth-db |
    mainflux-auth-db |     pg_ctl -D /var/lib/postgresql/data -l logfile start
    mainflux-auth-db |
    mainflux-auth-db | waiting for server to start....2022-08-23 07:57:02.665 UTC [36] LOG:  starting PostgreSQL 13.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
    mainflux-auth-db | 2022-08-23 07:57:02.681 UTC [36] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    mainflux-auth-db | 2022-08-23 07:57:02.764 UTC [37] LOG:  database system was shut down at 2022-08-23 07:56:51 UTC
    mainflux-auth-db | 2022-08-23 07:57:02.811 UTC [36] LOG:  database system is ready to accept connections
    mainflux-auth-db |  done
    mainflux-auth-db | server started
    mainflux-auth-db | CREATE DATABASE
    mainflux-auth-db |
    mainflux-auth-db |
    mainflux-auth-db | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
    mainflux-auth-db |
    mainflux-auth-db | 2022-08-23 07:57:07.161 UTC [36] LOG:  received fast shutdown request
    mainflux-auth-db | waiting for server to shut down....2022-08-23 07:57:07.182 UTC [36] LOG:  aborting any active transactions
    mainflux-auth-db | 2022-08-23 07:57:07.189 UTC [36] LOG:  background worker "logical replication launcher" (PID 43) exited with exit code 1
    mainflux-auth-db | 2022-08-23 07:57:07.203 UTC [38] LOG:  shutting down
    mainflux-auth-db | 2022-08-23 07:57:07.452 UTC [36] LOG:  database system is shut down
    mainflux-auth-db |  done
    mainflux-auth-db | server stopped
    mainflux-auth-db |
    mainflux-auth-db | PostgreSQL init process complete; ready for start up.
    mainflux-auth-db |
    mainflux-auth-db | 2022-08-23 07:57:07.639 UTC [1] LOG:  starting PostgreSQL 13.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.3.1_git20210424) 10.3.1 20210424, 64-bit
    mainflux-auth-db | 2022-08-23 07:57:07.650 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
    mainflux-auth-db | 2022-08-23 07:57:07.650 UTC [1] LOG:  listening on IPv6 address "::", port 5432
    mainflux-auth-db | 2022-08-23 07:57:07.685 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    mainflux-auth-db | 2022-08-23 07:57:07.714 UTC [50] LOG:  database system was shut down at 2022-08-23 07:57:07 UTC
    mainflux-auth-db | 2022-08-23 07:57:07.747 UTC [1] LOG:  database system is ready to accept connections
    mainflux-coap   | 2022/08/23 07:57:12 The binary was build using Nats as the message broker
    mainflux-coap   | {"level":"info","message":"gRPC communication is not encrypted","ts":"2022-08-23T07:57:12.189149687Z"}
    mainflux-coap   | {"level":"error","message":"Failed to connect to message broker: dial tcp 172.18.0.5:4222: i/o timeout","ts":"2022-08-23T07:57:14.283573538Z"}
    mainflux-coap   | 2022/08/23 07:57:18 The binary was build using Nats as the message broker
    mainflux-coap   | {"level":"info","message":"gRPC communication is not encrypted","ts":"2022-08-23T07:57:18.56438903Z"}
    mainflux-coap   | {"level":"error","message":"Failed to connect to message broker: dial tcp 172.18.0.5:4222: i/o timeout","ts":"2022-08-23T07:57:20.586327157Z"}
    mainflux-coap   | 2022/08/23 07:57:24 The binary was build using Nats as the message broker
    mainflux-coap   | {"level":"info","message":"gRPC communication is not encrypted","ts":"2022-08-23T07:57:24.339861285Z"}
    mainflux-coap   | {"level":"error","message":"Failed to connect to message broker: dial tcp 172.18.0.5:4222: i/o timeout","ts":"2022-08-23T07:57:26.350621388Z"}
    mainflux-coap   | 2022/08/23 07:57:30 The binary was build using Nats as the message broker
    mainflux-coap   | {"level":"info","message":"gRPC communication is not encrypted","ts":"2022-08-23T07:57:30.231964825Z"}
    mainflux-coap   | {"level":"error","message":"Failed to connect to message broker: dial tcp 172.18.0.5:4222: i/o timeout","ts":"2022-08-23T07:57:32.244119421Z"}
    mainflux-coap   | {"level":"info","message":"gRPC communication is not encrypted","ts":"2022-08-23T07:57:36.285797597Z"}
    
    ...
    

    all log is long (~500 lines)

  • docker-compose fails

    docker-compose fails

    docker-compose us is running out-of-order dockers.

    Without a backoff and re-try with timeour in services themselves, we can forget about using docker-compose and we must fallback to previous starting script.

    drasko@Marx:~/go/src/github.com/mainflux/mainflux/docker$ docker-compose up
    Creating mainflux-manager ... 
    Creating mainflux-nats ... 
    Creating mainflux-postgres ... 
    Creating mainflux-normalizer ... 
    Creating mainflux-manager
    Creating mainflux-nginx ... 
    Creating mainflux-nats
    Creating mainflux-normalizer
    Creating mainflux-nginx
    Creating mainflux-nats ... done
    Creating mainflux-http ... 
    Creating mainflux-mqtt ... 
    Creating mainflux-mqtt
    Creating mainflux-mqtt ... done
    Attaching to mainflux-manager, mainflux-nats, mainflux-normalizer, mainflux-postgres, mainflux-nginx, mainflux-http, mainflux-mqtt
    mainflux-manager | {"error":"dial tcp: lookup postgres on 10.20.0.1:53: no such host","ts":"2018-03-13T02:17:55.877664432Z"}
    mainflux-nats   | [1] 2018/03/13 02:17:56.008535 [INF] Starting nats-server version 1.0.2
    mainflux-nats   | [1] 2018/03/13 02:17:56.008625 [INF] Starting http monitor on 0.0.0.0:8222
    mainflux-normalizer | {"error":"Failed to connect: nats: no servers available for connection","ts":"2018-03-13T02:17:56.16486139Z"}
    mainflux-nats   | [1] 2018/03/13 02:17:56.008662 [INF] Listening for client connections on 0.0.0.0:4222
    mainflux-nats   | [1] 2018/03/13 02:17:56.008666 [INF] Server is ready
    mainflux-postgres | The files belonging to this database system will be owned by user "postgres".
    mainflux-postgres | This user must also own the server process.
    mainflux-postgres | 
    mainflux-nats   | [1] 2018/03/13 02:17:56.134986 [INF] Listening for route connections on 0.0.0.0:6222
    mainflux-nginx  | 2018/03/13 02:17:56 [emerg] 1#1: host not found in upstream "mainflux-manager:8180" in /etc/nginx/nginx.conf:58
    mainflux-postgres | The database cluster will be initialized with locale "en_US.utf8".
    mainflux-http   | {"error":"nats: no servers available for connection","ts":"2018-03-13T02:17:56.689929955Z"}
    mainflux-nginx  | nginx: [emerg] host not found in upstream "mainflux-manager:8180" in /etc/nginx/nginx.conf:58
    mainflux-postgres | The default database encoding has accordingly been set to "UTF8".
    mainflux-postgres | The default text search configuration will be set to "english".
    mainflux-postgres | 
    mainflux-postgres | Data page checksums are disabled.
    mainflux-postgres | 
    mainflux-manager exited with code 1
    mainflux-postgres | fixing permissions on existing directory /var/lib/postgresql/data ... ok
    mainflux-postgres | creating subdirectories ... ok
    mainflux-postgres | selecting default max_connections ... 100
    mainflux-postgres | selecting default shared_buffers ... 128MB
    mainflux-postgres | selecting dynamic shared memory implementation ... posix
    mainflux-postgres | creating configuration files ... ok
    mainflux-normalizer exited with code 1
    mainflux-postgres | running bootstrap script ... ok
    mainflux-postgres | performing post-bootstrap initialization ... sh: locale: not found
    mainflux-postgres | 2018-03-13 02:17:56.543 UTC [29] WARNING:  no usable system locales were found
    mainflux-postgres | ok
    mainflux-postgres | syncing data to disk ... ok
    mainflux-postgres | 
    mainflux-postgres | Success. You can now start the database server using:
    mainflux-postgres | 
    mainflux-postgres |     pg_ctl -D /var/lib/postgresql/data -l logfile start
    mainflux-postgres | 
    mainflux-postgres | 
    mainflux-postgres | WARNING: enabling "trust" authentication for local connections
    mainflux-postgres | You can change this by editing pg_hba.conf or using the option -A, or
    mainflux-postgres | --auth-local and --auth-host, the next time you run initdb.
    mainflux-postgres | waiting for server to start....2018-03-13 02:17:56.858 UTC [34] LOG:  listening on IPv4 address "127.0.0.1", port 5432
    mainflux-postgres | 2018-03-13 02:17:56.858 UTC [34] LOG:  could not bind IPv6 address "::1": Address not available
    mainflux-postgres | 2018-03-13 02:17:56.858 UTC [34] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
    mainflux-postgres | 2018-03-13 02:17:56.865 UTC [34] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    mainflux-postgres | 2018-03-13 02:17:56.883 UTC [35] LOG:  database system was shut down at 2018-03-13 02:17:56 UTC
    mainflux-postgres | 2018-03-13 02:17:56.887 UTC [34] LOG:  database system is ready to accept connections
    mainflux-postgres |  done
    mainflux-postgres | server started
    mainflux-mqtt   | {"pid":1,"hostname":"2bc75be03e01","level":30,"time":1520907476986,"msg":"listening","address":"::","family":"IPv6","port":8880,"protocol":"http","v":1}
    mainflux-mqtt   | {"pid":1,"hostname":"2bc75be03e01","level":30,"time":1520907476988,"msg":"listening","address":"::","family":"IPv6","port":1883,"protocol":"tcp","v":1}
    mainflux-mqtt   | events.js:165
    mainflux-mqtt   |       throw err;
    mainflux-mqtt   |       ^
    mainflux-mqtt   | 
    mainflux-mqtt   | Error: Uncaught, unspecified "error" event. (Could not connect to server: Error: getaddrinfo ENOTFOUND nats nats:4222)
    mainflux-mqtt   |     at Client.emit (events.js:163:17)
    mainflux-mqtt   |     at Socket.<anonymous> (/node_modules/nats/lib/nats.js:405:14)
    mainflux-mqtt   |     at emitOne (events.js:96:13)
    mainflux-mqtt   |     at Socket.emit (events.js:188:7)
    mainflux-mqtt   |     at connectErrorNT (net.js:1025:8)
    mainflux-mqtt   |     at _combinedTickCallback (internal/process/next_tick.js:80:11)
    mainflux-mqtt   |     at process._tickCallback (internal/process/next_tick.js:104:9)
    mainflux-nginx exited with code 1
    mainflux-http exited with code 1
    mainflux-postgres | CREATE DATABASE
    mainflux-postgres | 
    mainflux-postgres | CREATE ROLE
    mainflux-postgres | 
    mainflux-postgres | 
    mainflux-postgres | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
    mainflux-postgres | 
    mainflux-postgres | waiting for server to shut down....2018-03-13 02:17:57.224 UTC [34] LOG:  received fast shutdown request
    mainflux-postgres | 2018-03-13 02:17:57.228 UTC [34] LOG:  aborting any active transactions
    mainflux-postgres | 2018-03-13 02:17:57.229 UTC [34] LOG:  worker process: logical replication launcher (PID 41) exited with exit code 1
    mainflux-postgres | 2018-03-13 02:17:57.229 UTC [36] LOG:  shutting down
    mainflux-postgres | 2018-03-13 02:17:57.262 UTC [34] LOG:  database system is shut down
    mainflux-postgres |  done
    mainflux-postgres | server stopped
    mainflux-postgres | 
    mainflux-postgres | PostgreSQL init process complete; ready for start up.
    mainflux-postgres | 
    mainflux-postgres | 2018-03-13 02:17:57.335 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
    mainflux-postgres | 2018-03-13 02:17:57.335 UTC [1] LOG:  listening on IPv6 address "::", port 5432
    mainflux-postgres | 2018-03-13 02:17:57.343 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
    mainflux-postgres | 2018-03-13 02:17:57.370 UTC [47] LOG:  database system was shut down at 2018-03-13 02:17:57 UTC
    mainflux-postgres | 2018-03-13 02:17:57.378 UTC [1] LOG:  database system is ready to accept connections
    mainflux-mqtt exited with code 1
    
  • MF-388 Helm Charts for Mainflux

    MF-388 Helm Charts for Mainflux

    What does this do?

    It includes the necessary yaml files to deploy Mainflux in a Kubernetes cluster using helm

    Which issue(s) does this PR fix/relate to?

    Somehow it lays the foundation stone for issue #388 (Create Helm package for Mainlfux Kubernetes #388)

    List any changes that modify/break current functionality

    Some changes were also introduced in the Kubernetes deployment to align with this new functionality. For instance, it includes necessary yaml files to optionally deploy a load balancer (metal-lb) in a bare-metal Kubernetes cluster.

    Have you included tests for your changes?

    No, but it was properly tested in a bare-metal Kubernetes cluster. Note Istio ingress was not used, but Nginx.

    Did you document any new/modified functionality?

    Yes, including corresponding README files.

    Notes

    I am not very used to provide changes using git (git rebase and so on), but using gerrit for that, so there might be things not very well done, my apologies for that. On the other hand, I am not sure which is the MF Id that I should use.

  •  MF-1425 - Support external UUIDs for Things and Channels

    MF-1425 - Support external UUIDs for Things and Channels

    MF-1425 Enhancement to supply an external UUID for Things and Channels.

    What does this do?

    This is the same PR for MF-1425 - Enhancement for external UUID #1426, but tried to resolve the conflicts

    Which issue(s) does this PR fix/relate to?

    Resolves #MF-1425

    Notes

    I cannot @aspnair. If anyone in Mainflux can review this, and may ask aspnair take a look as well.

  • MF-484 - Add bulk provisioning for things and channels

    MF-484 - Add bulk provisioning for things and channels

    What does this do?

    Adds an endpoint for provisioning multiple things or channels. A transaction is used and will rollback changes if there are any errors. SDK function allows a JSON or CSV file to be provided for specifying entities.

    Which issue(s) does this PR fix/relate to?

    Resolves #484.

    List any changes that modify/break current functionality

    An initial provisioning method was already implemented in the CLI by making multiple calls to create a thing. This moves that functionality out of the CLI to a JSON endpoint, adds transactions, and provides a convenient method to specify a file of entities.

    Have you included tests for your changes?

    Yes

    Did you document any new/modified functionality?

    Yes

    Notes

  • MF-838 - Migration to Go Module

    MF-838 - Migration to Go Module

    What does this do?

    It adds go.mod and go.sum into the project. Also, we can remove the Go Dep files.

    Which issue(s) does this PR fix/relate to?

    Resolves #838

    List any changes that modify/break current functionality

    There are no breaking changes, but if we remove go dep file, we break the Go Dep compatibility.

    Notes

    We can create specific go.mod for each independent component.

  • Message Writer Problem

    Message Writer Problem

    Hi,

    I got this error when I want to install mainflux with docker. Whats the reason?

    ERROR: repository mainflux/message-writer not found: does not exist or no pull access

    Thanks


    Starting NATS, Cassandra and Nginx...

    Starting nats ... done Starting cassandra ... done

    Waiting for Cassandra to start. This takes time, please be patient... .............OK

    Starting Mainflux composition...

    Pulling mqtt-adapter (mainflux/mqtt-adapter:latest)... latest: Pulling from mainflux/mqtt-adapter Digest: sha256:d17b25a10c1f5ad53d8865ceb714bca29e7f9179a4275596fa4ccaa25f577422 Status: Image is up to date for mainflux/mqtt-adapter:latest Pulling manager (mainflux/manager:latest)... latest: Pulling from mainflux/manager Digest: sha256:8119f293e2c275df2c7008d1ab9db9fbdec6ea3ff59789f2c619d662bfba5543 Status: Image is up to date for mainflux/manager:latest Pulling message-writer (mainflux/message-writer:latest)... ERROR: repository mainflux/message-writer not found: does not exist or no pull access Aborting due to errexit on line 122. Exit code: 1 Starting mqtt-adapter ... done Starting manager ... done Starting message-writer ... done Starting http-adapter ... done

    Starting Nginx...

    Starting nginx ... done ERROR: No containers to start Aborting due to errexit on line 136. Exit code: 1

    Stopping Nginx...

    Stopping Mainflux composition...

    Stopping mainflux-http ... done Stopping mainflux-message-writer ... done

    Stopping NATS and Cassandra...

    Stopping mainflux-cassandra ... done Stopping mainflux-nats ... done

    *** MAINFLUX IS OFF ***

  • Add bulk provisioning via CSV files

    Add bulk provisioning via CSV files

    An API endpoint should be added so that we can send a CSV file and do automatic provisioning of a series of entities.

    This provisioning should be done in a transaction, so that we can roll-back the changes in the case of error.

  • MF-426 - Add optional MF_CA_CERTS env variable to allow GRPC client to use TLS certs

    MF-426 - Add optional MF_CA_CERTS env variable to allow GRPC client to use TLS certs

    What does this do?

    Allows a user to specify a path to their own trusted certs file via environmental variable MF_CA_CERTS.

    Which issue(s) does this PR fix/relate to?

    related #426

    List any changes that modify/break current functionality

    None

    Have you included tests for your changes?

    Not yet

    Did you document any new/modified functionality?

    Not yet

    Notes

    Wanted to get the idea out for feedback before moving onto other components

  • NOISSUE - Adding subtopics filtering in writer services

    NOISSUE - Adding subtopics filtering in writer services

    What does this do?

    Adding subtopic's filtering for each writer service. It is strongly based on channel's filtering.

    Which issue(s) does this PR fix/relate to?

    Also resolves #925.

    List any changes that modify/break current functionality

    Have you included tests for your changes?

    Did you document any new/modified functionality?

    Update readme of each writer service with new

    Notes

    I have also refactored a little part of the main code of every writer services to centralize duplicate code into writer package.

  • Draft : PoC Unify repo

    Draft : PoC Unify repo

    Pull request title should be MF-XXX - description or NOISSUE - description where XXX is ID of issue that this PR relate to. Please review the CONTRIBUTING.md file for detailed contributing guidelines.

    What does this do?

    Which issue(s) does this PR fix/relate to?

    Put here Resolves #XXX to auto-close the issue that your PR fixes (if such)

    List any changes that modify/break current functionality

    Have you included tests for your changes?

    Did you document any new/modified functionality?

    Notes

  • Environment variables name consistency

    Environment variables name consistency

    ENHANCEMENT

    1. Describe the enhancement you are requesting. Enhancements include:

      • tests
      • code refactor Environment variables are not consistent in all service main.go , The consistent naming of environment variable will help use to maintain and load environment variables by common function and also help in elimination code reptation
      • documentation
      • research
      • tooling
    2. Indicate the importance of this enhancement to you (must-have, should-have, nice-to-have). must-have

  •  Move database abstract of all service to common package

    Move database abstract of all service to common package

    ENHANCEMENT

    1. Describe the enhancement you are requesting. Enhancements include:

      • tests
      • code refactor Database abstract are same for all service, so it will be better if we move them to common package, This improves code reusability
      • documentation
      • research
      • tooling
    2. Indicate the importance of this enhancement to you (must-have, should-have, nice-to-have). must-have

  • Can not using token from api /tokens immediately

    Can not using token from api /tokens immediately

    when I used API/tokens to get tokens for authenticating, and I use the token to get the list channel (channel API). All requests to API were developed by Java. My program response 401 HTTP code from API get list of channels, but when I call two API with some delay time between two requests, everything is fine. here is the log from auth service. is it a bug of mainflux 0.12.1?

    image

  • Certs SDK failed during sending  post request to issue certificate endpoint

    Certs SDK failed during sending post request to issue certificate endpoint

    BUG REPORT

    1. What were you trying to achieve? Issue certificate via certs SDK

    2. What are the expected results? Got error mainflux-certs | {"level":"error","message":"missing or invalid bearer user token","ts":"2022-12-20T11:24:43.386719999Z"}

    3. What are the received results? Issue of certificate

    4. What are the steps to reproduce the issue?

    5. In what environment did you encounter the issue? Linux

    6. Additional information you deem important: Certs SDK add keyword bearer and it is not using the latest code for sending request https://github.com/mainflux/mainflux/blob/master/pkg/sdk/go/certs.go#L74-L88 https://github.com/mainflux/mainflux/blob/master/pkg/sdk/go/certs.go#L37

  • Upgrade from 0.12.1 to 0.13.0 (latest version) causes error in user deployment

    Upgrade from 0.12.1 to 0.13.0 (latest version) causes error in user deployment

    Hi, I'm building an application on top of Mainflux, and I'm using docker and k8s for deployment. All services in use now are in v0.12.1, my db is PostgreSQL12, and it runs smoothly without throwing any error.

    However, I'm trying to upgrade Mainflux version to 0.13.0, by changing configs in k8s to pull Mainflux latest version (0.13.0). All of my services still running, except user deployment.

    image

    When checking source code, I found that in ~/cmd/users/main.go, func createAdmin was add new parameter auth image

    I also changed docker config deployment, followed the config in ~/docker/.env, but it's not worth. If I used the same config for deploying v0.12.1, everything would be fine, included user deployment module.

    Was that the main reason causing my error?

IoT platform with things/user management and visualization, in Go with Docker using microservices

BARIOT IoT platform to Manage Users and their Things and visualize their data. Microservices services architecture build with Go and docker (compose).

Jun 22, 2022
Whichip: discover (IoT) device's IP in local network
Whichip: discover (IoT) device's IP in local network

whichip: discover (IoT) device's IP in local network Install On (IoT) Device wget -O install.sh

Dec 8, 2021
Exploring and comparing different IOT messaging protocols / transports.

IOT Messaging Protocols Blynk https://blynk.io/ A fully integrated suite of IoT software Device provisioning Sensor data visualization Remote control

Jan 2, 2022
A opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with minimal TCO

infinimesh IoT Platform infinimesh is a opinionated multi-tenant hyperscale Internet of Things platform to connect IoT devices fast and securely with

Feb 14, 2022
An Open-Source Platform for Quantified Self & IoT
An Open-Source Platform for Quantified Self & IoT

Heedy Note: Heedy is currently in alpha. You can try it out by downloading it from the releases page, but there is no guarantee that future versions w

Jan 1, 2023
Next-generation IoT open source platform.
Next-generation IoT open source platform.

tKeel Next-generation IoT open source platform High performance, High security and easy to use tKeel is a strong and reusable IoT platform that helps

Dec 28, 2022
Golang framework for robotics, drones, and the Internet of Things (IoT)
Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of

Dec 29, 2022
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)
Gobot - Golang framework for robotics, drones, and the Internet of Things (IoT)

Gobot (https://gobot.io/) is a framework using the Go programming language (https://golang.org/) for robotics, physical computing, and the Internet of Things.

Jan 8, 2023
Suite of libraries for IoT devices (written in Go), experimental for x/exp/io

Go libraries/drivers for IoT devices This repo contains a suite of libraries for IoT devices/sensors/actuators. The suite is meant to be as dependency

Sep 26, 2022
Make IoT a lot more fun with data.

Eywa What is Eywa? "Eywa is the guiding force and deity of Pandora and the Na'vi. All living things on Pandora connect to Eywa." -- Avatar Wiki Projec

Nov 28, 2022
A Go client for Google IoT Core

IoT A simple framework for implementing a Google IoT device. This package makes use of the context package to handle request cancelation, timeouts, an

Sep 26, 2022
An embeddable lightweight Go/Golang MQTT broker(server) for IoT.
An embeddable lightweight Go/Golang MQTT broker(server) for IoT.

Snple MQTT 简体中文 Note: The API of this library is still unstable and has not been sufficiently tested, please do not use it in production environments.

Sep 12, 2022
🐼 IoT worm written in pure golang.
🐼 IoT worm written in pure golang.

GoriaNet Most powerfull cross compiler (27arch). Kill process by port and check for duplicate instance. Killing process by port. Cross compiler. Infor

Oct 17, 2022
Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT.
Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT.

Vallox RS-485 MQTT gateway to integrate Vallox RS485 ventilation device to Home Assistant via MQTT. Implements Home Assistant MQTT discovery but can also be used without Home Assistant.

Dec 26, 2021
Dwarka - API gateway offers REST API to manage various device controlled using MQTT protocol

dwarka API gateway offers REST API to manage various device controlled using 'MQ

Sep 16, 2022
A realtime teenage driver behaviour monitoring system integrating OBII sensor, smart watch, smartphone, and Raspberry Pi, which examines over time novice teenage driving performance and risk

DriverMonitor A realtime teenage driver behaviour monitoring system integrating OBII sensor, smart watch, smartphone, and Raspberry Pi, which examines

Nov 27, 2021
Secure and Interoperable Internet of Things

plgd Cloud Internet of Things (IoT) technologies have evolved rapidly in recent years and continue to change how we interact with our surroundings. Fo

Dec 26, 2022
Securely access remote devices and servers
Securely access remote devices and servers

Deviceplane is an open source device management tool for embedded systems and edge computing. It solves various infrastructure problems related to rem

Dec 15, 2022
Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors
Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors

pumpkin-pi ?? Raspberry pi project that controls jack-o-lantern via servo motor and PIR motion sensors to simulate it "watching" you. Inspired by Ryde

Sep 13, 2022