![]() |
|
sample code to receive http get - Printable Version +- Smart Home Automation Forum (https://www.kincony.com/forum) +-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=62) +--- Forum: F16 (https://www.kincony.com/forum/forumdisplay.php?fid=63) +--- Thread: sample code to receive http get (/showthread.php?tid=8843) Pages:
1
2
|
sample code to receive http get - telinda - 12-26-2025 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. RE: sample code to receive http get - admin - 12-27-2025 https://www.kincony.com/forum/showthread.php?tid=2129 RE: sample code to receive http get - telinda - 12-27-2025 and how to get the Device Serial Number from Arduino? RE: sample code to receive http get - admin - 12-27-2025 arduino code and KCS firmware can't use at the same time. RE: sample code to receive http get - telinda - 12-27-2025 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 RE: sample code to receive http get - telinda - 12-27-2025 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 RE: sample code to receive http get - admin - 12-28-2025 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. RE: sample code to receive http get - telinda - 12-28-2025 (12-28-2025, 01:57 AM)admin Wrote: if you can use WAN ip directly, you can write your own arduino code. Thank you for the clear explanation. 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 RE: sample code to receive http get - admin - 12-28-2025 here is mqtt protocol document: https://www.kincony.com/forum/showthread.php?tid=7619 RE: sample code to receive http get - telinda - 12-29-2025 (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 |