mqtt

MQTT收到的信息无法导入influxdb处理过程

强颜欢笑 提交于 2020-01-06 17:17:33
从供应商nodered发送的设备数据,要传到MQTT sever,通过telegraf采集到influxdb,死活不成功。连夜研究,发现mqtt接受到的信息格式可能不对。 今天用python详细跟踪message的订阅和发出内容,果然是格式问题,不符合influxdb规范。经Python处理后再发出,问题解决。 iiot很多知识点很新,希望加强学习和大家多互动。 来源: CSDN 作者: 不灭的汉人 链接: https://blog.csdn.net/charliechencn/article/details/103849506

Attempting MQTT connection…failed, rc=-2 try again in 5 seconds

自古美人都是妖i 提交于 2020-01-06 14:31:56
问题 I am trying to establish MQTT communication with my local MQTT server on my pc (node.js, express, Mosca) and Esp8266. esp8286 is not connecting with my server, the error is Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Can't connect to Broker. Here is Node js code: var moscaSettings = { host: '0.0.0.0', port: 1883, http: { port: 8002, host: '0.0.0.0', static: './mqtt/', bundle: true, }, }; var server = new mosca.Server(moscaSettings); // var server = new mosca.Server({ //

Attempting MQTT connection…failed, rc=-2 try again in 5 seconds

核能气质少年 提交于 2020-01-06 14:29:08
问题 I am trying to establish MQTT communication with my local MQTT server on my pc (node.js, express, Mosca) and Esp8266. esp8286 is not connecting with my server, the error is Attempting MQTT connection...failed, rc=-2 try again in 5 seconds Can't connect to Broker. Here is Node js code: var moscaSettings = { host: '0.0.0.0', port: 1883, http: { port: 8002, host: '0.0.0.0', static: './mqtt/', bundle: true, }, }; var server = new mosca.Server(moscaSettings); // var server = new mosca.Server({ //

Facing Error while running mosquitto broker using TLS with mosquitto

时光怂恿深爱的人放手 提交于 2020-01-06 06:30:09
问题 I am trying to use TLS for communicating over mqtt. I have ubuntu installed in my system. For using TLS, I have created certificates using the below link: http://www.embedded101.com/Blogs/PaoloPatierno/entryid/366/mqtt-over-ssl-tls-with-the-m2mqtt-library-and-the-mosquitto-broker I am able to create certificates. I have removed bind_address from config file. I am starting mosquitto with the new config file with mosquitto -c mosquitto_m2mqtt.conf -v . Mosquitto starts, but when I run mosquitto

Is java client of PAHO proxy aware and enables sending of MQTT messages across enterprise proxy to brokers hosted in the internet?

六月ゝ 毕业季﹏ 提交于 2020-01-06 06:06:33
问题 Organization provides http proxy and https proxy. If not within enterprise network successfully establishing a secure connection (ssl://brokerhost:brokerport) 1.Passing relevant keystore and truststore 2.Setting default instance of SSLSocketFactory in MqttConnectOptions. 回答1: No, for native MQTT there is no way to use a HTTP/HTTPS proxy. You can not use a HTTP proxy to transport an arbitrary TCP based protocol. You need something like SOCKS (ssh can be used to to setup socks proxies or to do

I added it when I made the project. AndroidX Artifact has not been mqt communication since then. What is the problem?

前提是你 提交于 2020-01-06 05:17:14
问题 I added it when I made the project. AndroidX Artifact(checkBox) has not been mqt communication since then. What is the problem? Androidx is used to use BiometricPrompt. Below is my mqtt code.↓ private lateinit var mqttAndroidClient: MqttAndroidClient val CLINET_ID: String = MqttClient.generateClientId() fun connect(applicationContext : Context) { val context: Context = applicationContext mqttAndroidClient = MqttAndroidClient ( context.applicationContext,"tcp://13.124.231.98:1883", CLINET_ID )

Mosquitto configuration not accepting listener containing IP address

主宰稳场 提交于 2020-01-05 06:39:10
问题 I have Mosquitto running on a local server, and my aim is to have 3 listeners: all local network clients to connect without TLS on port 1883 (port 1883 is closed by router to public) External clients to connect using TLS on port 8883 External client to connect without TLS on port 8880 which using this config works fine; # Local MQTT listener 1883 # End Local MQTT # Insecure MQTT listener 8880 # End Insecure MQTT # Secure MQTT listener 8883 ## This is standard and should always be this cafile

IBM Bluemix disconnecting the MqttAndroidClient after sometime

不想你离开。 提交于 2020-01-05 03:38:51
问题 I am working on CC2650 sensortag and Bluemix(using IOT starter boilerplate) as a cloud solution. The cc2650 android app uses MqttAndroidClient to connect to MQTT server provided by bluemix. The problem I am facing after sometime (around 7 mins) it get timedout. Following exception is visible on the android studio console d:2f7tpk:ti-sensortag2:B0B448C07886: Timed out as no activity, keepAlive=240,000 lastOutboundActivity=1,463,309,545,312 lastInboundActivity=1,463,309,275,609 time=1,463,309

How do I write tests for an MQTT client?

天大地大妈咪最大 提交于 2020-01-04 07:25:12
问题 I'm new to MQTT and testing and am unsure how the two should work together. I'm using mqtt.js and want to write some basic tests. How should I structure them? More specifically, do I need to mock the MQTT broker, or can I make a live connection? Should that connection be to a test service like HiveMQ, etc, or to the broker I'm setting up myself? My setup: I'm building a chat application. 3 docker containers. 1 broker (using mosquitto, 2 clients. Clients are using mqtt.js within a script that

apicloud 实现长连接

∥☆過路亽.° 提交于 2020-01-04 02:11:42
在制作app的时候,很多时候需要服务端推送消息给app。现在针对apicloud开放梳理几种解决方案 1.ajax轮询 ajax轮询的原理非常简单,让app隔个几秒就发送一次请求,询问服务器是否有新信息。但是轮训一般及时性比较差,而且网络消耗与电量销毁比较多,因此一般推送功能都是通过长连接实现的 场景再现: 客户端:啦啦啦,有没有新信息(Request) 服务端:没有(Response) 客户端:啦啦啦,有没有新信息(Request) 服务端:没有。。(Response) 客户端:啦啦啦,有没有新信息(Request) 服务端:你好烦啊,没有啊。。(Response) 客户端:啦啦啦,有没有新消息(Request) 服务端:好啦好啦,有啦给你。(Response) 客户端:啦啦啦,有没有新消息(Request) 服务端:。。。。。没。。。。没。。。没有(Response) —- loop 2.使用第三方推送服务 apicloud的push模块 官方也有自己开放的推送模块,亲测有效。 不懂的话可以看 https://docs.apicloud.com/Dev-Guide/push-guide 如果出现 push.setListener无效 可以看 https://community.apicloud.com/bbs/thread-112988-1-1.html 还有极光、融云可以选择