kandi background
Explore Kits

thingsboard | data collection

 by   thingsboard Java Version: v3.3.4.1 License: Non-SPDX

 by   thingsboard Java Version: v3.3.4.1 License: Non-SPDX

Download this library from

kandi X-RAY | thingsboard Summary

thingsboard is a Java library typically used in Manufacturing, Utilities, Machinery, Process, Internet of Things (IoT), Kafka applications. thingsboard has no bugs, it has no vulnerabilities, it has build file available and it has high support. However thingsboard has a Non-SPDX License. You can download it from GitHub.
ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • thingsboard has a highly active ecosystem.
  • It has 11496 star(s) with 3626 fork(s). There are 527 watchers for this library.
  • There were 2 major release(s) in the last 6 months.
  • There are 1548 open issues and 2243 have been closed. On average issues are closed in 34 days. There are 72 open pull requests and 0 closed requests.
  • It has a negative sentiment in the developer community.
  • The latest version of thingsboard is v3.3.4.1
thingsboard Support
Best in #Java
Average in #Java
thingsboard Support
Best in #Java
Average in #Java

quality kandi Quality

  • thingsboard has 0 bugs and 0 code smells.
thingsboard Quality
Best in #Java
Average in #Java
thingsboard Quality
Best in #Java
Average in #Java

securitySecurity

  • thingsboard has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • thingsboard code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
thingsboard Security
Best in #Java
Average in #Java
thingsboard Security
Best in #Java
Average in #Java

license License

  • thingsboard has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
thingsboard License
Best in #Java
Average in #Java
thingsboard License
Best in #Java
Average in #Java

buildReuse

  • thingsboard releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are available. Examples and code snippets are not available.
  • thingsboard saves you 127305 person hours of effort in developing the same functionality from scratch.
  • It has 211171 lines of code, 12552 functions and 3710 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
thingsboard Reuse
Best in #Java
Average in #Java
thingsboard Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed thingsboard and discovered the below as its top functions. This is intended to give you an instant insight into thingsboard implemented functionality, and help decide if they suit your requirements.

  • Performs the actual installation .
  • Saves demo data .
  • Construct the action data .
  • Pushes entity action to rule engine .
  • Updates the PostgreSQL database .
  • Get Efento measurements
  • Process a toTransport message .
  • Creates a key specification from the given encoded key .
  • Process a device publish message .
  • Prepares the entity key mapping .

thingsboard Key Features

Open-source IoT Platform - Device management, data collection, processing and visualization.

Template content is an empty document fragment

copy iconCopydownload iconDownload
const template = document.createElement('template');
template.appendChild(document.createElement('div'));
console.log(template.content); // #document-fragment (empty)

Which are the user and password for the Postgres database inside the thingsboard/tb-cassandra Docker container?

copy iconCopydownload iconDownload
    environment:
      POSTGRES_DB: thingsboard
      POSTGRES_PASSWORD: postgres

how i can add values to my Adress endpoint in wso2 ESB/EI

copy iconCopydownload iconDownload
<?xml version="1.0" encoding="UTF-8"?>
<template xmlns="http://ws.apache.org/ns/synapse" name="rabbitmq.sender">
   <parameter name="exchangeName"/>
   <parameter name="routingKey"/>
   <sequence>
      <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
      <header name="To"
              scope="default"
              expression="concat('rabbitmq:/?rabbitmq.connection.factory=CachedRabbitMQConnectionFactory&amp;rabbitmq.exchange.name=',$func:exchangeName,'&amp;rabbitmq.queue.routing.key=',$func:routingKey)"/>
      <send/>
   </sequence>
</template>
<call-template target="send.rabbitmq">
    <with-param name="exchangeName" value="test"/>
    <with-param name="routingKey" value="{get-property('testValue')}"/>
</call-template>
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<template xmlns="http://ws.apache.org/ns/synapse" name="rabbitmq.sender">
   <parameter name="exchangeName"/>
   <parameter name="routingKey"/>
   <sequence>
      <property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
      <header name="To"
              scope="default"
              expression="concat('rabbitmq:/?rabbitmq.connection.factory=CachedRabbitMQConnectionFactory&amp;rabbitmq.exchange.name=',$func:exchangeName,'&amp;rabbitmq.queue.routing.key=',$func:routingKey)"/>
      <send/>
   </sequence>
</template>
<call-template target="send.rabbitmq">
    <with-param name="exchangeName" value="test"/>
    <with-param name="routingKey" value="{get-property('testValue')}"/>
</call-template>

How to modify ChirpStack Simulator payload

