Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sample code to receive http get
#1
Hello Admin,

Have you ever created an example Arduino program to get results from API calls (HTTP/HTTPS Web Server)?
Btw, I used Kincony F16 ESPS3 with Tuya. 
And I have already tested mostly features in the KCS V3 firmware.

Thank you very much.
Reply
#2
https://www.kincony.com/forum/showthread.php?tid=2129
Reply
#3
and how to get the Device Serial Number from Arduino?


Attached Files Image(s)
   
Reply
#4
arduino code and KCS firmware can't use at the same time.
Reply
#5
Ok, let say i want to use KCS or Arduino. I choose one.

the situation is like this:
My F16 act as a client and want to access a web server on the public IP address (https://nnn.nnn.nnn.nnn/getstatus.php?sn=xxxxx&Relay=1).
That API (getstatus.php....) will get return value (on/off).

the question is:
Can I use KCS to do that? if yes, how to do that?
If KCS cannot do that, then I have to create my own code using arduino. And please give me sample arduino code to do that.

Thank you
Reply
#6
Ok, let say i want to use KCS or Arduino. I choose one.

the situation is like this:
My F16 act as a client and want to access a web server on the public IP address (https://nnn.nnn.nnn.nnn/getstatus.php?sn=xxxxx&Relay=1).
That API (getstatus.php....) will get return value (on/off).

the question is:
Can I use KCS to do that? if yes, how to do that?
If KCS cannot do that, then I have to create my own code using arduino. And please give me sample arduino code to do that.

Thank you
Reply
#7
if you can use WAN ip directly, you can write your own arduino code.
if you want create a cloud server, you can download KCS firmware, let F16 connect to your cloud server by MQTT, then you can write your own webpage on cloud server, maybe use java.
Reply
#8
(12-28-2025, 01:57 AM)admin Wrote: if you can use WAN ip directly, you can write your own arduino code.
if you want create a cloud server, you can download KCS firmware, let F16 connect to your cloud server by MQTT, then you can write your own webpage on cloud server, maybe use java.

Thank you for the clear explanation. Idea
And i want to confirm such think.

I used cloud server, then i will use KCS firmware.
Based on your recommendation, i will use MQTT protocol.

I tried to configure MQTT F16 like in the picture below.

the next question is:
1. is it correct for this configuration setting?
    Protocol -> General: MQTT enable [on]
    input broker address on the cloud server, and the port.
    i will filled user name & password later.

2. what is the state topic meaning? it look like mac address for the wifi/lan with addition string F16 & STATE

3. what is the command topic meaning? also it same like above. but addition string is SET


Attached Files Image(s)
   
Reply
#9
here is mqtt protocol document: https://www.kincony.com/forum/showthread.php?tid=7619
Reply
#10
(12-28-2025, 10:54 AM)admin Wrote: here is mqtt protocol document: https://www.kincony.com/forum/showthread.php?tid=7619

Awesome....

Now, we can use our own MQTT broker...

Thank you


Attached Files Image(s)
   
Reply


Forum Jump:


Users browsing this thread: