mqtt

how to read MQTT mosquitto server persisted DB file

僤鯓⒐⒋嵵緔 提交于 2019-12-12 02:43:12
问题 I am using mosquitto server for MQTT protocol. Using persistence setting in a configuration file with -c option, I am able to save the data. However the file generated is binary one. How would one be able to read that file? Is there any specific tool available for that? Appreciate your views. Thanks! Amit 回答1: Why do you want to read it? The data is only kept there while messages (QOS1 or QOS2) are in flight to ensure they are not lost in transit while waiting for a response from the

Gsm800 mqtt library

与世无争的帅哥 提交于 2019-12-12 02:33:06
问题 I have sim800 module ,i want to control relay from webserver so i need mqtt library and sample code for arduino uno please help to me,What is AT command for publish and subscribe the tag in sim800 using arduino uno 回答1: I think it is very unlikely that your SIM800 module will have an AT command for MQTT. There are a couple of MQTT libraries for Arduino: AdaFruit: https://github.com/adafruit/Adafruit_MQTT_Library PubSubClient by Nick O'Leary: http://pubsubclient.knolleary.net/ Both of these

PHP MQTT subscribe not consistent

萝らか妹 提交于 2019-12-12 02:15:34
问题 I am trying to display some values using MQTT on a PHP based page. The PHP code contains the subscriber. I am using Bluemix IoT service for the MQTT broker. Also, the messages are published via Python code on local machine. When I try to display values on pages using page refresh, the page sometimes fails to display the values. There is no problem at the publisher end as the values are successfully displayed by Bluemix IoT service. My code is as follows: <?php // include class require(

make mosquitto-auth-plug on windows

拟墨画扇 提交于 2019-12-12 00:15:53
问题 I am currently trying to build the mosquitto-auth-plugin on windows but I am unsure which make process to use. The doc says to edit the config.mk file which I have done, then to 'make' the auth-plug -- this is were I am struck I have tried to make using GnWin & MinGW but neither has worked is there a way to build-make the library on windows or can I make it in Linux and copy the auth-plug.o to my windows machine? 回答1: I'm not aware of anybody having attempted to build mosquitto-auth-plug on

How to publish data in adafruit using MQTT Android?

风格不统一 提交于 2019-12-11 23:43:55
问题 I want to update the toggle switch in adafruit from android app using MQTT, i want to publish as well as subscribe to toggles but after connection through mqtt protocols during publish it shows a error " AlarmPingSender: Unregister alarmreceiver to MqttServicepaho196825347016729 " Android App is properly connecting to adafruit server but when i am trying to publish or subscribing its showing error public class MainActivity extends AppCompatActivity { String TAG="MQTT"; TextView tvview; Button

Mosquitto java broker is showing error: Exception in thread “main” java.lang.RuntimeException: Can't locate the resource “config/moquette.conf”

佐手、 提交于 2019-12-11 23:37:01
问题 I want to experiment ‘mqtt’ protocol. For this I have downloaded necessary file explained in this link http://www.hascode.com/2016/06/playing-around-with-mqtt-and-java-with-moquette-and-eclipse-paho/. Code: import java.io.IOException; import java.util.Arrays; import java.util.List; import io.moquette.interception.AbstractInterceptHandler; import io.moquette.interception.InterceptHandler; import io.moquette.interception.messages.InterceptPublishMessage; import io.moquette.server.Server; import

Does mosquitto_pub convert a binary file to ASCII?

孤者浪人 提交于 2019-12-11 23:32:47
问题 I am quite new to MQTT protocol and I am sorry if my question sounds stupid. I am publishing an image from a device and when I subscribe to it on CLI I can see some characters which are not in the binary format. So my question is when the image is published does it by default get converted to ASCII format and then sent or is it received in the ASCII format or some other format? The publish command I am giving is: mosquitto_pub --cafile /home/pi/nirupama/rootCA.pem --cert /home/pi/nirupama

Azure IoTHub DeviceMessage and route filter

只愿长相守 提交于 2019-12-11 21:47:24
问题 I use python and paho.mqtt for sending messages to cloud I set up endpoint and route. When I set query string to true , everything works fine messageDict = {} systemPropertiesDict = {"contentType": "application/json", "contentEncoding": "utf-8", "iothub-message-source": "deviceMessages", "iothub-enqueuedtime": "2017-05-08T18:55:31.8514657Z"} messageDict = {"systemProperties": systemPropertiesDict} messageDict["appProperties"] = {} body = '{id:1}' messageDict["body"] = body root = {"message"

Azure IoT Hub - Send message (C2D) to one device on 2 topics instead of devicebound/#

醉酒当歌 提交于 2019-12-11 17:59:46
问题 As a MQTT client (device), I am using devices/{deviceid}/messages/devicebound/# topic to receive Cloud to Device messages. This device is a gateway for me and there are 3 devices attached to it. I want to send 3 different commands to 1 gateway on 3 different topics, like devices/{deviceid}/messages/devicebound/device1 devices/{deviceid}/messages/devicebound/device2 devices/{deviceid}/messages/devicebound/device3 My gateway is registered in iot-hub and I use it at {deviceid} . Is it possible?

Dynamically change label text in aspx page without postback or page-load

﹥>﹥吖頭↗ 提交于 2019-12-11 16:54:11
问题 I am currently in the process of creating an asp.net webforms site in c#. My goal with this website is to be able to receive mqtt messages from a mqtt broker that I currently have running, and disply them on a simple website. I currently have the communication up and running and can subscribe and receive messages just as I wish, but my problem is that after receiving the messages in my code-behind, I am not able to dynamically display them in my aspx! I am currently trying to display a value