copy iconCopydownload iconDownload
replace github.com/brocaar/chirpstack-api/go/v3 v3.1.3 => ./chirpstack-api/go/

Upgrading Postgres from 10 to 12 -- problem with encodings

copy iconCopydownload iconDownload
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/data -l logfile start
waiting for server to start.... done
server started
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_upgrade \
--old-datadir=/var/lib/postgresql/10/main \
--new-datadir=/var/lib/postgresql/12/main \

[...]

sudo pg_createcluster  --locale=C 12 ascii 
Creating new PostgreSQL cluster 12/ascii ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/ascii --auth-local peer --auth-host md5 --locale C
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/ascii ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/Los_Angeles
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:


    pg_ctlcluster 12 ascii start

Ver Cluster Port Status Owner    Data directory               Log file
12  ascii   5434 down   postgres /var/lib/postgresql/12/ascii /var/log/postgresql/postgresql-12-ascii.log


postgres=# \l
                             List of databases
   Name    |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
-----------+----------+-----------+---------+-------+-----------------------
 postgres  | postgres | SQL_ASCII | C       | C     | 
 template0 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
 template1 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
(3 rows)

-----------------------
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/data -l logfile start
waiting for server to start.... done
server started
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_upgrade \
--old-datadir=/var/lib/postgresql/10/main \
--new-datadir=/var/lib/postgresql/12/main \

[...]

sudo pg_createcluster  --locale=C 12 ascii 
Creating new PostgreSQL cluster 12/ascii ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/ascii --auth-local peer --auth-host md5 --locale C
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/ascii ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/Los_Angeles
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:


    pg_ctlcluster 12 ascii start

Ver Cluster Port Status Owner    Data directory               Log file
12  ascii   5434 down   postgres /var/lib/postgresql/12/ascii /var/log/postgresql/postgresql-12-ascii.log


postgres=# \l
                             List of databases
   Name    |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
-----------+----------+-----------+---------+-------+-----------------------
 postgres  | postgres | SQL_ASCII | C       | C     | 
 template0 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
 template1 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
(3 rows)

-----------------------
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_ctl -D /var/lib/postgresql/12/data -l logfile start
waiting for server to start.... done
server started
postgres@serverbot:~$ /usr/lib/postgresql/12/bin/pg_upgrade \
--old-datadir=/var/lib/postgresql/10/main \
--new-datadir=/var/lib/postgresql/12/main \

[...]

sudo pg_createcluster  --locale=C 12 ascii 
Creating new PostgreSQL cluster 12/ascii ...
/usr/lib/postgresql/12/bin/initdb -D /var/lib/postgresql/12/ascii --auth-local peer --auth-host md5 --locale C
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default database encoding has accordingly been set to "SQL_ASCII".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/12/ascii ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/Los_Angeles
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

Success. You can now start the database server using:


    pg_ctlcluster 12 ascii start

Ver Cluster Port Status Owner    Data directory               Log file
12  ascii   5434 down   postgres /var/lib/postgresql/12/ascii /var/log/postgresql/postgresql-12-ascii.log


postgres=# \l
                             List of databases
   Name    |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
-----------+----------+-----------+---------+-------+-----------------------
 postgres  | postgres | SQL_ASCII | C       | C     | 
 template0 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
 template1 | postgres | SQL_ASCII | C       | C     | =c/postgres          +
           |          |           |         |       | postgres=CTc/postgres
(3 rows)

How do I delay clearing a ThingsBoard alarm?

copy iconCopydownload iconDownload
var alarmTime = Number(metadata.ss_lastWaterTempAlarmTime);
var alarmDelay = Number(metadata.ss_clearAlarmTimeDelay);
return metadata.ts >= alarmDelay + alarmTime;

Thingsboard Dashboard Entities table with Entity Views

copy iconCopydownload iconDownload
var $injector = widgetContext.$scope.$injector;

$injector.get(widgetContext.servicesMap.get('entityViewService')).getEntityView(entityId.id).subscribe(function(entity) {
    console.log(entity)
    if (entity.name == 'Powermeter1') {
        openDashboardState('energy_state_1')
    }
    else if(entity.name == 'Powermeter2') {
        openDashboardState('water_state_2')
    }
});

function openDashboardState(stateId) {
    var params = {
        entityId: entityId,
        entityName: entityName
    }

    widgetContext.stateController.openState(stateId, params,
        false);
}

Thingsboard Dashboard Custom Action NullInjectorError

copy iconCopydownload iconDownload
var $injector = widgetContext.$scope.$injector;

