描述该指导文档的场景,比如“员工首次配置打印机”。
https://blog.csdn.net/qq_36515349/article/details/107064006
将使用来自本地PC的MQTT、CoAP或HTTP协议来传递数据
官方步骤
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"出现问题:
Failed to connect to raw.githubusercontent.com port 443: Connection refused解决方案:
用浏览器打开
保存到本地为install.sh,cd到下载目录,并更改权限:
chmod 777 install.sh把install.sh拖入终端,或者在终端直接执行
install.sh输出:
==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew /usr/local/Homebrew ...出现问题:
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54 fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core` exited with 128. Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.解决方案:
执行如下命令:
git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1clone结束后再重新执行:
install.sh执行如下命令:
brew install mosquitto创建一个文件夹存放需要的数据文件如下:
attributes-data.json - 包含两个设备属性值:固件版本和序列号。 {"firmware_version":"1.0.1", "serial_number":"SN-001"} telemetry-data.json - 包含三个时间序列值:temperature, humidity and active flag。 {"firmware_version":"1.0.1", "serial_number":"SN-001"}下载mosquitto.sh创建的文件夹中,并更改权限
chmod +x mosquitto.sh打开mosquitto.sh并更改内容
# Set ThingsBoard host to "demo.thingsboard.io" or "localhost" THINGSBOARD_HOST=localhost # Replace YOUR_ACCESS_TOKEN with one from Device details panel. ACCESS_TOKEN=A1_TEST_TOKENACCESS_TOKEN的值来自于设备中某一设备的设备凭据