(DIR) Return Create A Forum - Home --------------------------------------------------------- mc-Things (HTM) https://mcthings.createaforum.com --------------------------------------------------------- ***************************************************** (DIR) Return to: MQTT ***************************************************** #Post#: 2049-------------------------------------------------- Setting up MQTT on pi and gateway By: guest135 Date: June 28, 2017, 7:03 pm --------------------------------------------------------- Hello, Let me explain my situation first, I've already successfully sent data to the losant web server using mqtt via the gateway with data from a mcModule 120 (it was very simple with great documentation), now my boss wants me to figure out how to send the same data to AWS,but from what I've found I can't directly publish the data due to the IOT certifications that AWS needs to accept data. I saw that you can use a pi as a "middleman" so to speak to receive the data from the gateway then publish it to AWS. I've installed mosquitto and the client runs ok (v3.1) on the pi but I do not know how to properly configure the gateway for this or what part of my code I should modify to make this work. So has anyone been able to successfully do something similar or am I missing something obvious?. Current code: (HTM) https://github.com/Bernstern/Safe-In-Home/blob/master/Safe_In_Home.mcScript #Post#: 2050-------------------------------------------------- Re: Setting up MQTT on pi and gateway By: mc-John Date: June 30, 2017, 10:00 am --------------------------------------------------------- I don't know anybody that uses a middle man on a pi. Maybe you should look into moving your data to CloudMQTT (powered by AWS) and move it from there. #Post#: 2051-------------------------------------------------- Re: Setting up MQTT on pi and gateway By: mc-T2 Date: July 4, 2017, 2:00 pm --------------------------------------------------------- There were a couple of users that were discussing using Pi's as middle men - not sure the status of this. Anyone out there that has done this that can help Bernstein? As mcJohn mentioned, you can also forward the information to a service like CloudMQTT as an option. They do have a free tier and there are other ones out there as well. To help, you can check out this video that walks-through setting up CloudMQTT as a service. On this video we subscribe to the topic on an Android phone to view the data so not quite what you are looking to do but hopefully it helps a bit (CloudMQTT stuff starts around the 0:50 mark) (HTM) https://youtu.be/WfkQmg5P-3k #Post#: 2059-------------------------------------------------- Re: Setting up MQTT on pi and gateway By: bdevlin Date: July 8, 2017, 1:55 pm --------------------------------------------------------- I'm using a pi to rebuild my temp capture platform, IFTTT just plain quit after the 0.9.xxx mc upgrades. Other than my issues posted elsewhere here, I am sending 'JSON" equivalent 'ListOfByte' successfully to my pi. My plan is to use python libraries to captures the subscriptions and push them into PostgreSQL. It's all on my pi with a 128GB SSD. You might consider a middleman to push the data directly to a cloud hosted DB VS a cloud MQTT host and then to a DB. *****************************************************