Hi team, sorry if this is a doom question but I wasn’t able to answer it myself by reading the forum.
I’m trying to find out if Streamsheets could be the platform of choice to achieve the following:
I develop mobile Apps (iOS and Android) using a high level programming platform named Livecode (www.livecode.com) by which I can send Post request to any given URL
My App should interact (send commands and read responses) with a Mosquitto server running on Linux
Would it be possible? If answer is yes what kind of environment should I have available, is there any tutorial I can follow?
Sorry for the long wait, we had a DNS change and this took us sometime.
This is totally possible.
Streamsheets comes with the Mosquitto broker preinstalled, so you can use it locally.
We use docker as the environment to run everything in.
If I understand you correctly, you will need an HTTP Server to interact with.Streamsheets can be a HTTP Server, but this is a premium feature. If you already have a Server to send your commands to, Streamsheet could interact with this server and build the bridge between HTTP/REST data and MQTT data.
Here we show how to use HTTP/REST:
Here we show how to connect to an MQTT Stream:
And here how to work with Inbox messages:
If you connect all these 3 together you should be able to manage your Use Case
Have fun and let me know if you have any further questions.
Hi Tizian, many thanks for your answer. I guess I didn’t make myself clear. Instead of an HTTP Server I would need and HTTP client (could be a browser) to send requests to a Mosquitto server and read back the responses. I was thinking about using Streamsheets as the middle man between the two environments…
Hope is more clear now.
I’m not quite sure what you mean. Mosquitto has very very basic webserver capability through the websockets library, but it only supports static pages. I don’t think that’s what you mean. The only useful thing you can to talk to Mosquitto with is MQTT, either over straight TCP or over websockets (which originates as an HTTP connection, but is quickly upgraded).
Could you give us a few more details on what the use case looks like?
Hi Roger, many thanks for you answer and sorry for not being clear (english is not my native tongue) . I’ll try again…
I develop mobile Apps (iOS and Android) using this high level development tool called Livecode (www.livecode.com) which doesn’t have native support to communicate with a Mosquitto server.
Since on the other hand I can post to a given URL and/or have a browser running on my own App I though maybe Streamsheet could be used as a bridge between my App and the Mosquitto server I’m trying to reach.
In other words, your app communicates with streamsheets using http/rest. You then have a streamsheet that converts your message into the right format (if needed) and then publishes it to the mqtt broker. Responses from the broker work in the same way, you have a streamsheet that subscribes to the broker and then sends messages back over http/rest in the correct format.
Perfect,
Yes this is possible. The OpenSource version supports webhooks. There is a webhook connector and consumer in your administration.
If you add the consumer to an inbox, you will receive HTTP calls from specified URLs. This way you can post information to Streamsheets and map them into MQTT.