i’m looking for detailed instructions on how to setup mqtt broker on azure to intake data from Flexy205. Also, i’m looking for configuration details for the flexy 205 with mqtt client. I have gathered bits and pieces on how to accomplish this, but is there a step by step for both Azure and Flexy configurations? I would like to deploy mqtt on my flexy 205s so that I can run the data acquisition over cell connection rather than the oil rig wifi where the devices are. Any whole documentation will be much appreciated.
Have you seen this thread on using BASIC:
This one uses a Java connector:
I will check both out and see where that lands for me. Thank you!
Let us know if you have any questions. I know the process changes for the Azure part occasionally, so we don’t have a static How To Document, but I’m going to try to put one together soon.
Does MQTT reduce the amount of data transmitted? The reason I am looking at MQTT is because I am streaming in real-time over a cell connection and the data consumption is really high. My understanding is that implementing MQTT will significantly reduce the data size. My Flexy 205s are updating every 5seconds currently over cell connection.
Yes, MQTT is a very lightweight protocol, so it’s an excellent choice if you are trying to conserve bandwidth and data!
Just so i’m clear. Setting up MQTT won’t cause an issue with M2WebAPI? Also, MQTT needs a broker,correct? You can’t have MQTT configured with M2Web without a broker?
MQTT is independent of and will not cause issues with the M2Web API.
Yes, you will need a broker to use MQTT.
Ok got it.
I have the .pem .crt .key uploaded to my flexy /usr.
The basic script running in the init section.
DeviceId$ = Azure IOT Device Name
IotHubName$ = Azure My IOT Hub Name.
The script is running. Are there any other parameters in the Basic script that I need to change to get it to publish to IOT Hub?
Yes, there are examples of a working script in this thread:
Good Deal. Thank you for the quick response
after implimenting MQTT the data usage hasn’t really going down. I implemented the script around 1pm central time US and shut the connection down around 7pm central time US. In that time I was connecting and disconnecting to the Flexy 205 with ecatcher on my desktop then mobile when I was away. Is connecting the vpn with ecatcher desktop and mobile causing the spikes in data consumption because of Keep alive or do I need to change some settings after implementing MQTT? I was connected with VPN the entire time MQTT was going. Also, I have 5 tags and used the Basic script that was suggested. Here is a screen shot of my data usage in that time.
The amount of data MQTT uses will be based on the number of tags and the frequency they are updated. If you are connecting to the device through the VPN or eCatcher mobile, that’s also going to use data. You could run a packet capture with wireshark to find out exactly how much each is using if you wanted to.
Can you link to documentation on how to run wire shark to capture packet size? I have wire shark and Talk2M-e-catcher is in the list of things capture. Just want to make sure i’m tracking correctly.
No, that documentation would be on wireshark’s website. We just need to determine which are MQTT which should be going over WAN if I’m not mistaken, so we could sort by destination. Can you share the pcap file?
I have both cell modem and wifi. Wifi form primary comms & cell for fallback. Does this matter? I will shake the Pcap file when I open the cell connection this evening.
WiFi will be more traffic to sort thru but it’s no problem. It will be interesting to look at but I’d also measure the bandwidth with only the MQTT running.
I have a YouTube channel here https://www.youtube.com/channel/UCX7jUdo-nxnyeY47up5jusw . I assume the code on these forums is fine to post, but I wanted to check. I’d like to do a video on how to implement MQTT with azure on the Flexy 205. Are y’all cool with that?
That’s great! I’ll check it out!
You can use any code that we’ve posted on the public forum or in the documentation. Please keep me posted and let me know if you have any questions or if there’s anything else we can help with.
Also, if you wanted to get any videos “officially HMS-approved” I could look at having our marketing team sign off - I’ll CC Sarah Hardman, our Marketing Project Manager in Chicago who could take care of that.