ThingsBoard + Raspberry Pi + Thingy52

ThingsBoard + Raspberry Pi + Thingy52

Gateway

https://thingsboard.io/docs/iot-gateway/install/rpi/

host :"IP"

accessToken: "token"

remoteConfiguration: true

Delete extentions

 

sudo chown thingsboard:thingsboard tb-gateway.yml

http://www.treselle.com/blog/thingsboard-gateway-iot/

 

======================

================

In raspberry Pi, tb-gateway:

/etc/mosquitto: mosquitto.conf

        port 8883

/etc/tb-gateway/conf: tb-gateway.yml

        mqtt:

          enabled: true

            configuration: mqtt-config.json

/etc/tb-gateway/conf: mqtt-config.json

                            port: 8883

 

In Thingsboard server:

/etc/mosquitto: mosquitto.conf

        port 8883

/etc/thingsboard/conf: thingsboard.yml

                         mqtt, port 1883

In upload mqtt example json file:

                         mqtt, port: 8883

 

Command in Gateway:

 mosquitto_pub -h localhost -p 8883 -t "sensors" -m '{"serialNumber":"SN-001", "model":"T1000", "temperature":36.6}'

 产生公钥密钥:https://blog.csdn.net/ustccw/article/details/76905459#t8

sudo tcpdump -nvX src net *.*.*.* and dst net *.*.*.* 查 traffic

 

================Cassandra==================

installation: http://cassandra.apache.org/download/

 

https://f.ruuvi.com/t/integrating-ruuvitag-with-thingsboard-iot-platform/505/7

 

Configure Cassandra as main data storage: https://thingsboard.io/docs/user-guide/install/linux/#optional-configure-thingsboard-to-use-the-external-database

 

sudo service thingsboard restart

csqlsh < describe keyspaces;

csqlsh < select * from system_schema.tables where keyspace_name = 'thingsboard';

csqlsh < use thingsboard;

csqlsh < select * from ts_kv_cf;

 

===============Thingy52 node.js mqtt===============

 Add certificate:

https://gist.github.com/pcan/e384fcad2a83e3ce20f9a4c33f4a13ae

================ Implement mqtt over SSL in thingsboard =============

https://thingsboard.io/docs/user-guide/mqtt-over-ssl/

https://thingsboard.io/docs/user-guide/certificates/

 第三方嗅探 sniffing:

Arpspoof -i eth0 -t 172.19.80.83 (Pi, Gateway) 172.19.80.25 (sat-iot, Server): This command is used to let the network traffic between the gateway and the server can also go through the third server (sat-asset)

Sudo tcpdump -i eth0 -s 0 -XX -vv dst port 1883 and dst host 172.19.80.25

 SSl/TLS 协议运行概述:

http://www.ruanyifeng.com/blog/2014/02/ssl_tls.html

 双向ssl验证如下:
https://thingsboard.io/docs/user-guide/certificates/

 
posted on 2018-05-16 15:43 攻城狮科学家 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/dataclimber/p/9046332.html

你可能感兴趣的:(ThingsBoard + Raspberry Pi + Thingy52)