mqtt

Why use MQTT Node.JS library?

天大地大妈咪最大 提交于 2019-12-10 15:34:29
问题 I am currently building a web app using the Paho MQTT Javascript library, and I was wondering in what case should I use the MQTT.JS library ? Could you give me examples when I cannot use the Javascript library and need to use the MQTT.js library (which I think is made for Node.js) ? (I know the two things are completely different but still, they both concern web applications!) Thank you ! 回答1: The Paho JavaScript client is specifically targeted for use in client side (in the browser) and uses

Can't run my MQTT application on Android Studio

六眼飞鱼酱① 提交于 2019-12-10 12:24:47
问题 i'm testing a personal MQTT application but it failed when i click on the connect button... There is an exception but i don't know where it comes from. Here is my code MainActivity.java : package com.application.phoste.homecontrol; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends

The appropriate value of max_packets for MQTT loop function

落爺英雄遲暮 提交于 2019-12-10 12:04:50
问题 I have this code that should run indefinitely, however, it doesn't. It keeps on stopping every few hours from the client's side (stop publishing, the loop keeps on running, but nothing is received at the broker), and the only thing that can be done is to rerun it again. I was advised here to increase the number of max_packets for the loop function, but it's not working and the client stops publishing randomly without continuing. What should be done? I tried the values of 1, 3, 5, 50 and a

Python (Flask) and MQTT listening

萝らか妹 提交于 2019-12-10 11:54:38
问题 I'm currently trying to get my Python (Flask) webserver to display what my MQTT script is doing. The MQTT script, In essence, it's subscribed to a topic and I would really like to categorize the info it gets and display/update it in real time. Something like a simple list displaying various the settings that gets updated regularly. Setting1 = 9 Setting2 = 2 Setting3 = 5 To begin with, I have a connect to page, so that you can fill-in an IP to which the Python (Flask) should connect to: @app

mqtt on Laravel with PHP

▼魔方 西西 提交于 2019-12-10 11:53:06
问题 I'm using the MQTT on my raspberry and on my Ubuntu. I use terminal for start subscriber and publisher and it works so good. But now I want to create a website (using laravel) with this features. I googled it, but I don't find anything interesting. Is it possible to do and how? 回答1: Unlike with HTTP, MQTT is typically used by opening a long-running connection between an application process and a MQTT server. While it is perfectly possible to open a connection, publish a single message and

【物联网开发】基于STM32的端到端物联网全栈开发

我怕爱的太早我们不能终老 提交于 2019-12-10 08:08:23
详细课程链接: 【物联网开发】基于STM32的端到端物联网全栈开发 物联网平台是阿里云针对物联网领域开发人员推出的一款设备管理平台。高性能IoT Hub实现设备与云端稳定通信,全球多节点部署有效降低通信延时,多重防护能力保障设备云端安全。此外,物联网平台还提供丰富的设备管理功能、稳定可靠的数据存储能力,以及规则引擎。使用规则引擎,您仅需在Web上配置简单规则,即可将设备数据转发至阿里云其他产品,获得数据采集、数据计算、数据存储的全栈服务,真正实现物联网应用的灵活快速搭建。 物联网平台是阿里云专门为物联网领域的开发人员推出的,其目的是帮助开发者搭建安全性能强大的数据通道,方便终端(如传感器、执行器、嵌入式设备或智能家电等等)和云端的双向通信。 课时介绍: 课程指南 阿里云物联网平台简介 阿里云物联网平台基础概念讲解 STM32节点端及开发环境介绍 Paho MQTT客户端接入阿里云物联网平台 LinkKit SDK接入阿里云物联网平台 服务端软件架构介绍 后端服务开发 前端服务开发 更多精品课程: 阿里云大学官网( 阿里云大学 - 官方网站,云生态下的创新人才工场 ) 来源: oschina 链接: https://my.oschina.net/u/3637633/blog/3043534

各大云平台物联网相关产品对比分析