$injector.get(widgetContext.servicesMap.get('deviceService')).getDevice(entityId.id).subscribe(function(device) {
        if (device.type == 'energy sensor') {
            openDashboardState('energy_state')
        }
        else if(device.type == 'water sensor') {
            openDashboardState('water_state')
        }
        else {
            openDashboardState('temperature_state')
        }
});

function openDashboardState(stateId) {
    var params = {
        entityId: entityId,
        entityName: entityName
    }

    widgetContext.stateController.openState(stateId, params,
        false);
}

Dockerized ThingsBoard + dockerized PostgreSQL

copy iconCopydownload iconDownload
docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp --name thingsboard --restart always -e SPRING_DATASOURCE_URL=jdbc:postgresql://<MY_LOCAL_IP>:5432/thingsboard -e SPRING_DATASOURCE_USERNAME=postgres -e SPRING_DATASOURCE_PASSWORD=postgres thingsboard/tb-postgres

Forward decoded POST data to other URL using Express

copy iconCopydownload iconDownload
const express = require('express');
const app = express();

app.post('/', (req, res) => {

  app.locals['decoder'] = { data: "This is my decoder data"};

  res.send('Successfully to add decoder data');
});

app.get('/', (req, res) => {
  res.send(app.locals['decoder']);
} )

app.listen(3000, () => {
  console.log('Server is up');
});
const axios = require('axios');

app.post('/', (req, res) => {
  const decoder = { data: "This is my decoder data"};
  // method of external-endpoint: e.g: POST
  axios.post('https://www.example-website.com/api/v1/example-endpoint', decoder)
    .then(response => {
      console.log(response);
    }).catch(ex => {
      console.log(ex);
    })
})
-----------------------
const express = require('express');
const app = express();

app.post('/', (req, res) => {

  app.locals['decoder'] = { data: "This is my decoder data"};

  res.send('Successfully to add decoder data');
});

app.get('/', (req, res) => {
  res.send(app.locals['decoder']);
} )

app.listen(3000, () => {
  console.log('Server is up');
});
const axios = require('axios');

app.post('/', (req, res) => {
  const decoder = { data: "This is my decoder data"};
  // method of external-endpoint: e.g: POST
  axios.post('https://www.example-website.com/api/v1/example-endpoint', decoder)
    .then(response => {
      console.log(response);
    }).catch(ex => {
      console.log(ex);
    })
})

Community Discussions

Trending Discussions on thingsboard
  • Deploying Python scripts in a production environment
  • Template content is an empty document fragment
  • Thingsboard AWS server freezes
  • Which are the user and password for the Postgres database inside the thingsboard/tb-cassandra Docker container?
  • Thingsboard Gateway REST connector fails to initialize
  • How to get live connection status of devices in ThingsBoard?
  • Thingsboard: Fails to read valid JSON payload when timestamp is in ISO 8601 format
  • save/load thingsboard configuration
  • How do I show all my customers on a widget in ThingsBoard?
  • Polygon not showing on ThingsBoard Trip Animation Widget
Trending Discussions on thingsboard

QUESTION

Deploying Python scripts in a production environment

Asked 2022-Mar-09 at 14:54

recently, our company has been using Thingsboard which has a Python API so subsequently we have been using quite a few Python scripts to manipulate data from text files and send this data into the Thingsboard platform for ingest. At the moment we are running quite a few of these file listening scripts in debug mode in VSCode. We ultimately need to deploy these Python scripts on a Windows Server 2019 machine for a production environment. My question is: What is the recommended way to host/deploy these scripts? They idealy need to be monitored to make sure they are running and send alerts if they stop running or except. Some of the scripts are single file .py scripts. Some scripts have multiple files with classes and data files. Ideally they will have there own venv. I have thought about packaging them into an .exe and creating a service for each script. I have also considered using something like dkango, (I have no exerience of django so don't know if this is suitable). I have also considered using docker for each script. What would you do?

ANSWER

Answered 2022-Mar-09 at 14:54

I don't know if it is the best way or not, but you can turn them into exe (and convert them to services), here is another stackoverflow page with different aproches for this: How can I convert a .py to .exe for Python?

docker is a nice aproche, but I don't see any good point for why using them.

About monitoring, you can eather create a visual application (where you can even change values and stuff) but not possible in services. Or simply having a log.txt file that you print stuff in.

That s what I would do, again I don't know if that s the best way of doing it.

Source https://stackoverflow.com/questions/71407859

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install thingsboard

Collect and Visualize your IoT data in minutes by following this guide.

Support

ThingsBoard documentation is hosted on thingsboard.io.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.