Please help me change the properties of components

For general Flowcode discussion that does not belong in the other sections.
Post Reply
vvvhydr
Posts: 19
http://meble-kuchenne.info.pl
Joined: Wed Dec 01, 2021 7:22 am
Has thanked: 1 time

Flowcode v9 Please help me change the properties of components

Post by vvvhydr »

I am trying to create a project that uses 2 IotMadeEasy components at the same time. IotMadeEasy1 connects to one server, and IotMadeEasy2 to another. The problem is that IotMadeEasy1 and IotMadeEasy2 use the same variable names such as HOST and others. Please tell me how to make variables like HOST1, PORT1, etc. for the IotMadeEasy1 component, and variables like HOST2, PORT2, etc. for the IotMadeEasy2 component.
Thank you very much.
Attachments
5393488904205757867.jpg
5393488904205757867.jpg (75.51 KiB) Viewed 245 times

chipfryer27
Valued Contributor
Posts: 1604
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: Please help me change the properties of components

Post by chipfryer27 »

Hi

Which version of FC are you using.

Under IOTMadeEasy properties you can set the server name and port, highlighted yellow in this screenshot

Screenshot 2025-06-24 165111.jpg
Screenshot 2025-06-24 165111.jpg (75.38 KiB) Viewed 240 times

Regards

medelec35
Matrix Staff
Posts: 1988
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 660 times

Re: Please help me change the properties of components

Post by medelec35 »

Hello.
During code generation, the value (or string) you enter is compiled into a constant scoped to that specific component handle.
Because it’s scoped, identical property names never clash.
It doesn’t matter how many Host properties you create, by adding additional IotMadeEasy components —on the embedded hardware each one becomes a unique constant tied to its own component instance.
Martin

vvvhydr
Posts: 19
Joined: Wed Dec 01, 2021 7:22 am
Has thanked: 1 time

Re: Please help me change the properties of components

Post by vvvhydr »

So it turns out that it is impossible to access the component properties as variables? Only statically write data in the component properties?

chipfryer27
Valued Contributor
Posts: 1604
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: Please help me change the properties of components

Post by chipfryer27 »

Hi

In your original post you wanted IOT-1 to connect to server-1 and IOT-2 to connect to server-2. The IOTMadeEasy components allow for this.

If you want to dynamically change target addresses you can use the NetworkComms component.

Regards

vvvhydr
Posts: 19
Joined: Wed Dec 01, 2021 7:22 am
Has thanked: 1 time

Re: Please help me change the properties of components

Post by vvvhydr »

The described methods did not help. Even dividing into a separate network. Mixing of properties is in progress.
That is why I asked how to change the component itself.

BenR
Matrix Staff
Posts: 1940
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: Please help me change the properties of components

Post by BenR »

Hello,

What is your WIFI / Ethernet component layer? Some of these have a channel allowing for multiple concurrent connections but others do not. If you let us know which you're using then I can see if there is a way to bump one of the IoT components to a different channel.

Post Reply