Conversation with Merlin [email protected] · Fri Dec 01 2023

what is thingsboard

ThingsBoard is an open-source IoT platform designed for data collection, processing, visualization, and device management. It supports both cloud and on-premises deployments, offering scalability, fault-tolerance, and high performance to ensure the security of IoT data. Additionally, it provides support for industry-standard IoT protocols such as MQTT, CoAP, and.

The platform enables the provision and management of IoT devices and through secure server-side APIs, allowing users to define relationships between devices, assets, customers, and other entities.

In terms of data management, ThingsBoard allows users to collect and store telemetry data in a scalable and fault-tolerant manner. It also offers customizable widgets and flexible dashboards for data visualization, and the ability to share dashboards with customers.

Furthermore, ThingsBoard facilitates data processing through the definition of data processing rule chains, enabling the transformation and normalization device data, as well as the triggering of alarms for incoming telemetry events, attribute updates, device inactivity, and user actions.

The platform architecture is designed to microservices, providing maximum scalability and fault-tolerance. ThingsBoard also supports the creation of real-time IoT dashboards for data visualization and remote control, with customizable widgets for various IoT use-cases such as smart energy, smart farming, fleet tracking, and smart metering.

Overall ThingsBoard serves as a comprehensive IoT platform that covers data management, visualization, processing, and device management, supporting a wide range of IoT applications and use-cases.

ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management. It supports cloud and on-premises deployments, and it combines scalability, fault-tolerance and performances to nullify the chances of getting your IoT data lost. The integration between The Things Stack and ThingsBoard is an example of an MQTT integration. ThingsBoard embeds an MQTT Broker, which is configured with the ThingsBoard Integrations functionality to subscribe or publish to The Things Stack MQTT Server. Prerequisites Access to ThingsBoard Professional Edition deployment. You can sign up for a trial account on ThingsBoard PE Cloud server. Warning: Only ThingsBoard PE supports the Platform Integrations feature that is needed for this integration. Configure The Things Stack Before creating an integration setup on ThingsBoard, you need to prepare the uplink payload formatter on The Things Stack. Define a Javascript payload formatter and take the following code as an example of the formatter parameter: function decodeUplink(input) { return { data: { temperature: input.bytes[0] } }; } The payload formatter shown above extracts the first byte of your payload and sets it as a temperature value, but data objects contents can vary depending on the telemetry type your device is sending. Also, note your credentials available under MQTT submenu of the Integrations menu on the left, because you will need them for further steps. Setup ThingsBoard Log in to your ThingsBoard account. Defining Data Converters Before creating an integration, you need to define uplink and downlink data converters. To do so, first navigate to Data converters on the left hand menu. Click the + icon in the upper right and then select Create new converter to create a new uplink converter. Give a Name to your uplink converter, select Uplink as a Type and paste the following code in the decoder function field: var data = decodeToJson(payload); var deviceName = data.end_device_ids.device_id; var deviceType = data.end_device_ids.application_ids.application_id; var result = { deviceName: deviceName, deviceType: deviceType, telemetry: { temperature: data.uplink_message.decoded_payload.temperature } }; function decodeToString(payload) { return String.fromCharCode.apply(String, payload); } function decodeToJson(payload) { var str = decodeToString(payload); var data = JSON.parse(str); return data; } return result; You can test the decoder by clicking the Test decoder function and submitting an uplink message from The Things Stack manually. Finish by selecting Add. Follow the same procedure to create a converter with Downlink as a Type and a following encoder function: var data = { downlinks: [{ f_port: 2, confirmed: false, frm_payload: btoa(msg.version), priority: "NORMAL" }] }; var result = { contentType: "JSON", data: JSON.stringify(data), metadata: { devId: 'device_id' //enter your device's ID here } }; return result; Replace the device_id in the downlink converter function with the End device ID value from The Things Stack. Creating MQTT Integration When you have defined data converters, navigate to the Integrations section on the left hand menu. Add a new integration by clicking the + button in the upper right corner. Give a name to your integration by filling in the Name field. For Type, choose The Things Stack. Make sure the Enabled and Allow create devices or assets checkboxes are left ticked. For Uplink data converter and Downlink data converter choose the uplink and downlink converters you created in the previous step. Depending on your The Things Stack deployment, choose Host type. If you want to use TLS, enter 8883 for Port. Otherwise, enter 1883. Use the credentials of your The Things Stack MQTT Server as Username and Password. You can check the connection with your host via port you specified using credentials you provided by pressing the Check connection button. If it fails, make sure you fix it. Click the Add button on the bottom to fin

thethingsindustries.com

It enables device connectivity via industry standard IoT protocols - MQTT, CoAP and HTTP and supports both cloud and on-premises deployments. ThingsBoard combines scalability, fault-tolerance and performance so you will never lose your data. Provision and manage devices and assetsProvision, monitor and control your IoT entities in secure way using rich server-side APIs. Define relations between your devices, assets, customers or any other entities. Read more about entities and relations Collect and visualize dataCollect and store telemetry data in scalable and fault-tolerant way. Visualize your data with built-in or custom widgets and flexible dashboards. Share dashboards with your customers. Read more about visualization Process and ReactDefine data processing rule chains. Transform and normalize your device data. Raise alarms on incoming telemetry events, attribute updates, device inactivity and user actions. Read more about rule engine Microservices Construct your ThingsBoard cluster and get maximum scalability and fault-tolerance with microservices architecture. ThingsBoard also supports both cloud and on-premises deployments. Read more about microservices Products Real-Time IoT Dashboards ThingsBoard allows you to create rich IoT Dashboards for data visualization and remote device control in real-time. More than 30 customizable widgets allows you to build end-user custom dashboards for most IoT use-cases. Smart energy Deliver and store data from smart meters in reliable and fault-tolerant way, visualize real-time and historical energy consumption data on customizable end-user dashboards, integrate with third-party analytics frameworks and solutions. Smart energy use case Smart farming Collect important indicators for your agricultural production such as soil conditions or facilities state via IoT sensors and visualize them using end-user customizable dashboards provided by ThingsBoard platform. Smart farming use case Fleet tracking ThingsBoard platform allows to track vehicles state and alerts via various sensors, plot vehicle routes in real-time and browse their sensors reading history at the same time using customizable high quality widgets and dashboards. Fleet tracking use case Smart metering Collect, store and aggregate data from smart meters in reliable and fault-tolerant way. Analyze resource consumption and raise alerts on leakage, anomaly or fraud. Present results of the analysis to end users. Smart metering use case Environment Monitoring Monitor and analyze indoor and outdoor environments using a wide range of sensors. ThingsBoard supports data acquisition using modern connectivity technologies and protocols: NB IoT, LoRaWAN, SigFox, MQTT, CoAP, HTTP, LwM2M, and others. Environment Monitoring use case Smart Office Ensure employee health and safety to boost organization productivity. Optimize resource consumption by monitoring and control of the office indoor climate. ThingsBoard provides rich data visualization, powerful processing engine, remote control and OTA updates capabilities. Smart Office use case Water Metering Enable water consumption data collection, analysis and fraud detection using ThingsBoard. Use interactive dashboards that allow administrators and end-users to browse the state of the water meters and aggregated water consumption statistics. Enable alarms over SMS and email and integrate with external billing systems. Water Metering use case Smart Retail Control quality of food storage by monitoring chillers and freezers. Ensure availability of the goods using smart shelves. Ensure safety using motion detection and fire alarms. ThingsBoard provides a solution template to monitor supermarket assets, browse historical data and generate alarms based on user-defined thresholds. Smart Retail use case ThingsBoard Features Telemetry Data CollectionCollect and store telemetry data in reliable way, surviving network and hardware failures. Access collected data using customizable web dashboards or server

thingsboard.io

Skip to content Signup Actions Automate any workflow Packages Host and manage packages Security Find and fix vulnerabilities Codespaces Instant dev environments Copilot Write better code with AI Code review Manage code changes Issues Plan and track work Discussions Collaborate outside of code Explore All features Documentation GitHub Skills Blog For Enterprise Teams Startups Education By Solution CI/CD & Automation DevOps DevSecOps Resources Learning Pathways White papers, Ebooks, Webinars Customer Stories Partners GitHub Sponsors Fund open source developers The ReadME Project GitHub community articles Repositories Topics Trending Collections Pricing Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Saved searches Use saved searches to filter your results more quickly Sign in Sign up thingsboard / thingsboard Public Notifications Fork 4.6k Star 14.7k Open-source IoT Platform - Device management, data collection, processing and visualization. thingsboard.io License Apache-2.0, Unknown licenses found Licenses found Apache-2.0 LICENSE Unknown license-header-template.txt 14.7k stars 4.6k forks Activity Star Notifications Code Issues 1.5k Pull requests 103 Actions Projects Wiki Security Insights Additional navigation options thingsboard/thingsboard master Switch branches/tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? 56 branches 57 tags Code Clone Use Git or checkout with SVN using the web URL. Open with GitHub Desktop Download ZIP Latest commit ashvayka Merge pull request #9738 from dashevchenko/protoRefactoring 34f7730 Dec 1, 2023 Merge pull request #9738 from dashevchenko/protoRefactoring Moved proto files and converter classes to proto module 34f7730 Git stats 16,215 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github updated github action October 12, 2023 17:14 application Merge pull request #9738 from dashevchenko/protoRefactoring December 1, 2023 17:04 common Merge pull request #9738 from dashevchenko/protoRefactoring December 1, 2023 17:04 dao Merge pull request #9661 from imbeacon/fix/device-connectivity-localh November 29, 2023 16:54 docker updated postgres image to from 12 to 15 version November 29, 2023 11:33 img Fix typo in docker README's. October 25, 2018 15:11 monitoring Monitoring: support for dynamic change of load-balancers list November 27, 2023 14:01 msa Merge pull request #9619 from dashevchenko/pubsub December 1, 2023 16:58 netty-mqtt Version set to 3.6.2-SNAPSHOT November 13, 2023 17:07 packaging packaging: remove dupplicated "adduser --quiet" option in deb preinst November 10, 2023 10:14 rest-client Version set to 3.6.2-SNAPSHOT November 13, 2023 17:07 rule-engine Merge pull request #9738 from dashevchenko/protoRefactoring December 1, 2023 17:04 tools Version set to 3.6.2-SNAPSHOT November 13, 2023 17:07 transport Merge pull request #9619 from dashevchenko/pubsub December 1, 2023 16:58 ui-ngx Merge branch 'master' of github.com:thingsboard/thingsboard November 16, 2023 17:42 .gitignore Californium3.properties file to .gitignore January 25, 2022 12:26 LICENSE Initial commit December 1, 2016 11:38 README.md Replace the image URL to CDN September 18, 2023 12:51 build_proto.sh build_proto.sh added September 8, 2023 13:30 license-header-template.txt Update license header year to 2023 January 31, 2023 10:43 lombok.config jwt settings code cleanup November 10, 2022 23:48 pom.xml refactoring: moved proto files and converter classes to separate modu November 30, 2023 13:06 pull_request_template.md added missed yml parameter descriptions, script that check descriptio October 5, 2023 14:24 security.md fixed typo May 16, 2023 17:33 Thi

github.com

how to change api setting in thingsboard

To change the API settings in ThingsBoard, you can modify the API and rate limits configuration. The API and rate limits feature allows control over API usage by limiting the number of requests from a single host, device, or tenant during a specific time unit (e.g., minutes, hours).

Rest API Limits:

  1. REST API calls are used by various UI components and possibly some automatic scripts initiated on behalf of customer users or tenant users. It's essential to limit the number of API calls by tenant or customer to prevent overloading the server due to errors in custom widgets or scripts.

  2. To enable or disable tenant-level limits, adjust the "rest.limits.tenant.enabled" parameter or "TB_SERVER_REST_LIMITS_TENANT_ENABLED" environment property.

  3. Configure the maximum amount of REST API calls using the "rest.limits.tenant" parameter or the "TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION" environment property. For instance, a value of "100:1,2000:60" means no more than 100 requests per second and no more than 2000 requests per minute.

Websocket Limits:

  1. Websockets are utilized to deliver real-time notifications about new telemetry values from devices to the dashboard.

  2. The "ws.send_timeout" parameter or "TB_SERVER_WS_SEND_TIMEOUT" environment property controls the maximum time for successful websocket message delivery to the client.

To modify these settings, you typically need access to the ThingsBoard configuration files, such as "thingsboard.yml". Make the necessary changes to the configuration parameters related to the API and rate limits, following the format and guidelines provided for each setting.

Once the settings are adjusted, remember to restart the ThingsBoard server to apply the changes. Always ensure that you have a backup of the configuration files before making any modifications.

ThingsBoard MQTT Device API Introduction See ThingsBoard API reference. ThingsBoard API consists of two main parts: Device API and Server-side API. Server-side API is available as REST API and Websocket API: REST API: Administration REST API - The server-side core APIs. Attributes query API - The server-side APIs provided by Telemetry Service. Time-series query API - The server-side APIs provided by Telemetry Service. RPC API - The server-side APIs provided by RPC Service. REST Client Websocket API: Websocket API duplicates REST API functionality and provides the ability to subscribe to device data changes. Device API is grouped by supported communication protocols: MQTT Device API CoAP Device API ( Not supported! ) HTTP Device API ( Not supported! ) Getting started See MQTT Device API Reference. MQTT basics MQTT is a lightweight publish-subscribe messaging protocol which probably makes it the most suitable for various IoT devices. You can find more information about MQTT here. ThingsBoard server nodes act as an MQTT Broker that supports QoS levels 0 (at most once) and 1 (at least once) and a set of predefined topics. Client libraries setup You can find a large number of MQTT client libraries on the web. Examples in this article will be based on Mosquitto and MQTT.js. In order to setup one of those tools, you can use instructions in our Hello World guide. MQTT Connect We will use access token device credentials in this article and they will be referred to later as $ACCESS_TOKEN. The application needs to send MQTT CONNECT message with username that contains $ACCESS_TOKEN. Possible return codes and their reasons during connect sequence: 0x00 Connected - Successfully connected to ThingsBoard MQTT server. 0x04 Connection Refused, bad user name or password - Username is empty. 0x05 Connection Refused, not authorized - Username contains invalid $ACCESS_TOKEN. Key-value format By default, ThingsBoard supports key-value content in JSON. Key is always a string, while value can be either string, boolean, double, long or JSON. For example: { "stringKey":"value1", "booleanKey":true, "doubleKey":42.0, "longKey":73, "jsonKey": { "someNumber": 42, "someArray": [1,2,3], "someNestedObject": {"key": "value"} } } Telemetry upload API In order to publish telemetry data to ThingsBoard server node, send PUBLISH message to the following topic: The simplest supported data formats are: {"key1":"value1", "key2":"value2"} or [{"key1":"value1"}, {"key2":"value2"}] Please note that in this case, the server-side timestamp will be assigned to uploaded data! In case your device is able to get the client-side timestamp, you can use following format: {"ts":1451649600512, "values":{"key1":"value1", "key2":"value2"}} In the example above, we assume that 1451649600512 is a unix timestamp with milliseconds precision. For example, the value 1451649600512 corresponds to Fri, 01 Jan 2016 12:00:00.512 GMT Example Client library Shell file JSON file Mosquitto mosquitto-telemetry.sh telemetry-data-as-object.json telemetry-data-as-array.json telemetry-data-with-ts.json MQTT.js mqtt-js-telemetry.sh mosquitto-telemetry.sh # Publish data as an object without timestamp (server-side timestamp will be used) mosquitto_pub -d -h "127.0.0.1" -t "v1/devices/me/telemetry" -u "$ACCESS_TOKEN" -f "telemetry-data-as-object.json" # Publish data as an array of objects without timestamp (server-side timestamp will be used) mosquitto_pub -d -h "127.0.0.1" -t "v1/devices/me/telemetry" -u "$ACCESS_TOKEN" -f "telemetry-data-as-array.json" # Publish data as an object with timestamp (server-side timestamp will be used) mosquitto_pub -d -h "127.0.0.1" -t "v1/devices/me/telemetry" -u "$ACCESS_TOKEN" -f "telemetry-data-with-ts.json" mqtt-js-telemetry.sh # Publish data as an object without timestamp (server-side timestamp will be used) cat telemetry-data-as-object.json | mqtt pub -v -h "127.0.0.1" -t "v1/devices/me/telemetry" -u '$ACCESS_TOKEN' -s # Publish data as an array of objects without time

avantec-thingsboard.readthedocs.io

API & Rate Limits feature allows controlling API usage, by limiting number of requests from a single host/device/tenant during single time unit (Minutes, Hours, etc.). API & Rate limits are disabled by default. System administrator is able to configure rate limits using thingsboard.yml. REST API limits REST API calls are used by all sorts of UI components and possibly some automatic scripts launched on behalf of customer user or tenant user. It is critical to limit amount of API calls by tenant or by customer to avoid overloading the server due to mistakes in a custom widget or script. The rest.limits.tenant.enabled parameter or TB_SERVER_REST_LIMITS_TENANT_ENABLED environment property enables/disables tenant level limits. The rest.limits.tenant.configuration parameter or TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION environment property configure maximum amount of REST API calls. For example, value 100:1,2000:60 means no more then 100 requests per second and no more then 2000 requests per minute. 1 2 3 4 5 6 7 8 9 10 server: ... rest: limits: tenant: enabled: "${TB_SERVER_REST_LIMITS_TENANT_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION:100:1,2000:60}" customer: enabled: "${TB_SERVER_REST_LIMITS_CUSTOMER_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_CUSTOMER_CONFIGURATION:50:1,1000:60}" Websocket limits Websockets are used to deliver real-time notifications about new telemetry values from device to the dashboard. The ws.send_timeout parameter or TB_SERVER_WS_SEND_TIMEOUT environment property controls maximum time for a successful websocket message delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_queue_per_ws_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION environment property controls max messages that are awaiting delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_sessions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_* environment property controls maximum amount of active connections per certain entity: tenant, customer, public or regular user. If there is too much sessions per certain criteria, new connections will be dropped. The ws.limits.max_subscriptions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_* environment property controls maximum amount of active subscriptions within all sessions per certain entity: tenant, customer, public or regular user. If there is too much subscriptions per certain criteria, new subscriptions will not be accepted. The ws.limits.max_updates_per_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_UPDATES_PER_SESSION environment property configure maximum amount of messages sent to the client from the server for each session. For example, value 300:1,3000:60 means no more then 300 updates per second and no more then 3000 updates per minute. You can find sample configuration below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 server: ... ws: send_timeout: "${TB_SERVER_WS_SEND_TIMEOUT:5000}" limits: # Limit the amount of sessions and subscriptions available on each server. Put values to zero to disable particular limitation max_sessions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_TENANT:0}" max_sessions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_CUSTOMER:0}" max_sessions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_REGULAR_USER:0}" max_sessions_per_public_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_PUBLIC_USER:0}" max_queue_per_ws_session: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION:500}" max_subscriptions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_TENANT:0}" max_subscriptions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_CUSTOMER:0}" max_subscriptions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_REGULAR_USER:0}" max_s

thingsboard.io

hi @JKYLien here is the sample of the rule chain that you can use as a starting point to update the device type of a particular device. In the same way, you can update device names, etc. The main idea is to use REST endpoints https://demo.thingsboard.io/swagger-ui/ and with a help of the REST API call node execute them in the order that is required by your use case. Please copy the content below into a file (you can name is like update_device_name_and_type.json) and do the import of this rule chain into TB: { "ruleChain": { "additionalInfo": { "description": "" }, "name": "Update device name and type", "type": "CORE", "firstRuleNodeId": null, "root": false, "debugMode": false, "configuration": null }, "metadata": { "firstNodeIndex": null, "nodes": [ { "additionalInfo": { "description": "", "layoutX": 862, "layoutY": 279 }, "type": "org.thingsboard.rule.engine.rest.TbRestApiCallNode", "name": "Save device", "debugMode": true, "configuration": { "restEndpointUrlPattern": "https://demo.thingsboard.io/api/device", "requestMethod": "POST", "useSimpleClientHttpFactory": false, "ignoreRequestBody": null, "enableProxy": false, "useSystemProxyProperties": false, "proxyScheme": null, "proxyHost": null, "proxyPort": 0, "proxyUser": null, "proxyPassword": null, "readTimeoutMs": 0, "maxParallelRequestsCount": 0, "headers": { "Content-Type": "application/json", "X-Authorization": "Bearer ${token}" }, "useRedisQueueForMsgPersistence": false, "trimQueue": false, "maxQueueSize": 0, "credentials": { "type": "anonymous" } } }, { "additionalInfo": { "description": "", "layoutX": 361, "layoutY": 441 }, "type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode", "name": "Put token to metadata", "debugMode": true, "configuration": { "jsScript": "metadata.token = msg.token;\nreturn {msg: msg, metadata: metadata, msgType: msgType};" } }, { "additionalInfo": { "description": "", "layoutX": 525, "layoutY": 281 }, "type": "org.thingsboard.rule.engine.rest.TbRestApiCallNode", "name": "Get Device By Name", "debugMode": true, "configuration": { "restEndpointUrlPattern": "https://demo.thingsboard.io/api/tenant/devices?deviceName=${deviceName}", "requestMethod": "GET", "useSimpleClientHttpFactory": false, "ignoreRequestBody": null, "enableProxy": false, "useSystemProxyProperties": false, "proxyScheme": null, "proxyHost": null, "proxyPort": 0, "proxyUser": null, "proxyPassword": null, "readTimeoutMs": 0, "maxParallelRequestsCount": 0, "headers": { "Content-Type": "application/json", "X-Authorization": "Bearer ${token}" }, "useRedisQueueForMsgPersistence": false, "trimQueue": false, "maxQueueSize": 0, "credentials": { "type": "anonymous" } } }, { "additionalInfo": { "description": "", "layoutX": 704, "layoutY": 437 }, "type": "org.thingsboard.rule.engine.transform.TbTransformMsgNode", "name": "Update device type and device profile", "debugMode": true, "configuration": { "jsScript": "msg.type = 'termostat';\nmsg.deviceProfileId.id = '29893580-7dea-11ec-87bb-d958d7630ab4';\nreturn {msg: msg, metadata: metadata, msgType: msgType};" } }, { "additionalInfo": { "description": "", "layoutX": 59, "layoutY": 442 }, "type": "org.thingsboard.rule.engine.debug.TbMsgGeneratorNode", "name": "Test", "debugMode": true, "configuration": { "msgCount": 1, "periodInSeconds": 2, "jsScript": "var msg = {\"username\":\"YOUR_EMAIL\", \"password\":\"YOUR_PASSWORD\"};\nvar metadata = { deviceName: 'Test Device C1' };\nvar msgType = \"POST_TELEMETRY_REQUEST\";\n\nreturn { msg: msg, metadata: metadata, msgType: msgType };", "originatorId": null, "originatorType": null } }, { "additionalInfo": { "description": "", "layoutX": 218, "layoutY": 280 }, "type": "org.thingsboard.rule.engine.rest.TbRestApiCallNode", "name": "Get Bearer", "debugMode": true, "configuration": { "restEndpointUrlPattern": "https://demo.thingsboard.io/api/auth/login", "requestMethod": "POST", "useSimpleClientHttpFactory": false, "ignoreRequestBody": null, "enableProxy": false, "useSystemProxyProperties": false,

github.com

can you tell how to reset api settting in thingsboard

To reset API settings in ThingsBoard, you can adjust the API and rate limits configuration. This feature governs the API usage by restricting the number of requests from a single host, device, or tenant during a time unit (e.g., minutes, hours).

Here are the steps reset the API settings in ThingsBoard:

  1. Enable or Disable API Rate Limits: Access the ThingsBoard configuration file, typically "thingsboard.yml."

    • Locate the "rest.limits.tenant.enabled" parameter or "TB_SERVER_REST_LIMIT_TENANT_ENABLED" environment property to enable/disable tenant-level.
    • Set the parameter to "true" to enable or "false" to disable.
  2. Configure Maximum REST API Calls:

    • Find the "rest.limits.tenant.configuration" parameter or "TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION" environment property.
    • Adjust the configuration to define the maximum number of REST API calls allowed. For example, "100:1,2000:60" permits no more than 100 per second and no more than 2000 requests per minute.
  3. Save the:

    • After making the necessary modifications to the configuration, save the file.
  4. Restart ThingsBoard:

    • the ThingsBoard server to apply the updated API settings.

After completing these steps, the API settings in ThingsBoard will be reset based on the adjusted configurations. Always ensure that you back up the configuration files before making any changes.

node-red-contrib-thingsboard-pe-rest-api 3.3.3 Node-RED node for thingsboard-pe-rest-api npm install node-red-contrib-thingsboard-pe-rest-api Node-RED node for thingsboard-pe-rest-api ThingsBoard Professional Edition IoT platform REST API documentation. Install To install the stable version use the Menu - Manage palette - Install option and search for node-red-contrib-thingsboard-pe-rest-api, or run the following command in your Node-RED user directory, typically ~/.node-red npm install node-red-contrib-thingsboard-pe-rest-api Usage Methods GET /api/admin/securitySettings Get the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. Accept : 'application/json' POST /api/admin/securitySettings Updates the Security Settings object that contains password policy, etc. Available for users with 'SYS_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. body : Accept : 'application/json' Content-Type : 'application/json' POST /api/admin/settings Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'WRITE' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. body : Accept : 'application/json' Content-Type : 'application/json' POST /api/admin/settings/testMail Attempts to send test email using Mail Settings provided as a parameter. Email is sent to the address specified in the profile of user who is performing the requestYou may change the 'To' email in the user profile of the System/Tenant Administrator. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. body : Accept : 'application/json' Content-Type : 'application/json' POST /api/admin/settings/testSms Attempts to send test sms to the System Administrator User using SMS Settings and phone number provided as a parameters of the request. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. body : Accept : 'application/json' Content-Type : 'application/json' GET /api/admin/settings/{key}{?systemByDefault} Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error. Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority. Security check is performed to verify that the user has 'READ' permission for the 'ADMIN_SETTINGS' (for 'SYS_ADMIN' authority) or 'WHITE_LABELING' (for 'TENANT_ADMIN' authority) resource. key : string systemByDefault : boolean Accept : 'application/json' GET /api/admin/updates Check notifications about new platform releases. Available for users with 'SYS_ADMIN' authority. Accept : 'application/json' POST /api/auth/login Login method used to authenticate user and get JWT token data. Value of the response token field can be used as X-Authorization header value: X-Authorization: Bearer $JWT_TOKEN_VALUE. body : Accept : 'applicati

flows.nodered.org

API & Rate Limits feature allows controlling API usage, by limiting number of requests from a single host/device/tenant during single time unit (Minutes, Hours, etc.). API & Rate limits are disabled by default. System administrator is able to configure rate limits using thingsboard.yml. REST API limits REST API calls are used by all sorts of UI components and possibly some automatic scripts launched on behalf of customer user or tenant user. It is critical to limit amount of API calls by tenant or by customer to avoid overloading the server due to mistakes in a custom widget or script. The rest.limits.tenant.enabled parameter or TB_SERVER_REST_LIMITS_TENANT_ENABLED environment property enables/disables tenant level limits. The rest.limits.tenant.configuration parameter or TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION environment property configure maximum amount of REST API calls. For example, value 100:1,2000:60 means no more then 100 requests per second and no more then 2000 requests per minute. 1 2 3 4 5 6 7 8 9 10 server: ... rest: limits: tenant: enabled: "${TB_SERVER_REST_LIMITS_TENANT_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION:100:1,2000:60}" customer: enabled: "${TB_SERVER_REST_LIMITS_CUSTOMER_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_CUSTOMER_CONFIGURATION:50:1,1000:60}" Websocket limits Websockets are used to deliver real-time notifications about new telemetry values from device to the dashboard. The ws.send_timeout parameter or TB_SERVER_WS_SEND_TIMEOUT environment property controls maximum time for a successful websocket message delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_queue_per_ws_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION environment property controls max messages that are awaiting delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_sessions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_* environment property controls maximum amount of active connections per certain entity: tenant, customer, public or regular user. If there is too much sessions per certain criteria, new connections will be dropped. The ws.limits.max_subscriptions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_* environment property controls maximum amount of active subscriptions within all sessions per certain entity: tenant, customer, public or regular user. If there is too much subscriptions per certain criteria, new subscriptions will not be accepted. The ws.limits.max_updates_per_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_UPDATES_PER_SESSION environment property configure maximum amount of messages sent to the client from the server for each session. For example, value 300:1,3000:60 means no more then 300 updates per second and no more then 3000 updates per minute. You can find sample configuration below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 server: ... ws: send_timeout: "${TB_SERVER_WS_SEND_TIMEOUT:5000}" limits: # Limit the amount of sessions and subscriptions available on each server. Put values to zero to disable particular limitation max_sessions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_TENANT:0}" max_sessions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_CUSTOMER:0}" max_sessions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_REGULAR_USER:0}" max_sessions_per_public_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_PUBLIC_USER:0}" max_queue_per_ws_session: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION:500}" max_subscriptions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_TENANT:0}" max_subscriptions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_CUSTOMER:0}" max_subscriptions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_REGULAR_USER:0}" max_s

thingsboard.io

Thingsboard is an open-source IoT platform for device management, data collection, processing, and visualization. This guide shows how to set up streaming data from flespi to Thingsboard assuming that you have already tuned receiving data to flespi Telematics Hub.1. Create Thingsboard deviceYou can use your local installed version of Thingsboard or create a demo account on https://demo.thingsboard.io. Go to Devices tab, create a new device and check is gateway checkbox it means that Thingsboard will automatically create a new device if a message with a new device_name will be received.2. Get device access tokenOpen the new device card and copy the access token. It will be used in the next step for stream configuration.3. Configure stream from flespi.ioCreate a new stream in the flespi Telematics Hub Streams tab. In the configuration dropdown list select thingsboard and fill in the fields:uri Thingsboard MQTT broker address. Should be the same as the address you enter into web browser to access Thingsboard (use thingsboard.cloud:1883).access_token device token copied on the previous step.device_name the field in the message from flespi to Thingsboard that will be used as a device identifier. For most cases, %ident% is enough. But if you want to stream a single flespi device you can use a custom static name e.g. %device_name%.Note: %ident% is the ident mask meaning that the messages from flespi will be sent via the stream with their original ident (IMEI). Usually, there's no need to change this parameter unless you want to distinguish the subset of devices coming from flespi. Then you can add a prefix like this "flespi-%ident%.Thats it. Now each new message for subscribed instances will be sent to Thingsboard.Useful tipsManual device creation in ThingsboardIf the Thingsboard device is not created automatically, you can create a new device manually and tie devices in the gateway device Relations tab.The same can be done via Thingsboard API. You can publish a message like {device:new_device_name} to the topic v1/gateway/connect.Configuring max payload size in ThingsboardBy default, the maximum size of the payload in ThingsBoard to send using MQTT transport is set up to 65536 bytes. If you need to send larger messages, you have to configure the desired size in the thingsboard.ymlconfiguration file. Read more details here https://thingsboard.io/docs/user-guide/install/config/. You need to change the value of transport.mqtt.netty.max_payload_size.Thingsboard limitationsWhen flespi to Thingsboard stream was initially implemented Thingsboard didn't has any kind of limitations. However in 2023 we started to receive complains from our users about problems with Thingsboard. After a lot of investigation and communication with Thingsboard support we found out that Thingsboard Cloud currently has such device rate limits for all subscription plans:Transport device messages:200 messages per 1 secbut less than 6000 messages per 60 sec.but less than 14000 messages per 3600 sec.Transport device telemetry messages:100 messages per 1 secbut less than 3000 messages per 60 sec.Be aware that these limits can be changed any time. However in case you noticed any problems with stream operations please first consult Thingsboard support for the information an the actual limits for your account.Change logTo stay in sync with all improvements and changes to the Thingsboard stream, subscribe to the change log on the forum.

flespi.com

how to acess thingsboard.yml

To access the thingsboard.yml file, you can navigate to the path where it is located within the ThingsBoard directory. The thingsboard.yml file is typically found in the resources folder within the application/src/main/resources of the ThingsBoard installation. Here are the general steps to access the thingsboard.yml file:

  1. Navigate to the installation directory of your ThingsBoard instance. This may vary based on your specific installation method, but it is often located in the installation directory or installation path that you selected during the installation process2. Locate the application/src/main/resources directory within the ThingsBoard installation. This is where the configuration files, including thingsboard, are usually stored.

  2. Look for the thingsboard.yml file within the resources directory. Once found, you can access and edit the file using a text editor or a YAML editor.

Please note that the specific location of the thingsboard.yml file may vary depending on the installation method and any customizations made during the installation process. If you have installed ThingsBoard using a different method or on a different platform, the file path may be different.

Always be cautious when making changes to configuration files and ensure that you a backup of the original file before making any modifications. This will allow you to revert to the original configuration if needed.

{"payload":{"allShortcutsEnabled":false,"fileTree":{"application/src/main/resources":{"items":[{"name":"i18n","path":"application/src/main/resources/i18n","contentType":"directory"},{"name":"templates","path":"application/src/main/resources/templates","contentType":"directory"},{"name":"banner.txt","path":"application/src/main/resources/banner.txt","contentType":"file"},{"name":"logback.xml","path":"application/src/main/resources/logback.xml","contentType":"file"},{"name":"thingsboard.yml","path":"application/src/main/resources/thingsboard.yml","contentType":"file"}],"totalCount":5},"application/src/main":{"items":[{"name":"conf","path":"application/src/main/conf","contentType":"directory"},{"name":"data","path":"application/src/main/data","contentType":"directory"},{"name":"java","path":"application/src/main/java","contentType":"directory"},{"name":"resources","path":"application/src/main/resources","contentType":"directory"}],"totalCount":4},"application/src":{"items":[{"name":"main","path":"application/src/main","contentType":"directory"},{"name":"test","path":"application/src/test","contentType":"directory"}],"totalCount":2},"application":{"items":[{"name":"src","path":"application/src","contentType":"directory"},{"name":".gitignore","path":"application/.gitignore","contentType":"file"},{"name":"pom.xml","path":"application/pom.xml","contentType":"file"}],"totalCount":3},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"application","path":"application","contentType":"directory"},{"name":"common","path":"common","contentType":"directory"},{"name":"dao","path":"dao","contentType":"directory"},{"name":"docker","path":"docker","contentType":"directory"},{"name":"img","path":"img","contentType":"directory"},{"name":"monitoring","path":"monitoring","contentType":"directory"},{"name":"msa","path":"msa","contentType":"directory"},{"name":"netty-mqtt","path":"netty-mqtt","contentType":"directory"},{"name":"packaging","path":"packaging","contentType":"directory"},{"name":"rest-client","path":"rest-client","contentType":"directory"},{"name":"rule-engine","path":"rule-engine","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"transport","path":"transport","contentType":"directory"},{"name":"ui-ngx","path":"ui-ngx","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"build_proto.sh","path":"build_proto.sh","contentType":"file"},{"name":"license-header-template.txt","path":"license-header-template.txt","contentType":"file"},{"name":"lombok.config","path":"lombok.config","contentType":"file"},{"name":"pom.xml","path":"pom.xml","contentType":"file"},{"name":"pull_request_template.md","path":"pull_request_template.md","contentType":"file"},{"name":"security.md","path":"security.md","contentType":"file"}],"totalCount":24}},"fileTreeProcessingTime":15.124047,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":75277003,"defaultBranch":"master","name":"thingsboard","ownerLogin":"thingsboard","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-12-01T09:33:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/24291394?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1701436633.0","canEdit":false,"refType":"branch","currentOid":"34f773054269f75cccc72e9acabaf6ae0e8021ec"},"path":"application/src/main/resources/thingsboard.yml","currentUser":null,"blob":{"rawLines":["#","# Copyright 2016-2023 The Thingsboard Authors","#","# Licensed under the Apache License, Version 2.0 (the \"License\");","# you may not use this file except in compliance with the License.","# You may obtain a copy of the License at","#","# http://www.apache.org/licenses/LICENSE-2.0","#","# Unless required b

github.com

Server common parameters ParameterEnvironment VariableDefault ValueDescription server.address HTTP_BIND_ADDRESS 0.0.0.0 Server bind-address server.port HTTP_BIND_PORT 8080 Server bind port server.forward_headers_strategy HTTP_FORWARD_HEADERS_STRATEGY NONE Server forward headers strategy server.ssl.enabled SSL_ENABLED false Enable/disable SSL support server.ssl.credentials.type SSL_CREDENTIALS_TYPE PEM Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) server.ssl.credentials.pem.cert_file SSL_PEM_CERT server.pem Path to the server certificate file (holds server certificate or certificate chain, may include server private key) server.ssl.credentials.pem.key_file SSL_PEM_KEY server_key.pem Path to the server certificate private key file (optional). Required if the private key is not present in the server certificate file server.ssl.credentials.pem.key_password SSL_PEM_KEY_PASSWORD server_key_password Server certificate private key password (optional) server.ssl.credentials.keystore.type SSL_KEY_STORE_TYPE PKCS12 Type of the key store (JKS or PKCS12) server.ssl.credentials.keystore.store_file SSL_KEY_STORE classpath:keystore/keystore.p12 Path to the key store that holds the SSL certificate server.ssl.credentials.keystore.store_password SSL_KEY_STORE_PASSWORD thingsboard Password used to access the key store server.ssl.credentials.keystore.key_alias SSL_KEY_ALIAS tomcat Key alias server.ssl.credentials.keystore.key_password SSL_KEY_PASSWORD thingsboard Password used to access the key server.http2.enabled HTTP2_ENABLED true Enable/disable HTTP/2 support server.log_controller_error_stack_trace HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE false Log errors with stacktrace when REST API throws an exception with the message "Please contact sysadmin" server.ws.send_timeout TB_SERVER_WS_SEND_TIMEOUT 5000 Timeout for sending data to client WebSocket session in milliseconds server.ws.ping_timeout TB_SERVER_WS_PING_TIMEOUT 30000 recommended timeout >= 30 seconds. The platform will attempt to send a 'ping' request 3 times within the timeout server.ws.dynamic_page_link.refresh_interval TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_INTERVAL_SEC 60 Refresh rate of the dynamic alarm end entity data queries server.ws.dynamic_page_link.refresh_pool_size TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_POOL_SIZE 1 Thread pool size to execute dynamic queries server.ws.dynamic_page_link.max_alarm_queries_per_refresh_interval TB_SERVER_WS_MAX_ALARM_QUERIES_PER_REFRESH_INTERVAL 10 Maximum number of dynamic queries per refresh interval. For example, no more than 10 alarm queries are executed by the user simultaneously in all browsers. server.ws.dynamic_page_link.max_per_user TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER 10 Maximum number of dynamic queries per user. For example, no more than 10 alarm widgets opened by the user simultaneously in all browsers server.ws.max_entities_per_data_subscription TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION 10000 Maximum number of entities returned for single entity subscription. For example, no more than 10,000 entities on the map widget server.ws.max_entities_per_alarm_subscription TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION 10000 Maximum number of alarms returned for single alarm subscription. For example, no more than 10,000 alarms on the alarm widget server.ws.max_queue_messages_per_session TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION 1000 Maximum queue size of the websocket updates per session. This restriction prevents infinite updates of WS server.rest.server_side_rpc.min_timeout MIN_SERVER_SIDE_RPC_TIMEOUT 5000 Minimum value of the server-side RPC timeout. May override value provided in the REST API call. Since 2.5 migration to queues, the RPC delay depends on the size of the pending messages in the queue. So default UI parameter of 500ms may not be sufficient for loaded environments. server.rest.server_side_rpc.default_timeout DEFAULT_SERVER_SIDE_RPC_TIMEOUT 10000 Default value of the server-s

