Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mobile APP + other IOT
#1
Hello
Is it possible to connect the application to another IoT cloud? I mean exactly Thinger.io
I would like to read some thermometers, relays and charts.

Thank You
Reply
#2
Hi, 
yes of course. The app supports any MQTT broker and HTTP api
Too many users use the Thinger.io platform with Virtuino
Reply
#3
This is very good news
Can you help me configure the connection and reading data from the HTML API?
I have a token and API addresses, but I don't know whether it should be in the server or widget settings.
Thank you very much!
Reply
#4
Hi, 
for an Http Api connection the only you have to do is to add the script "Http Request".
Go to the "Scripts & Tools". Select "Http Request".
Then configute the Http request and test it.
Store the request result to an Emulator Variable.
Add a "Value display" to display the variable to the screen.
Reply
#5
(06-05-2024, 07:33 PM)iliaslamprou Wrote: Hi, 
for an Http Api connection the only you have to do is to add the script "Http Request".
Go to the "Scripts & Tools". Select "Http Request".
Then configute the Http request and test it.
Store the request result to an Emulator Variable.
Add a "Value display" to display the variable to the screen.

Thank you very much for help.
I have a url and I have a token.
I need to provide authorization. Am I doing this in the header?
key = token
value = ?

please help Smile
Thank you very much


Attached Files Thumbnail(s)
   
Reply
#6
Hi,
I think you have to enter the token and the value to the "params".
You have to check the Documentation API of the HTTP server.
This is an example of the Thingspeak platform
https://www.mathworks.com/help/thingspeak/readdata.html
Reply
#7
Hi
The problem is lack of authorization. Exactly the same as pasting the api address and not confirming it
"{"error":{"message":"unauthorized"}}"

The ability to read it in HTML is very simple

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Reading data from API</title>
</head>
<body>
    <h1>API</h1>
    <div id="data-container">
        <p>Loading...</p>
    </div>

    <script>
        document.addEventListener("DOMContentLoaded", function() {
            const url = "https://backend.thinger.io/v3/users/.....";
            const token = "eyJhbGci...........";

            fetch(url, {
                method: 'GET',
                headers: {
                    'Authorization': 'Bearer' + token
                }
            })
            .then(response => response.json())
            .then(date => {
                const dataContainer = document.getElementById('data-container');
                dataContainer.innerHTML = `
                    <p>temp1: ${data.temp1}°C</p>
                    <p>temp2: ${data.temp2}°C</p>
                   
                `;
            })
            .catch(error => {
                console.error('Error:', error);
                document.getElementById('data-container').innerHTML = '<p>error</p>';
            });
        });
    </script>
</body>
</html>

but unfortunately I don't know how to read this data in the application. Sad
Reply
#8
Hi,
it is ery easy to get data from tis url.
The settings are in the attached image.

Please try to get the data using an Http clicnt from the web first, like the "postman".
Then enetr the same setting to the app


Attached Files Thumbnail(s)
   
Reply
#9
(06-11-2024, 09:35 PM)iliaslamprou Wrote: Hi,
it is ery easy to get data from tis url.
The settings are in the attached image.

Please try to get the data using an Http clicnt from the web first, like the "postman".
Then enetr the same setting to the 

Unfortunately, the attempt to connect according to the photo fails. I tried to connect to blynk using the http API - it works without a problem, but the token is in the http address. Any idea to help Smile The problem is still with authorization

(06-13-2024, 09:39 AM)futurmagnussen Wrote: Absolutely, connecting your application to Thinger.io to read data from thermometers, relays, and charts is possible! Need more information let me know.

What information do you need?


Attached Files Thumbnail(s)
           
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)