在全新(Raspberry Pi)安装之后,Thingsboard IoT平台(https://thingsboard.io)的默认系统管理员帐户是什么?
现有文档仅涉及默认的"租户"帐户,这在我的设置中是可以的.
提前致谢.
Nuno Albuquerque
我有一个新的ubuntu 16.04虚拟机,我正在尝试使用此文档贡献指南安装thingboard并且没有任何成功:
这是在机器上做了什么:
sudo apt-get install default-jre default-jdk
JAVA_HOME='/usr/lib/jvm/default-java'
git clone
https://github.com/thingsboard/thingsboard.gitgit checkout release-1.3
cd ${TB_WORK_DIR}/application
mvn clean install -DskipTests
cd ${TB_WORK_DIR}/application/target/bin/install/install_dev_db.sh
为我的用户和执行脚本.cd ${TB_WORK_DIR}/application
mvn clean install -DskipTests
结果:
NPM服务器启动,但当我登录localhost:3000
并尝试使用tenant@thingsboard.org
/ 登录时tenant
,我收到错误
[Error API proxy error: Error connect ECONNREFUSED 127.0.0.1:8080]
Run Code Online (Sandbox Code Playgroud)
我已经三次检查我没有打字错误.
我错过了一步吗?
我没有使用代理并收到与上面相同的错误:
npm config set proxy null
npm config set https-proxy null npm config
npm config set registry http://registry.npmjs.org/
cat~/.npmrc:
proxy=null
https-proxy=null
registry=http://registry.npmjs.org/ls
我在 windows10 上安装 thingsboard 我使用此网站“ https://thingsboard.io/docs/user-guide/install/windows/ ”进行安装。\n我想做这个项目“ https://www.hackster.io/thingsboard /温度仪表板使用-arduino-uno-esp8266-and-mqtt-5e26eb “
\n\n安装完成后,登录http://localhost:8080,使用\n登录名:sysadmin@thingsboard.org 密码:sysadmin 我想添加设备,但没有 \xe2\x80\x9cDevices\xe2\x80\x9d 部分。
\n我应该怎么做才能从 Thingsboard 中正确删除“事件”条目?
据我所知,当前的 API 没有提供删除事件的方法。似乎唯一的方法是直接删除数据库中的记录。
顺便说一下,我使用 PostgreSQL 作为数据库。
我正在使用 Thingsboard CE 和 PostgreSQL 开发传感器监控应用程序。
Contex:我们每秒收集数据,以便我们可以实时查看传感器测量结果。然而,这对存储来说非常详尽,并且除了启用实时监控之外不构成其他要求。例如,不需要以这样的粒度(1秒间隔)检查上周进行的测量,因此不需要保留如此大量的数据占用资源。当查询前几天的值的历史记录时,每 5 分钟的平均值就完全可以了。
问题:这就提出了如何从数据库中删除现有行,同时聚合要删除的数据并插入新行以对给定时间间隔内删除的数据进行平均的问题。例如,我想保留当天的原始数据(每秒测量一次)和当月的汇总数据(每 5 分钟平均一次)等。解决此问题的最佳行动方案是什么?
我检查了 PostgreSQL 是否有类似此功能的东西,但没有找到任何东西。我的主要想法是使用 cron 作业定期执行从原始数据到聚合数据的聚合/删除。有人能想到更好的选择吗?我非常欢迎任何建议和意见。
更新:我最终使用了pg_cron一个简单的基于 cron 的 PostgreSQL 作业调度程序。非常有用且易于使用,性能符合预期!
我正在尝试在 ThingsBoard 实例中实现自定义 OAuth2 实现,因为我已经在 php 中实现了 OAuth2 服务器
https://github.com/bshaffer/oauth2-demo-php
http://brentertainment.com/oauth2/
按照他们的 bshaffer 演示,它工作正常,当我将它与第三方应用程序 thingboard 实例集成时,第一步工作正常,直到身份验证,然后它重定向到登录页面,指出 Oauth2 错误,但不知道它是什么,这里是示例OAuth2 服务器的 URL 和响应
http://34.226.xxx.xx/oauth2/web/lockdin/authorize
http://34.226.xxx.xx/oauth2/web/lockdin/token
http://34.226.xxx.xx/oauth2/web/lockdin/resource
步骤1:
第2步:
授权发生后,成功响应会发送回
在此之后它失败了
我已经测试了此后手动生成令牌的步骤及其工作正常
http://34.226.xxx.xx/oauth2/web/lockdin/token它给了我回应
{
"access_token": "4a01f8b9e8548420425c8f335eda2a3dbde7ef75",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "email",
"refresh_token": "ccbb9b8a03949e0e013acdb7f8e79426aa1a0a58"
}
Run Code Online (Sandbox Code Playgroud)
和资源 api 我得到以下响应
{
"email":"test@gmail.com",
"firstName":"Dave",
"lastName":"Johnson",
"profile":1828838378
}
Run Code Online (Sandbox Code Playgroud)
对此的任何帮助将非常感激
编辑:请找到终点的来源
授权.php
namespace OAuth2Demo\Server\Controllers;
use Silex\Application;
class Authorize
{
public static function addRoutes($routing)
{
$routing->get('/authorize', array(new self(), 'authorize'))->bind('authorize');
$routing->post('/authorize', array(new self(), 'authorizeFormSubmit'))->bind('authorize_post');
}
public …
Run Code Online (Sandbox Code Playgroud) 试图让ThingsBoard在谷歌云上运行。
我现在看到以下错误:
同步期间出错:运行负载均衡器同步例程时出错:loadbalancer thingsboard-tb-ingress--013d7ab9087175d7 不存在:CreateUrlMap:googleapi:错误 400:字段“资源”的无效值:“{“名称”:“k8s-um- Thingsboard-tb-ingress--013d7ab9087175d7", "hostRule": [{ "host": ["*"], "...'。路径模式无效,无效
kubectl describe ingress 给了我以下信息:
Name: tb-ingress
Namespace: thingsboard
Address:
Default backend: default-http-backend:80 (10.52.0.5:8080)
Rules:
Host Path Backends
---- ---- --------
*
/api/v1/.* tb-http-transport:http (<none>)
/static/rulenode/.* tb-node:http (<none>)
/static/.* tb-web-ui:http (<none>)
/index.html.* tb-web-ui:http (<none>)
/ tb-web-ui:http (<none>)
/.* tb-node:http (<none>)
Annotations:
kubectl.kubernetes.io/last-applied-configuration: {"apiVersion":"extensions/v1beta1","kind":"Ingress","metadata":{"annotations":{"nginx.ingress.kubernetes.io/proxy-read-timeout":"3600","nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.ingress.kubernetes.io/use-regex":"true"},"name":"tb-ingress","namespace":"thingsboard"},"spec":{"rules":[{"http":{"paths":[{"backend":{"serviceName":"tb-http-transport","servicePort":"http"},"path":"/api/v1/.*"},{"backend":{"serviceName":"tb-node","servicePort":"http"},"path":"/static/rulenode/.*"},{"backend":{"serviceName":"tb-web-ui","servicePort":"http"},"path":"/static/.*"},{"backend":{"serviceName":"tb-web-ui","servicePort":"http"},"path":"/index.html.*"},{"backend":{"serviceName":"tb-web-ui","servicePort":"http"},"path":"/"},{"backend":{"serviceName":"tb-node","servicePort":"http"},"path":"/.*"}]}}]}}
nginx.ingress.kubernetes.io/proxy-read-timeout: 3600
nginx.ingress.kubernetes.io/ssl-redirect: false
nginx.ingress.kubernetes.io/use-regex: true
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning Sync 3m (x28 over 1h) loadbalancer-controller …
Run Code Online (Sandbox Code Playgroud) 我知道如何从客户端访问属性,但我想从 thingsboard 服务器端访问设备的属性。因此,在开发新的小部件时,我可以显示所有属性的列表,并在必要时更改它们。我怎样才能做到这一点?
我正在尝试验证由 ThingsBoard 发布的 JWT。但验证失败Signature verification failed
我的测试代码在下面。
def test_jwt_decoding():
jwt_options = {
'verify_signature': True,
'verify_exp': True,
'verify_nbf': False,
'verify_iat': True,
'verify_aud': False
}
token = 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbkB0LW1vbmV0LmNvbSIsInNjb3BlcyI6WyJURU5BTlRfQURNSU4iXSwidXNlcklkIjoiODNiYmEzNDAtMDI3ZC0xMWU4LWI4ZmEtYWY1YjU0OTEyMDA0IiwiZmlyc3ROYW1lIjoi7ISx64Ko7IucIiwibGFzdE5hbWUiOiLqtIDrpqzsnpAiLCJlbmFibGVkIjp0cnVlLCJpc1B1YmxpYyI6ZmFsc2UsInRlbmFudElkIjoiMzkwMTNjNzAtMDI3ZC0xMWU4LWI4ZmEtYWY1YjU0OTEyMDA0IiwiY3VzdG9tZXJJZCI6IjEzODE0MDAwLTFkZDItMTFiMi04MDgwLTgwODA4MDgwODA4MCIsImlzcyI6InRoaW5nc2JvYXJkLmlvIiwiaWF0IjoxNTM1OTU1NDE2LCJleHAiOjM2NzU5NTU0MTZ9.N1Ms0LA7WtOel1pg6lTMRNDJosY3qfR6Q4SVuAUwmDPmTj4uYnKU0B-9Wdlqmg4HQRUXa23edOTU-TnAxfBoyg'
try:
jwt.decode(
token,
'thingsboardDefaultSigningKey',
algorithms=['HS512'],
options=jwt_options
)
assert True
except Exception as err:
print(str(err))
assert False
Run Code Online (Sandbox Code Playgroud)
我检查了在 jwt.io 上验证了签名,唯一的区别是jwt.io 上的秘密 base64 编码
我在猜测base64 编码的秘密会产生这种差异。
我该怎么做?
模板标签内容的重复项不是空的- Angular 中的一个错误,而我的问题是关于 Vanilla Js 的。
我正在开发ThingsBoard小部件。在HTML 选项卡中,我有这个简单的模板:
<template id="myTemplate">
<div>Test</div>
</template>
Run Code Online (Sandbox Code Playgroud)
在 JS 选项卡中,我尝试获取此模板的内容(最终克隆它):
const template = document.querySelector("#myTemplate");
console.log(template.content);
Run Code Online (Sandbox Code Playgroud)
但是,我得到一个空的 DocumentFrgament
:
这很奇怪,因为当我在 ThingsBoard 之外运行它时(例如在 StackOverflow 代码片段上),我确实获得了模板的内容:
<template id="myTemplate">
<div>Test</div>
</template>
Run Code Online (Sandbox Code Playgroud)
const template = document.querySelector("#myTemplate");
console.log(template.content);
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
我想生成 Thingsboard 依赖项 jar,我想在我的应用程序中使用它来从我的 java 应用程序调用 Thingsboard API。
要使用 Thingsboard 依赖项 jar,我必须构建应用程序,因为这些 jar 在公共存储库中不可用。
我正在尝试从源代码构建 ThingsBoard 应用程序,我按照链接中提到的说明进行操作 - https://thingsboard.io/docs/user-guide/install/building-from-source/
我克隆了 ThingsBoard 报告,然后签出“release-1.4”分支并运行 mvn clean install 命令。
应用程序构建失败并出现以下错误。
[INFO] Installing npm version 3.10.8
[INFO] Unpacking /var/root/.m2/repository/com/github/eirslett/npm/3.10.8/npm-3.10.8.tar.gz into /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui/target/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.0:npm (npm install) @ ui ---
[INFO] Running 'npm install' in /Users/admin/workspaces/IOT/ThingsBoard/source/thingsboard/ui
[WARNING] npm WARN deprecated angular-ui-router@0.3.2: This npm package 'angular-ui-router' has been renamed to '@uirouter/angularjs'. Please update your package.json. See https://ui-router.github.io/blog/uirouter-scoped-packages/
[ERROR] npm ERR! git …
Run Code Online (Sandbox Code Playgroud) thingsboard ×11
maven ×2
attributes ×1
html ×1
javascript ×1
jwt ×1
kubernetes ×1
node.js ×1
npm ×1
oauth-2.0 ×1
php ×1
postgresql ×1
pyjwt ×1
python ×1