thingsboard.io

Prerequisites Step 1. Install Java 11 (OpenJDK) Step 2. ThingsBoard service installation Step 3. Configure ThingsBoard database Step 4. Choose ThingsBoard queue service Step 5. [Optional] Memory update for slow machines (1GB of RAM) Step 6. Run installation script Step 7. Start ThingsBoard service Troubleshooting Windows firewall settings Next steps Prerequisites This guide describes how to install ThingsBoard on a Windows machine. Instructions below are provided for Windows 10/8.1/8/7 32-bit/64-bit. Hardware requirements depend on chosen database and amount of devices connected to the system. To run ThingsBoard and PostgreSQL on a single machine you will need at least 2Gb of RAM. To run ThingsBoard and Cassandra on a single machine you will need at least 8Gb of RAM. Step 1. Install Java 11 (OpenJDK) ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11. Visit Open JDK Download Page to download latest OpenJDK 11 (LTS) MSI package. Run the downloaded MSI package and follow the instructions. Make sure you have selected Add to PATH and Set JAVA_HOME variable options to Will be installed on local hard drive state. Visit PostgreSQL JDBC Download Page to download PostgreSQL JDBC Driver Copy downloaded file to C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext and add a global variable named CLASSPATH with value .;C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext\postgresql-42.2.18.jar to your system (right click on My Computer, scroll down, Advanced System Settings, Advanced, Environmental variables, under System variables click Create). If the jre folder does not exists under C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot path, create this folder and all required sub-folders You can check the installation using the following command (using Command Prompt): Expected command output is: 1 2 3 4 C:\Users\User>java -version openjdk version "11.0.xx" OpenJDK Runtime Environment (AdoptOpenJDK)(...) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(...) Step 2. ThingsBoard service installation Download and extract the package. 1 https://github.com/thingsboard/thingsboard/releases/download/v3.6.1/thingsboard-windows-3.6.1.zip Note: We assume you have extracted ThingsBoard package to default location: C:\Program Files (x86)\thingsboard Step 3. Configure ThingsBoard database ThingsBoard is able to use SQL or hybrid database approach. See corresponding architecture page for more details. PostgreSQL Installation Download the installation file (PostgreSQL 12.17 or newer releases) here and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Dont forget this password. It will be used later. For simplicity, we will substitute it with postgres. Create ThingsBoard Database Once installed, launch the pgAdmin software and login as superuser (postgres). Open your server and create database thingsboard with owner postgres. ThingsBoard Configuration In case you have specified the PostgreSQL superuser password as postgres, you can skip this step. Open the Notepad or other editor as administrator user (right click on the app icon and select Run as administrator). Open the following file for editing (select All Files instead of Text Documents in file choosing dialog, the encoding is UTF-8): 1 C:\Program Files (x86)\thingsboard\conf\thingsboard.yml and locate # SQL DAO Configuration block. Dont forget to replace postgres with your real postgres user password: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 # SQL DAO Configuration spring: data: jpa: repositories: enabled: "true" jpa: open-in-view: "false" hibernate: ddl-auto: "none" datasource: driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}" url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" username: "${SPRING_DATASOURCE_USERNAME:postgres}" password: "${SPRING_DATASOURCE_PASSWORD:YOUR_POSTGRES_PASSWORD_HERE}" hikari: maximumPoolSize: "${S

