Embedded device controlled from the Web without ESP

Discuss PC Developer and Web Developer projects and features here.
User avatar
Nico595
Posts: 95
http://meble-kuchenne.info.pl
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

Hi Steve,

Thank you so much for your answer.

I use often Mozilla Firefox but I will try with Chrome tonight.
The Windows driver is the cdc driver provided by Microchip.
Last edited by Nico595 on Tue Apr 29, 2025 5:12 pm, edited 2 times in total.

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

I just tried with Chrome, the Request function work fine. After that I sent cmd packet to set a value, work fine. also I display the return value by the device.

I am very happy, now I can connect my device to the Web App :)

I will design a light version of my Pc App with only control and feedback. I will also try with Chrome Linux browser.
About Web App, I can't find numerical display, I have Gauge and Text but Text is a string and Gauge is too big because I have many values.

I must convert received String to Dec to display the number between 1 - 99. I can create a macro to do that, but is it the best method ?

Steve-Matrix
Matrix Staff
Posts: 1476
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 207 times
Been thanked: 349 times

Re: Embedded device controlled from the Web without ESP

Post by Steve-Matrix »

That's great news. I will make a note to check on Firefox and investigate their support for the Serial API.

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

Thanks Steve.

Mozilla Firefox stay a very popular web browser.

EDIT: I used the JS windows to convert my ascii string return value in string number. It's very perfect. With the USB Com I can design a light Web App to drive my device :)
NOTE: I tried add Charts and Gauge but not visible in the web browser, may be an external plug-in. Also, can I use PHP code in the page if I rename index.html to index.php ?

Steve-Matrix
Matrix Staff
Posts: 1476
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 207 times
Been thanked: 349 times

Re: Embedded device controlled from the Web without ESP

Post by Steve-Matrix »

Please attach (or PM me) your Web App fcsx file (plus generated html) and I will look into it.

Also, once the html has been produced you can edit it as you wish. But obviously the changes will not transfer back tot he source Flowcode file. So yes, I think you can convert the file to a PHP file that is also serving the html.

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

Nice sound.

I think add responsive function. We can also define one html page per device.

I progress good, I will send you my Web App project this WE.


Thanks.

EDIT: I find why I have not the charts and the gauge, I must have web on line. I will create a new page for the charts but before I will create the MySQL database for the users connection. I configured the Linux Mosquitto Server the last Friday, it's very easy. Now my small Web App work fine in MQTT mode. I must also add MQTT Client in my Pc App.

About responsive web page, I like create "table" and update the size of the "table" with the size of the Web browser window. When the size is very small like with the old Wap, I use "device" function to display a new design of the web page. I will try this with the html page of FC.

Today, I can tell that we can design many very interesting App with FC10 :)

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

I add the mqtt in my Pc App project but I can't see MQTT::Read function in the MQTT Component of Pc App.

If I understand good, I need of this function to check message update.

Capture d’écran 2025-05-05 002229.png
Capture d’écran 2025-05-05 002229.png (61.31 KiB) Viewed 1003 times




If I check the MQTT Component of the Wiki, I have not MQTT::Read function.

How to follow the MQTT Comms Pc App Example ?

Screenshot_20250505_122520.png
Screenshot_20250505_122520.png (221.82 KiB) Viewed 919 times




EDIT: I just find this function in "Private".

I downloaded the source file of MQTT Component from Wiki to open the MQTT::Read function but I have an error when I want export the MQTT Component about Network Component functions.

Capture d’écran 2025-05-05 135001.png
Capture d’écran 2025-05-05 135001.png (21.09 KiB) Viewed 906 times
Last edited by Nico595 on Mon May 05, 2025 12:49 pm, edited 4 times in total.

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

Capture d’écran 2025-05-05 135049.png
Capture d’écran 2025-05-05 135049.png (75.04 KiB) Viewed 904 times



EDIT: I find "GetPayload" but don't work, I investigate ...
Connect is OK, Subscribe "topic" is OK, GetPayload without data in "result" and "val" var.

I opened the SCADA_MQTT.fcx file, we must also use MQTT::Read before GetTopic and GetPayload.

I find this topic but I won't try update library because I have many customised files.
viewtopic.php?p=18363&hilit=scada+read+mqtt#p18363

Can you post an update of the MQTT Component with the MQTT::Read function plesae ?
Also, please update the Wiki MQTT Component ;)

Thank you.

Steve-Matrix
Matrix Staff
Posts: 1476
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 207 times
Been thanked: 349 times

Re: Embedded device controlled from the Web without ESP

Post by Steve-Matrix »

The latest version of the MQTT component should have the "Read" macro. Please download it from "Library Updates". It will be listed as revision number "9".

You can use "Library Updates" to download just the files you want. Open the screen and make sure only the components or files you require are ticked before pressing the "download" button.

User avatar
Nico595
Posts: 95
Joined: Tue Jul 04, 2023 4:17 pm
Has thanked: 18 times
Been thanked: 4 times

Re: Embedded device controlled from the Web without ESP

Post by Nico595 »

Hello Steve,

I do it.

Thanks.

EDIT: I created a backup of my FC10 computer and I updated the library with check of files. The MQTT Component of Pc App work fine now :)
Probably, I will add the MQTT Component in my Embedded project when I will add the ESP.

Post Reply