thingsboard | 开源物联网平台thingsboard源码分析

 by   sanshengshui Java Version: Current License: Non-SPDX

kandi X-RAY | thingsboard Summary

kandi X-RAY | thingsboard Summary

thingsboard is a Java library. thingsboard has build file available and it has high support. However thingsboard has 98 bugs, it has 3 vulnerabilities and it has a Non-SPDX License. You can download it from GitHub.

开源物联网平台thingsboard源码分析
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              thingsboard has a highly active ecosystem.
              It has 24 star(s) with 13 fork(s). There are 3 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              thingsboard has no issues reported. There are no pull requests.
              OutlinedDot
              It has a negative sentiment in the developer community.
              The latest version of thingsboard is current.

            kandi-Quality Quality

              OutlinedDot
              thingsboard has 98 bugs (2 blocker, 2 critical, 39 major, 55 minor) and 1223 code smells.

            kandi-Security Security

              thingsboard has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              thingsboard code analysis shows 3 unresolved vulnerabilities (0 blocker, 3 critical, 0 major, 0 minor).
              There are 50 security hotspots that need review.

            kandi-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.

            kandi-Reuse Reuse

              thingsboard releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              It has 74566 lines of code, 4800 functions and 1580 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            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.
            • Updates Cassandra database .
            • Push entity action to rule engine .
            • Save rule chain metadata .
            • Construct the action data .
            • Performs the necessary upgrade .
            • Process message .
            • Find and aggregate .
            • Starts the coAP request .
            • Process incoming request .
            • Run random messages .
            Get all kandi verified functions for this library.

            thingsboard Key Features

            No Key Features are available at this moment for thingsboard.

            thingsboard Examples and Code Snippets

            No Code Snippets are available at this moment for thingsboard.

            Community Discussions

            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

            QUESTION

            Template content is an empty document fragment
            Asked 2022-Jan-19 at 22:25

            Not a duplicate of Template tag content is empty - A bug in Angular, while my question is about Vanilla Js.

            I am working on a ThingsBoard widget. In the HTML tab, I have this simple template:

            ...

            ANSWER

            Answered 2022-Jan-19 at 22:25

            If your ThingsBoard example is using React or a similar DOM library, it might be programmatically creating the DOM, which could cause this issue.

            When a is constructed programmatically, using appendChild, the content remains empty. For example:

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

            QUESTION

            Thingsboard AWS server freezes
            Asked 2021-Dec-30 at 11:56

            I want to run a self managed Thingsboard on AWS (t2.micro).

            I have installed Thingsboard CE on a t2.micro AWS instance running Ubuntu 20.04 sever.
            I followed the aws setup and Ubuntu install guides(postgresql + built in queue service).

            I also set up haproxy using this guide.

            I was able to successfully log in to my Thingsboard. I only changed the passwords and checked the basic functionalities, but didn't create any new dashboards or made any modifications.

            After this I left the computer on, running Thingsboard. Next day I could not reach Thingsboard and although the AWS instance was running I could not ssh into it anymore. After stopping and starting(reboot didn't work) the instance everything was ok (could ssh and Thingsboard was reachable).

            I can reproduce this failure just by leaving the instance on, it seems that after serveral hours (5-8 hrs) Thingsboard(or something else not sure) fails which freezes the whole computer.

            I have checked two things:

            1. I checked CPU utiization on AWS monitoring. It seems that after some hours there is a big jump in CPU load and then it drops back to almost zero. While Thingsboard is running, it is constant.See printscreen from AWS monitoring

            2. I checked the Thingsboard logs (in /var/log/thingsboard): There are some errors, but unfortunately most of the things are not enough for me guess what could be a problem with the fresh installation. Here are some lines from the log:

            ...

            ANSWER

            Answered 2021-Dec-30 at 11:56

            After I increased the RAM to 4GB (from 1GB) the ThingsBoard server is up without problem. There are no sporadic freezes anyomore. As there were no other provable suggestions for the problem and now my system works without a problem I consider the question answered.

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

            QUESTION

            Which are the user and password for the Postgres database inside the thingsboard/tb-cassandra Docker container?
            Asked 2021-Dec-29 at 15:50

            The Docker image for Thingsboard with Cassandra (thingsboard/tb-cassandra) also has a Postgres database to store metadata among other things.

            I need to connect to this Postgres database from outside the container with a monitoring and administration tool. For that, I need the user and password that were provided for the database when the image was created, and I couldn't find this information in the Thingsboard documentation. I don't want to change the credentials because that might cause problems with the other components of the Docker container.

            Does anybody know this user/password combination?

            ...

            ANSWER

            Answered 2021-Dec-29 at 15:50

            QUESTION

            Thingsboard Gateway REST connector fails to initialize
            Asked 2021-Dec-29 at 10:01

            I'm trying to set up the REST connector for Thingsboard IoT Gateway and getting some errors on initialization. My rest.json config is:

            ...

            ANSWER

            Answered 2021-Dec-29 at 10:01

            It is an issue with aiohttp, it is already fixed in the master branch. You can use the version from the master branch of the gateway repository or wait for the next release.

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

            QUESTION

            How to get live connection status of devices in ThingsBoard?
            Asked 2021-Dec-01 at 15:28

            I recently started working with thingsboard in context of my bachelor-thesis. Right know I am trying out different functionalities in order to check which requirements thingsboard already satisfies and which have to be implemented by me.

            Within that process I am stuck at the requirement that thingsboard dashboard should give live information about the connectivity status of a registered device (connected, disconnected, active, inactive).

            To solve that I've tried out editing the rule chain used by the device profile assigned to the device of interest. Specifically I worked with the message type switch and tried out various action nodes connected to it via ConnectEvent, DisconnectEvent, ActiveEvent and InactiveEvent. What I would like to have is the connectivity status of the device to be stored in an SERVER_SCOPE attribute and then being displayed in the entity widget. All I've achieved is to generate an alarm when disconnected and cleared when (re)connected. I know there is a server side attribute called active that changes true immediately when device connects but it only turns false after the inactivityTimeout expired.

            I also checked the ThingsBoard Device Connectivity Status page, the Create Alarm when the Device is offline guide and took long researches but couldn't get it to work.

            Do you guys have any solutions or tips for me?

            Kind regard.

            ...

            ANSWER

            Answered 2021-Dec-01 at 15:28

            With the help of @JacksonB I managed to solve my problem.

            What did I do?

            1. Create a blue Transform-script node.

            2. Change message type to POST_ATTRIBUTES_REQUEST and add desired attributes. Here's my code for that:

              var newType = "POST_ATTRIBUTES_REQUEST"

              msg.connectivity = "connected"

              return {msg: msg, metadata: metadata, msgType: newType};

            3. Than just connect this to an post attribute node in the rule chain like shown in the image. Link to screenshot of rule chain

            No I am able to instantly see if a device is connected or disconnected by displaying the value of that attribute on my dashboard.

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

            QUESTION

            Thingsboard: Fails to read valid JSON payload when timestamp is in ISO 8601 format
            Asked 2021-Nov-14 at 22:17

            I send this valid JSON to TB CE edition, and it fails reading it.

            ...

            ANSWER

            Answered 2021-Nov-14 at 22:17

            If you're using windows to execute that cmd, try using windows format quotes.

            "{\"ts\":\"12345678910\",\"value1\":\"99\",\"value2\":\"24\"}"

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

            QUESTION

            save/load thingsboard configuration
            Asked 2021-Sep-30 at 22:49

            Is it possible to somehow serialize current Thingsboard (let's call it TBoard) configuration, save it and than latter load saved configuration on TBoard startup. I am specifically interested in loading device profiles, rule chains, and dashboards. I want to save configuration together with my project in git repository so than latter I could just use docker-compose to start multiple services from project (let's call them sensors) and single TBoard instance with saved configuration which will be used for collecting telemetry from sensors and drawing dashboards. Another reason for saving configuration is what happens if for some reason TBoard container crashes or somehow get corrupted so it can't be started again, would I have to click on the things again in order to create all device profiles, dashboards, configure rule chains ... etc etc ... ?

            ...

            ANSWER

            Answered 2021-Sep-30 at 22:49

            Regarding this line

            I am specifically interested in loading device profiles, rule chains, and dashboards. I want to save configuration together with my project in git repository

            I have just recently implemented version control for my Thingsboard deployment. The way i am doing it is with the python REST client.

            I have written functions to export all dashboards/data converters/integrations/rule chains/widgets into json files which I save into a github repository.

            I have also written the reverse script to push the stored files to a fresh environment, essentially "flashing" it. Surprisingly, this works perfectly.

            I have an idea to publish this as a package, but it's something I've never done before so I'm unsure if I will get to it.

            Just letting you know that it is definitely possible to get source control operational via the API.

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

            QUESTION

            How do I show all my customers on a widget in ThingsBoard?
            Asked 2021-Sep-01 at 06:04

            Given that I have this kind of hierarchy in my Thingsboard:

            ...

            ANSWER

            Answered 2021-Sep-01 at 06:04

            I found the answer myself.

            Ownership in Thingsboard is not a Relation. So you have to manually create those relations inside the entity as they are not automatically created.

            So even if Root Customer owns Customer 1, they are still not related unless you explicitly created that relation.

            So Customer Hierarchy page shows you hierarchy based on ownership, but widgets only show it by Relation.

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

            QUESTION

            Polygon not showing on ThingsBoard Trip Animation Widget
            Asked 2021-Mar-31 at 09:59

            I am currently trying to mess around with ThingsBoard, and one of the things I am trying to achieve is to show a polygon on the trip animation widget. I have my coordinate values added to it as I would expect to work, but it doesn't seem to.

            I have tested the same collection of coordinates on the general 'Latest Values' map widget and it works fine there, but I would really like to visualize the movement of a device between polygons.

            Has anyone gotten the polygon working that may be able to advise?

            My coordinates field is a timeseries value and in the format [ [ [l1,l2],[l1,l2] ],[ [l1,l2],[l1,l2] ] ,...[ [l1,l2],[l1,l2] ] ]

            Does anyone know what I may be doing wrong? Any advice that can be given is greatly appreciated.

            ...

            ANSWER

            Answered 2021-Mar-31 at 09:59

            Update: I have talked with ThingsBoard devs, there is an actual bug in the widget. It is not appearing because it is broken, closing this question

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install thingsboard

            You can download it from GitHub.
            You can use thingsboard like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the thingsboard component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/sanshengshui/thingsboard.git

          • CLI

            gh repo clone sanshengshui/thingsboard

          • sshUrl

            git@github.com:sanshengshui/thingsboard.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by sanshengshui

            netty-learning-example

            by sanshengshuiJava

            multiTenant

            by sanshengshuiJava

            AUG

            by sanshengshuiJavaScript

            bolt

            by sanshengshuiJava

            HCW

            by sanshengshuiJava