thingsboard.io

how to Navigate to the installation directory of your ThingsBoard instance.

To locate the installation directory of your ThingsBoard instance, you will need to follow these general steps: For Windows:

  1. If you have installedBoard on a Windows machine, the default installation directory might be "C:\Program Files\ThingsBoard" or "C:\ Files (x86)\ThingsBoard" depending on your system architecture.
  2. Alternatively, you might have chosen a custom installation directory during the installation process If this is the case, you can navigate to the directory that you selected during the installation.

For:

  1. If you're using a Linux-based system, the default installation directory for ThingsBoard might be "/opt/thingsboard".
  2. You can also use terminal to locate the installation directory by running the command sudo find / -name thingsboard to search for the ThingsBoard installation directory.

It's important to note that these are general paths, and the actual installation directory might vary based on your specific installation process or any customizations made during the setup. If you used a different directory during installation, or if you're unsure of the installation location, you can also refer to the installation documentation or specific instructions you followed when setting up ThingsBoard.

Always ensure you have the necessary permissions to access system directories, especially when commands that require elevated privileges.

Prerequisites Step 1. Install Java 11 (OpenJDK) Step 2. ThingsBoard service installation Step 3. Obtain and configure license key Step 4. Configure ThingsBoard database Step 5. Choose ThingsBoard queue service Step 6. [Optional] Memory update for slow machines (1GB of RAM) Step 7. Run installation script Step 8. Start ThingsBoard service Step 9. Install ThingsBoard Web Report Server component Troubleshooting Windows firewall settings Next steps Prerequisites This guide describes how to install ThingsBoard on a Windows machine. Instructions below are provided for Windows 10/8.1/8/7 32-bit/64-bit. Hardware requirements depend on chosen database and amount of devices connected to the system. To run ThingsBoard and PostgreSQL on a single machine you will need at least 2Gb of RAM. To run ThingsBoard and Cassandra on a single machine you will need at least 8Gb of RAM. Step 1. Install Java 11 (OpenJDK) ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11. Visit Open JDK Download Page to download latest OpenJDK 11 (LTS) MSI package. Run the downloaded MSI package and follow the instructions. Make sure you have selected Add to PATH and Set JAVA_HOME variable options to Will be installed on local hard drive state. Visit PostgreSQL JDBC Download Page to download PostgreSQL JDBC Driver Copy downloaded file to C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext and add a global variable named CLASSPATH with value .;C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext\postgresql-42.2.18.jar to your system (right click on My Computer, scroll down, Advanced System Settings, Advanced, Environmental variables, under System variables click Create). If the jre folder does not exists under C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot path, create this folder and all required sub-folders You can check the installation using the following command (using Command Prompt): Expected command output is: 1 2 3 4 C:\Users\User>java -version openjdk version "11.0.xx" OpenJDK Runtime Environment (AdoptOpenJDK)(...) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(...) Step 2. ThingsBoard service installation Download and run the installation package. 1 https://dist.thingsboard.io/thingsboard-windows-setup-3.6.1pe.exe Note: We assume you have installed ThingsBoard to default location: C:\Program Files (x86)\thingsboard Step 3. Obtain and configure license key We assume you have already chosen your subscription plan or decided to purchase a perpetual license. If not, please navigate to pricing page to select the best license option for your case and get your license. See How-to get pay-as-you-go subscription or How-to get perpetual license for more details. Once you get the license secret, you should put it to the thingsboard configuration file. Open the Notepad or other editor as administrator user (right click on the app icon and select Run as administrator). Open the following file for editing (select All Files instead of Text Documents in file choosing dialog, the encoding is UTF-8): 1 C:\Program Files (x86)\thingsboard\conf\thingsboard.yml Scroll to the bottom of the file and locate the following configuration block: 1 2 license: secret: "${TB_LICENSE_SECRET:}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io) and put your license secret. See example below: 1 2 license: secret: "${TB_LICENSE_SECRET:YOUR_LICENSE_SECRET_HERE}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io) Step 4. Configure ThingsBoard database ThingsBoard is able to use SQL or hybrid database approach. See corresponding architecture page for more details. PostgreSQL Installation Download the installation file (PostgreSQL 12.17 or newer releases) here and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Dont forget this password. It will be used later. For simplicity, we wil