為{幸葍}努か 提交于 2019-12-10 07:32:19
概述 本文主要对阿里云、腾讯云、百度云和华为云提供的相关物联网产品进行对比,用于分析各大云平台在物联网方面的布局和实现。 硬件开发及组网 对比项 阿里云 腾讯云 百度云 华为云 嵌入式OS 提供AliOS Things嵌入式系统。 无 无 Huawei LiteOS 轻量级物联网操作系统。 设备组网 提供物联网络管理平台 ,使用LoRaWAN协议。 提供LPWA 物联网络产品,支持 LoRaWAN/CLAA(China LoRa Application Alliance)标准协议。 无 无 边缘计算 对比项 阿里云 腾讯云(无边缘计算产品) 百度云 华为云 设备接入 设备接入是Link IoT Edge提供的基础能力,设备接入模块在Link IoT Edge中称为驱动(driver)或设备接入驱动。所有连接到Link IoT Edge的设备都需要通过驱动实现接入。不限制通信协议,但需开发对应驱动,在驱动程序中转换为阿里云Iot物模型的数据格式。 - MQTT协议 支持MQTT协议、modbus协议和OPC-UA协议等接入。 数据处理 边缘计算节点提供流数据分析、函数计算引擎,方便场景编排和业务扩展。 - 提供本地函数计算模块,基于MQTT消息机制。 支持流处理云端管理,边缘侧运行,提供实时流处理能力。 数据流转 提供消息路由功能,可实现:<br>设备至IoT Hub;<br

qt mqtt相关资料

雨燕双飞 提交于 2019-12-10 07:25:42
qt官方代码仓库: https://code.qt.io/cgit/ https://codereview.qt-project.org/admin/repos/qt%2Fqtmqtt 1.靠谱的编译方法; https://blog.csdn.net/qq21497936/article/details/91463870 2.demo靠谱可运行的addr: https://www.cnblogs.com/yexiaopeng/p/8542894.html 3.qt官方示例 https://doc-snapshots.qt.io/qtmqtt/index.html#examples 4.本地mqttserver搭建 https://blog.csdn.net/weixin_41572450/article/details/82558774 来源: CSDN 作者: 小岗哥哥 链接: https://blog.csdn.net/ganggegel/article/details/103463097

Mosquitto感知客户端上下线的方法

房东的猫 提交于 2019-12-10 04:20:51
国内最活跃的Mosquitto沟通社区,关于MQTT、Mosquitto、IM、推送系统、物联网、高并发处理等技术。 需要让设备上mqtt客户端配合来完成。 1、怎么知道设备下线? 异常断线(Mosquitto没有收到MQTT 的DISCONNECT报文)时,使用遗嘱机制,mqtt客户端在建立mqtt连接的时候,设置遗嘱(向什么topic发送什么数据):当前这个tcp连接断开的时候,Mosquitto自动按照遗嘱设置发送消息,这时利用这个机制,topic应用设定好,例如:iot/status/onoffline;所设置的遗嘱消息内容就是一个JSON字符串,里面包含当前连接的ID等信息,上线状态,例如: {"id":11232232432,//这个id就是当前设备的ID "status":"offline"//表示这是一个设备下线的通知; } 这样这个连接断开的时候(无论正常还是异常)谁订阅了这个topic就能收到这个消息. 正常断线(mqtt客户端主动发送了DISCONNECT报文)时,客户端要在发送DISCONNECT报文之前(及调用paho包的disconnect接口之前)主动向上下线topic发布一条设备下线的消息。 2、怎么知道设备上线? mqtt客户端在建立mqtt连接之后,无条件向某个topic(例如:iot/status/onoffline)发送一个消息

MQTT Server搭建(apache-apollo)和MQtt Client搭建

戏子无情 提交于 2019-12-10 02:51:07
目标   本文就MQTT server和client搭建做以下总结,方便测试及开发使用,能基于MQTT软件发送和接收消息。 介绍   MQTT是基于tcp的消息发送,目前JAVA方面有两种实现,分别是mqtt-fuse和mqtt-paho,优点或者适用性自行研究。 Mqtt-Sever搭建   mqtt-server支持win/linux等系统的安装,下文基于linux进行说明。 1.下载安装包   在官网上下载apache-apollo-1.7.1-unix-distro.tar.gz,上传并解压到指定目录下。   解压后如下图所示。 2.创建实例   进入到bin目录中,执行:./apollo create mybroker,创建成功后如下图。 实例默认创建到bin目录下,如下图 3.修改对外Ip 进入到如上截图中的etc目录中,修改 apollo.xml的   <web_admin bind="http://127.0.0.1:61680"/>   <web_admin bind="https://127.0.0.1:61681"/>将其改成0.0.0.0 4.启动 进入到上截图的bin中,执行:./apollo-broker run,注意:每个实例 需要单独启动,成功如下所示   启动后,我们发现可以通过http://127.0.0.1:61680访问web页面