thingsboard.io

What is ThingsBoard?ThingsBoard is an open-source IoT platform for data collection, processing, visualization and device management. It enables device connectivity via industry standard IoT protocols MQTT, CoAP and HTTP and supports both cloud and on-premises deployments. We will use it in order to build a little IoT system in which some datas are sent via MQTT and receveid thanks to ThingsBoard.In our guide we will use the Docker installation of the platform for Linux systems. For those which dont know it, Docker is probably the actual standard for containers. Containers are a standardized unit of software that allows developers to isolate their app from its environment, solving the it works on my machine headache.Docker architectureIf you need a quick phase of configuration during your work, this is what you need and its also really really easy to make it work; it is the perfect counterexample for the situations like oh no, I dont know this technology, I cant manage this.You can install it from here:https://docs.docker.com/install/and in a couple of minutes youre ready to start.InstallationYou just need to run, on terminal:$ docker run -it -p 9090:9090 -p 1883:1883 -p 5683:5683/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-postgresYou will find wonderful that, after this command, you can already start with your work. In particular:docker run - run this container-it - attach a terminal session with current ThingsBoard process output-p 9090:9090 - connect local port 9090 to exposed internal HTTP port 9090-p 1883:1883 - connect local port 1883 to exposed internal MQTT port 1883-p 5683:5683 - connect local port 5683 to exposed internal COAP port 5683-v ~/.mytb-data:/data - mounts the hosts dir ~/.mytb-data to ThingsBoard DataBase data directory-v ~/.mytb-logs:/var/log/thingsboard - mounts the hosts dir ~/.mytb-logs to ThingsBoard logs directory--name mytb - friendly local name of this machine--restart always - automatically start ThingsBoard in case of system reboot and restart in case of failure.thingsboard/tb-postgres - docker image, can be also thingsboard/tb-cassandra or thingsboard/tbLike said before, now we can already open our localhost (http://localhost:9090) and see that the Web UI is available to work with. Initially you have to log in with default credentials of Tenant Administrator role, the one useful for our purpose: [email protected] / tenant.ThingsBoard login interfaceCreation of devicesThe next step, in order to have a working structure, is the creation of devices of interest (for now, on ThingsBoard side). This is what you are seeing now that you logged in.For this purpose, lets go on the assets panel and click on the plus in order to add a new one;Click on assets panelNew asset buttonthen we can fill the form with parameters for this asset.Assets formNow we can create some devices: the procedure is obviously the same.Devices formNote that we are going to create two differents devices, both with type multisensor. Later we will see why, but now this should be the situation in the devices panel.Our two devicesNext step is create relations from assets to devices. Relations are really useful when you have a lot of assets and a lot of devices, and you have to manage this, so with relations you are building a graph in which nodes are ThingsBoard entities and the edges our ThingsBoard relations. Fortunately, data modelling is really simple in this platform. Lets go to the asset previously created and click on relations; then add two new relations, one for each devices.Relation formPushing datasWell, after these simple operations, we are ready to receive our first data on ThingsBoard!In this guide datas are simply values about temperature, humidity, wind direction, wind intensity and rain height, random generated by a trivial Python script, and we will use MQTT protocol for pushing them.Generation of random valuesThis is possible thanks to a client-side

medium.com

What is ThingsBoard?ThingsBoard is an open source platform for collecting and visualizing data from Internet of Things devices. Data from any number of devices can be sent to a cloud server where it can be viewed or shared through a customizable dashboard.This guide will show how to install ThingsBoard on a Linode and use a Raspberry Pi to send simple telemetry data to a cloud dashboard.NoteThis guide will use a Raspberry Pi 3 with a Sense HAT. You can substitute any device capable of sending telemetry data, or use curl to experiment with ThingsBoard without using any external devices.Install ThingsBoardThingsBoard runs on Java 8, and the Oracle JDK is recommended.Install software-properties-common:sudo apt install software-properties-common Add the Oracle PPA repository:sudo apt-add-repository ppa:webupd8team/java Update your system:sudo apt update Install the Oracle JDK. To install the Java 9 JDK, change java8 to java9 in the command:sudo apt install oracle-java8-installer Check your Java version:java -version Set Up PostgreSQLInstall PostgreSQL:sudo apt install postgresql postgresql-contrib Create a database and database user for ThingsBoard:sudo -u postgres createdb thingsboard sudo -u postgres createuser thingsboard Set a password for the thingsboard user and grant access to the database:sudo -u postgres psql thingsboard ALTER USER thingsboard WITH PASSWORD 'thingsboard'; GRANT ALL PRIVILEGES ON DATABASE thingsboard TO thingsboard; \q Install ThingsBoardDownload the installation package. Check the releases page and replace the version numbers in the following command with the version tagged Latest release:wget https://github.com/thingsboard/thingsboard/releases/download/v1.3.1/thingsboard-1.3.1.deb Install ThingsBoard:sudo dpkg -i thingsboard-1.3.1.deb Open /etc/thingsboard/conf/thingsboard.yml in a text editor and comment out the HSQLDB DAO Configuration section:File: /etc/thingsboard/conf/thingsboard.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # HSQLDB DAO Configuration #spring: # data: # jpa: # repositories: # enabled: "true" # jpa: # hibernate: # ddl-auto: "validate" # database-platform: "org.hibernate.dialect.HSQLDialect" # datasource: # driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.hsqldb.jdbc.JDBCDriver}" # url: "${SPRING_DATASOURCE_URL:jdbc:hsqldb:file:${SQL_DATA_FOLDER:/tmp}/thingsboardDb;sql.enforce_size=false}" # username: "${SPRING_DATASOURCE_USERNAME:sa}" # password: "${SPRING_DATASOURCE_PASSWORD:}"In the same section, uncomment the PostgreSQL configuration block. Replace thingsboard in the username and password fields with the username and password of your thingsboard user:File: /etc/thingsboard/conf/thingsboard.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # PostgreSQL DAO Configuration spring: data: jpa: repositories: enabled: "true" jpa: hibernate: ddl-auto: "validate" database-platform: "org.hibernate.dialect.PostgreSQLDialect" datasource: driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}" url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" username: "${SPRING_DATASOURCE_USERNAME:thingsboard}" password: "${SPRING_DATASOURCE_PASSWORD:thingsboard}"Run this installation script:sudo /usr/share/thingsboard/bin/install/install.sh --loadDemo Start the ThingsBoard service:sudo systemctl enable thingsboard sudo systemctl start thingsboard NGINX Reverse ProxyThingsBoard listens on localhost:8080, by default. For security purposes, its better to serve the dashboard through a reverse proxy. This guide will use NGINX, but any webserver can be used.Install NGINX:sudo apt install nginx Create /etc/nginx/conf.d/thingsboard.conf with a text editor and edit it to match the example below. Replace example.com with the public IP address or FQDN of your Linode.File: /etc/nginx/conf.d/thingsboard.conf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 server { listen 80; listen [::]:80; server_name example.com; location / { # try_files $uri $uri/ =404; proxy_pass http://localhost:8080/; proxy_http_version

linode.com

after finding thingsboard.yml how to make changes in that

Once you have located the thingsboard.yml, you can make changes to it by following these steps:

1 Open the thingsboard.yml file using a text editor or a YAML editor. You can use editors like Notepad, Notepad++, Sublime Text, Visual Studio Code, or any other text editor of your choice.

  1. Locate the specific parameters that you want to modify. In the provided information, there are various parameters listed along with their default values and descriptions. For example, if you want to change the server port, you would look for the "server.port" parameter in the file.

  2. Edit the parameter values based on your requirements. For instance, if you want to change the default server port from 8080 to 809, you would update the value associated with the "server.port" parameter to 8090.

  3. After making the necessary changes, save the thingsboard.yml file.

  4. Once the file is saved, you may need to restart the ThingsBoard server for the changes to take effect. This will ensure that the modified configurations are applied.

's important to exercise caution when making changes to configuration files, and always ensure that you have a backup of the original file before making any modifications.

Remember to follow any specific guidelines or recommendations provided in the documentation for ThingsBoard when making configuration changes.

{"payload":{"allShortcutsEnabled":false,"fileTree":{"application/src/main/resources":{"items":[{"name":"i18n","path":"application/src/main/resources/i18n","contentType":"directory"},{"name":"templates","path":"application/src/main/resources/templates","contentType":"directory"},{"name":"banner.txt","path":"application/src/main/resources/banner.txt","contentType":"file"},{"name":"logback.xml","path":"application/src/main/resources/logback.xml","contentType":"file"},{"name":"thingsboard.yml","path":"application/src/main/resources/thingsboard.yml","contentType":"file"}],"totalCount":5},"application/src/main":{"items":[{"name":"conf","path":"application/src/main/conf","contentType":"directory"},{"name":"data","path":"application/src/main/data","contentType":"directory"},{"name":"java","path":"application/src/main/java","contentType":"directory"},{"name":"resources","path":"application/src/main/resources","contentType":"directory"}],"totalCount":4},"application/src":{"items":[{"name":"main","path":"application/src/main","contentType":"directory"},{"name":"test","path":"application/src/test","contentType":"directory"}],"totalCount":2},"application":{"items":[{"name":"src","path":"application/src","contentType":"directory"},{"name":".gitignore","path":"application/.gitignore","contentType":"file"},{"name":"pom.xml","path":"application/pom.xml","contentType":"file"}],"totalCount":3},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"application","path":"application","contentType":"directory"},{"name":"common","path":"common","contentType":"directory"},{"name":"dao","path":"dao","contentType":"directory"},{"name":"docker","path":"docker","contentType":"directory"},{"name":"img","path":"img","contentType":"directory"},{"name":"monitoring","path":"monitoring","contentType":"directory"},{"name":"msa","path":"msa","contentType":"directory"},{"name":"netty-mqtt","path":"netty-mqtt","contentType":"directory"},{"name":"packaging","path":"packaging","contentType":"directory"},{"name":"rest-client","path":"rest-client","contentType":"directory"},{"name":"rule-engine","path":"rule-engine","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"transport","path":"transport","contentType":"directory"},{"name":"ui-ngx","path":"ui-ngx","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"build_proto.sh","path":"build_proto.sh","contentType":"file"},{"name":"license-header-template.txt","path":"license-header-template.txt","contentType":"file"},{"name":"lombok.config","path":"lombok.config","contentType":"file"},{"name":"pom.xml","path":"pom.xml","contentType":"file"},{"name":"pull_request_template.md","path":"pull_request_template.md","contentType":"file"},{"name":"security.md","path":"security.md","contentType":"file"}],"totalCount":24}},"fileTreeProcessingTime":14.889899,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":75277003,"defaultBranch":"master","name":"thingsboard","ownerLogin":"thingsboard","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-12-01T09:33:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/24291394?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1701436633.0","canEdit":false,"refType":"branch","currentOid":"34f773054269f75cccc72e9acabaf6ae0e8021ec"},"path":"application/src/main/resources/thingsboard.yml","currentUser":null,"blob":{"rawLines":["#","# Copyright 2016-2023 The Thingsboard Authors","#","# Licensed under the Apache License, Version 2.0 (the \"License\");","# you may not use this file except in compliance with the License.","# You may obtain a copy of the License at","#","# http://www.apache.org/licenses/LICENSE-2.0","#","# Unless required b

github.com

Server common parameters ParameterEnvironment VariableDefault ValueDescription server.address HTTP_BIND_ADDRESS 0.0.0.0 Server bind-address server.port HTTP_BIND_PORT 8080 Server bind port server.forward_headers_strategy HTTP_FORWARD_HEADERS_STRATEGY NONE Server forward headers strategy server.ssl.enabled SSL_ENABLED false Enable/disable SSL support server.ssl.credentials.type SSL_CREDENTIALS_TYPE PEM Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) server.ssl.credentials.pem.cert_file SSL_PEM_CERT server.pem Path to the server certificate file (holds server certificate or certificate chain, may include server private key) server.ssl.credentials.pem.key_file SSL_PEM_KEY server_key.pem Path to the server certificate private key file (optional). Required if the private key is not present in the server certificate file server.ssl.credentials.pem.key_password SSL_PEM_KEY_PASSWORD server_key_password Server certificate private key password (optional) server.ssl.credentials.keystore.type SSL_KEY_STORE_TYPE PKCS12 Type of the key store (JKS or PKCS12) server.ssl.credentials.keystore.store_file SSL_KEY_STORE classpath:keystore/keystore.p12 Path to the key store that holds the SSL certificate server.ssl.credentials.keystore.store_password SSL_KEY_STORE_PASSWORD thingsboard Password used to access the key store server.ssl.credentials.keystore.key_alias SSL_KEY_ALIAS tomcat Key alias server.ssl.credentials.keystore.key_password SSL_KEY_PASSWORD thingsboard Password used to access the key server.http2.enabled HTTP2_ENABLED true Enable/disable HTTP/2 support server.log_controller_error_stack_trace HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE false Log errors with stacktrace when REST API throws an exception with the message "Please contact sysadmin" server.ws.send_timeout TB_SERVER_WS_SEND_TIMEOUT 5000 Timeout for sending data to client WebSocket session in milliseconds server.ws.ping_timeout TB_SERVER_WS_PING_TIMEOUT 30000 recommended timeout >= 30 seconds. The platform will attempt to send a 'ping' request 3 times within the timeout server.ws.dynamic_page_link.refresh_interval TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_INTERVAL_SEC 60 Refresh rate of the dynamic alarm end entity data queries server.ws.dynamic_page_link.refresh_pool_size TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_POOL_SIZE 1 Thread pool size to execute dynamic queries server.ws.dynamic_page_link.max_alarm_queries_per_refresh_interval TB_SERVER_WS_MAX_ALARM_QUERIES_PER_REFRESH_INTERVAL 10 Maximum number of dynamic queries per refresh interval. For example, no more than 10 alarm queries are executed by the user simultaneously in all browsers. server.ws.dynamic_page_link.max_per_user TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER 10 Maximum number of dynamic queries per user. For example, no more than 10 alarm widgets opened by the user simultaneously in all browsers server.ws.max_entities_per_data_subscription TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION 10000 Maximum number of entities returned for single entity subscription. For example, no more than 10,000 entities on the map widget server.ws.max_entities_per_alarm_subscription TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION 10000 Maximum number of alarms returned for single alarm subscription. For example, no more than 10,000 alarms on the alarm widget server.ws.max_queue_messages_per_session TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION 1000 Maximum queue size of the websocket updates per session. This restriction prevents infinite updates of WS server.rest.server_side_rpc.min_timeout MIN_SERVER_SIDE_RPC_TIMEOUT 5000 Minimum value of the server-side RPC timeout. May override value provided in the REST API call. Since 2.5 migration to queues, the RPC delay depends on the size of the pending messages in the queue. So default UI parameter of 500ms may not be sufficient for loaded environments. server.rest.server_side_rpc.default_timeout DEFAULT_SERVER_SIDE_RPC_TIMEOUT 10000 Default value of the server-s

thingsboard.io

What is ThingsBoard?ThingsBoard is an open source platform for collecting and visualizing data from Internet of Things devices. Data from any number of devices can be sent to a cloud server where it can be viewed or shared through a customizable dashboard.This guide will show how to install ThingsBoard on a Linode and use a Raspberry Pi to send simple telemetry data to a cloud dashboard.NoteThis guide will use a Raspberry Pi 3 with a Sense HAT. You can substitute any device capable of sending telemetry data, or use curl to experiment with ThingsBoard without using any external devices.Install ThingsBoardThingsBoard runs on Java 8, and the Oracle JDK is recommended.Install software-properties-common:sudo apt install software-properties-common Add the Oracle PPA repository:sudo apt-add-repository ppa:webupd8team/java Update your system:sudo apt update Install the Oracle JDK. To install the Java 9 JDK, change java8 to java9 in the command:sudo apt install oracle-java8-installer Check your Java version:java -version Set Up PostgreSQLInstall PostgreSQL:sudo apt install postgresql postgresql-contrib Create a database and database user for ThingsBoard:sudo -u postgres createdb thingsboard sudo -u postgres createuser thingsboard Set a password for the thingsboard user and grant access to the database:sudo -u postgres psql thingsboard ALTER USER thingsboard WITH PASSWORD 'thingsboard'; GRANT ALL PRIVILEGES ON DATABASE thingsboard TO thingsboard; \q Install ThingsBoardDownload the installation package. Check the releases page and replace the version numbers in the following command with the version tagged Latest release:wget https://github.com/thingsboard/thingsboard/releases/download/v1.3.1/thingsboard-1.3.1.deb Install ThingsBoard:sudo dpkg -i thingsboard-1.3.1.deb Open /etc/thingsboard/conf/thingsboard.yml in a text editor and comment out the HSQLDB DAO Configuration section:File: /etc/thingsboard/conf/thingsboard.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # HSQLDB DAO Configuration #spring: # data: # jpa: # repositories: # enabled: "true" # jpa: # hibernate: # ddl-auto: "validate" # database-platform: "org.hibernate.dialect.HSQLDialect" # datasource: # driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.hsqldb.jdbc.JDBCDriver}" # url: "${SPRING_DATASOURCE_URL:jdbc:hsqldb:file:${SQL_DATA_FOLDER:/tmp}/thingsboardDb;sql.enforce_size=false}" # username: "${SPRING_DATASOURCE_USERNAME:sa}" # password: "${SPRING_DATASOURCE_PASSWORD:}"In the same section, uncomment the PostgreSQL configuration block. Replace thingsboard in the username and password fields with the username and password of your thingsboard user:File: /etc/thingsboard/conf/thingsboard.yml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 # PostgreSQL DAO Configuration spring: data: jpa: repositories: enabled: "true" jpa: hibernate: ddl-auto: "validate" database-platform: "org.hibernate.dialect.PostgreSQLDialect" datasource: driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}" url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}" username: "${SPRING_DATASOURCE_USERNAME:thingsboard}" password: "${SPRING_DATASOURCE_PASSWORD:thingsboard}"Run this installation script:sudo /usr/share/thingsboard/bin/install/install.sh --loadDemo Start the ThingsBoard service:sudo systemctl enable thingsboard sudo systemctl start thingsboard NGINX Reverse ProxyThingsBoard listens on localhost:8080, by default. For security purposes, its better to serve the dashboard through a reverse proxy. This guide will use NGINX, but any webserver can be used.Install NGINX:sudo apt install nginx Create /etc/nginx/conf.d/thingsboard.conf with a text editor and edit it to match the example below. Replace example.com with the public IP address or FQDN of your Linode.File: /etc/nginx/conf.d/thingsboard.conf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 server { listen 80; listen [::]:80; server_name example.com; location / { # try_files $uri $uri/ =404; proxy_pass http://localhost:8080/; proxy_http_version

linode.com

if i want to make changes in this "TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION" how can i do so

To modify the "TB_SERVER_REST_LIMITS_TANT_CONFIGURATION" parameter in the thingsboard.yml file, follow these steps:

  1. Locate the thingsboard.yml in the installation directory of ThingsBoard.

  2. Open the thingsboard.yml file using a text editor.

  3. Search for the "TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION" parameter within the file.

  4. Once you have located the parameter, you can modify its value based on your requirements. The format for this parameter typically includes the maximum number of REST API calls allowed, specified in time intervals. For example, the format might be "100:1,2000:60", which means no more than 100 requests per second and no more than 2000 requests per minute.

  5. After making the necessary changes, save the thingsboard.yml file.

  6. Ensure that you the ThingsBoard server for the changes to take effect.

It's important to exercise caution when modifying configuration files, and it's recommended to create a backup of the original file before making any changes.

Remember to refer to any specific documentation provided by ThingsBoard for additional details about modifying configuration parameters.

{"payload":{"allShortcutsEnabled":false,"fileTree":{"application/src/main/resources":{"items":[{"name":"i18n","path":"application/src/main/resources/i18n","contentType":"directory"},{"name":"templates","path":"application/src/main/resources/templates","contentType":"directory"},{"name":"banner.txt","path":"application/src/main/resources/banner.txt","contentType":"file"},{"name":"logback.xml","path":"application/src/main/resources/logback.xml","contentType":"file"},{"name":"thingsboard.yml","path":"application/src/main/resources/thingsboard.yml","contentType":"file"}],"totalCount":5},"application/src/main":{"items":[{"name":"conf","path":"application/src/main/conf","contentType":"directory"},{"name":"data","path":"application/src/main/data","contentType":"directory"},{"name":"java","path":"application/src/main/java","contentType":"directory"},{"name":"resources","path":"application/src/main/resources","contentType":"directory"}],"totalCount":4},"application/src":{"items":[{"name":"main","path":"application/src/main","contentType":"directory"},{"name":"test","path":"application/src/test","contentType":"directory"}],"totalCount":2},"application":{"items":[{"name":"src","path":"application/src","contentType":"directory"},{"name":".gitignore","path":"application/.gitignore","contentType":"file"},{"name":"pom.xml","path":"application/pom.xml","contentType":"file"}],"totalCount":3},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":"application","path":"application","contentType":"directory"},{"name":"common","path":"common","contentType":"directory"},{"name":"dao","path":"dao","contentType":"directory"},{"name":"docker","path":"docker","contentType":"directory"},{"name":"img","path":"img","contentType":"directory"},{"name":"monitoring","path":"monitoring","contentType":"directory"},{"name":"msa","path":"msa","contentType":"directory"},{"name":"netty-mqtt","path":"netty-mqtt","contentType":"directory"},{"name":"packaging","path":"packaging","contentType":"directory"},{"name":"rest-client","path":"rest-client","contentType":"directory"},{"name":"rule-engine","path":"rule-engine","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":"transport","path":"transport","contentType":"directory"},{"name":"ui-ngx","path":"ui-ngx","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"build_proto.sh","path":"build_proto.sh","contentType":"file"},{"name":"license-header-template.txt","path":"license-header-template.txt","contentType":"file"},{"name":"lombok.config","path":"lombok.config","contentType":"file"},{"name":"pom.xml","path":"pom.xml","contentType":"file"},{"name":"pull_request_template.md","path":"pull_request_template.md","contentType":"file"},{"name":"security.md","path":"security.md","contentType":"file"}],"totalCount":24}},"fileTreeProcessingTime":8.043576,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":75277003,"defaultBranch":"master","name":"thingsboard","ownerLogin":"thingsboard","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2016-12-01T09:33:30.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/24291394?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1701436633.0","canEdit":false,"refType":"branch","currentOid":"34f773054269f75cccc72e9acabaf6ae0e8021ec"},"path":"application/src/main/resources/thingsboard.yml","currentUser":null,"blob":{"rawLines":["#","# Copyright 2016-2023 The Thingsboard Authors","#","# Licensed under the Apache License, Version 2.0 (the \"License\");","# you may not use this file except in compliance with the License.","# You may obtain a copy of the License at","#","# http://www.apache.org/licenses/LICENSE-2.0","#","# Unless required by

github.com

How to change configuration parameters? Linux Windows Docker based deployment Configuration parameters ThingsBoard Edge Core/Rule Engine Parameters Cloud parameters HTTP server parameters Zookeeper connection parameters Cluster stats parameters Plugins configuration parameters Security parameters Usage statistics parameters UI parameters SQL configuration parameters Actor system parameters Cache parameters Caffeine parameters Redis connection parameters Check new version updates parameters Spring freemarker configuration Spring CORS configuration The default timeout for asynchronous requests in milliseconds Spring serve gzip compressed static resources SQL DAO Configuration Audit log parameters Device connectivity state parameters JavaScript evaluator parameters Transport parameters Local HTTP transport parameters Local MQTT transport parameters Local CoAP transport parameters Local LwM2M transport parameters Local SNMP transport parameters Swagger parameters Queue parameters ThingsBoard event parameters ThingsBoard service parameters ThingsBoard metrics parameters logback.xml This guide will help you to get familiar with ThingsBoard Edge configuration files and parameters. We recommend to configure ThingsBoard Edge using environment variables. This way you do not need to merge the configuration files when new edge release arrives. List of available configuration parameters and corresponding environment variables is located here. How to change configuration parameters? Linux If ThingsBoard Edge is installed on Linux, you may specify the environment variables in the tb-edge.conf file: 1 sudo nano /usr/share/tb-edge/conf/tb-edge.conf Use simple example below to add new environment variable HTTP_BIND_PORT with value 8081. 1 2 ... export HTTP_BIND_PORT=8081 Windows If ThingsBoard Edge is installed on Windows, you may specify the environment variables in the tb-edge.yml file located in the following directory: The configuration file is written in YAML. All configuration parameters have corresponding environment variable name and default value. In order to change configuration parameter you can simply change its default value. For example: 1 2 server: address: "${HTTP_BIND_ADDRESS:0.0.0.0}" In this case, HTTP_BIND_ADDRESS is environment variable name and 0.0.0.0 is a default value. Docker based deployment If ThingsBoard Edge is installed in a docker compose environment, you may edit the scripts and add environment variables for the corresponding containers. See docker documentation for more details. Configuration parameters The parameters are grouped by system components. The list contains the name (address in tb-edge.yml file), environment variable, default value and description. ThingsBoard Edge Core/Rule Engine Parameters Cloud parameters PropertyEnvironment VariableDefault ValueDescription cloud.routingKey CLOUD_ROUTING_KEY Your edge key # e.g. 19ea7ee8-5e6d-e642-4f32-05440a529015 cloud.secret CLOUD_ROUTING_SECRET Your edge secret # e.g. bztvkvfqsye7omv9uxlp cloud.reconnect_timeout CLOUD_RECONNECT_TIMEOUT 3000 Time to wait before reconnecting to cloud in case connectivity was lost cloud.rpc.host CLOUD_RPC_HOST localhost IP address of the machine with the ThingsBoard platform # e.g. thingsboard.cloud, demo.thingsboard.io, X.X.X.X, localhost cloud.rpc.port CLOUD_RPC_PORT 7070 Edge RPC port according to ThingsBoard server configuration cloud.rpc.timeout CLOUD_RPC_TIMEOUT 5 Timeout in seconds for channel termination cloud.rpc.keep_alive_time_sec CLOUD_RPC_KEEP_ALIVE_TIME_SEC 360 Number of seconds to keep alive connection. If after X seconds keep alive messages will not be colivered consider connection to cloud as lost cloud.rpc.ssl.enabled CLOUD_RPC_SSL_ENABLED false Enable TLS communication between cloud and edge cloud.rpc.ssl.cert CLOUD_RPC_SSL_CERT Cert file to be used during TLS connectivity to cloud cloud.rpc.storage.max_read_records_count CLOUD_RPC_STORAGE_MAX_READ_RECORDS_COUNT 50 Max records of cloud event to read from loca

thingsboard.io

API & Rate Limits feature allows controlling API usage, by limiting number of requests from a single host/device/tenant during single time unit (Minutes, Hours, etc.). API & Rate limits are disabled by default. System administrator is able to configure rate limits using thingsboard.yml. REST API limits REST API calls are used by all sorts of UI components and possibly some automatic scripts launched on behalf of customer user or tenant user. It is critical to limit amount of API calls by tenant or by customer to avoid overloading the server due to mistakes in a custom widget or script. The rest.limits.tenant.enabled parameter or TB_SERVER_REST_LIMITS_TENANT_ENABLED environment property enables/disables tenant level limits. The rest.limits.tenant.configuration parameter or TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION environment property configure maximum amount of REST API calls. For example, value 100:1,2000:60 means no more then 100 requests per second and no more then 2000 requests per minute. 1 2 3 4 5 6 7 8 9 10 server: ... rest: limits: tenant: enabled: "${TB_SERVER_REST_LIMITS_TENANT_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_TENANT_CONFIGURATION:100:1,2000:60}" customer: enabled: "${TB_SERVER_REST_LIMITS_CUSTOMER_ENABLED:false}" configuration: "${TB_SERVER_REST_LIMITS_CUSTOMER_CONFIGURATION:50:1,1000:60}" Websocket limits Websockets are used to deliver real-time notifications about new telemetry values from device to the dashboard. The ws.send_timeout parameter or TB_SERVER_WS_SEND_TIMEOUT environment property controls maximum time for a successful websocket message delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_queue_per_ws_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION environment property controls max messages that are awaiting delivery to the client. If client is too slow, the session will be closed. The ws.limits.max_sessions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_* environment property controls maximum amount of active connections per certain entity: tenant, customer, public or regular user. If there is too much sessions per certain criteria, new connections will be dropped. The ws.limits.max_subscriptions_per_* parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_* environment property controls maximum amount of active subscriptions within all sessions per certain entity: tenant, customer, public or regular user. If there is too much subscriptions per certain criteria, new subscriptions will not be accepted. The ws.limits.max_updates_per_session parameter or TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_UPDATES_PER_SESSION environment property configure maximum amount of messages sent to the client from the server for each session. For example, value 300:1,3000:60 means no more then 300 updates per second and no more then 3000 updates per minute. You can find sample configuration below: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 server: ... ws: send_timeout: "${TB_SERVER_WS_SEND_TIMEOUT:5000}" limits: # Limit the amount of sessions and subscriptions available on each server. Put values to zero to disable particular limitation max_sessions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_TENANT:0}" max_sessions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_CUSTOMER:0}" max_sessions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_REGULAR_USER:0}" max_sessions_per_public_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SESSIONS_PER_PUBLIC_USER:0}" max_queue_per_ws_session: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_QUEUE_PER_WS_SESSION:500}" max_subscriptions_per_tenant: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_TENANT:0}" max_subscriptions_per_customer: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_CUSTOMER:0}" max_subscriptions_per_regular_user: "${TB_SERVER_WS_TENANT_RATE_LIMITS_MAX_SUBSCRIPTIONS_PER_REGULAR_USER:0}" max_s

thingsboard.io