is it possible for one espeasy device to control other espeasy devices

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ufumes
Normal user
Posts: 11
Joined: 14 Aug 2018, 23:00

is it possible for one espeasy device to control other espeasy devices

#1 Post by ufumes » 20 Sep 2018, 12:36

Hi,
I have multiple espeasy configured devices and i want to be able to switch some of the devices based on the states of one of them, pls is this possible and how can i accomplish it.
Thanks

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: is it possible for one espeasy device to control other espeasy devices

#2 Post by grovkillen » 20 Sep 2018, 14:05

You can do that using HTTP, MQTT, or UDP. What's your environment first of all.

PS. MQTT is by far the best way in my opinion.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
enesbcs
Normal user
Posts: 587
Joined: 18 Jun 2017, 11:02
Location: Békéscsaba, Hungary
Contact:

Re: is it possible for one espeasy device to control other espeasy devices

#3 Post by enesbcs » 20 Sep 2018, 17:55

ufumes wrote: 20 Sep 2018, 12:36 Hi,
I have multiple espeasy configured devices and i want to be able to switch some of the devices based on the states of one of them, pls is this possible and how can i accomplish it.
Thanks
If you have an MQTT broker, or you can install it to anywhere, for example on an OpenWRT router, or a Raspberry PI, then MQTT is a good way. Then ESPEasy devices can be controlled by any other node (either ESPEasy Publish command) or by other mqtt clients.

If that's not what you tought, then:

1. At "Config->Unit number" you can set an ID number to your ESP.
2. At "Controllers" you can select "ESPEasy P2P Networking".
3. "Tools->Advanced->UDP port" you can specify which network port do you want to use.
Then you can control directly any ESPEasy device from another (in the same lan) without knowing it's IP address, simply by using:

SendTo: SendTo <unit>,<command>
https://www.letscontrolit.com/wiki/inde ... rial_Rules

Earlier there were also a "Global sync" option, which i shomehow can not find in the latest ESPEasy Mega releases, this was exactly made for exporting variables between ESPEasy nodes.

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: is it possible for one espeasy device to control other espeasy devices

#4 Post by Domosapiens » 20 Sep 2018, 19:46

Take a look at:
https://www.letscontrolit.com/wiki/inde ... GlobalSync

GUI example is not fully correct anymore (fore last picture is changed)
Look for Inter-ESPEasy Network under Tools/Advanced
Fill-in an UDP port and it should (?) work.
Make sure that tasks are uniquely numbered in the group of ESP's.
All tasks will appear in all nodes and kept synchronized by the UDP port.
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: is it possible for one espeasy device to control other espeasy devices

#5 Post by Shardan » 20 Sep 2018, 19:49

Domosapiens wrote: 20 Sep 2018, 19:46 Take a look at:
https://www.letscontrolit.com/wiki/inde ... GlobalSync

GUI example is not fully correct anymore (fore last picture is changed)
Look for Inter-ESPEasy Network under Tools/Advanced
Fill-in an UDP port and it should (?) work.
Make sure that tasks are uniquely numbered in the group of ESP's.
All tasks will appear in all nodes and kept synchronized by the UDP port.
As far as i can see GlobalSyncv isn't available in the last Mega versions.
Regards
Shardan

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: is it possible for one espeasy device to control other espeasy devices

#6 Post by grovkillen » 20 Sep 2018, 20:19

It has been moved from advanced settings to a controller. You find it in the drop down.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

ufumes
Normal user
Posts: 11
Joined: 14 Aug 2018, 23:00

Re: is it possible for one espeasy device to control other espeasy devices

#7 Post by ufumes » 20 Sep 2018, 21:20

Thanks for your responses. Am interested in connecting them in the standalone mode + http. I eventually came across the sendtohttp rule which helped me in communicating directly between the espeasy devices without a controller

ufumes
Normal user
Posts: 11
Joined: 14 Aug 2018, 23:00

Re: is it possible for one espeasy device to control other espeasy devices

#8 Post by ufumes » 20 Sep 2018, 21:25

enesbcs wrote: 20 Sep 2018, 17:55
ufumes wrote: 20 Sep 2018, 12:36 Hi,
I have multiple espeasy configured devices and i want to be able to switch some of the devices based on the states of one of them, pls is this possible and how can i accomplish it.
Thanks
If you have an MQTT broker, or you can install it to anywhere, for example on an OpenWRT router, or a Raspberry PI, then MQTT is a good way. Then ESPEasy devices can be controlled by any other node (either ESPEasy Publish command) or by other mqtt clients.

If that's not what you tought, then:

1. At "Config->Unit number" you can set an ID number to your ESP.
2. At "Controllers" you can select "ESPEasy P2P Networking".
3. "Tools->Advanced->UDP port" you can specify which network port do you want to use.
Then you can control directly any ESPEasy device from another (in the same lan) without knowing it's IP address, simply by using:

SendTo: SendTo <unit>,<command>
https://www.letscontrolit.com/wiki/inde ... rial_Rules

Earlier there were also a "Global sync" option, which i shomehow can not find in the latest ESPEasy Mega releases, this was exactly made for exporting variables between ESPEasy nodes.
I hope to explore this option(sendto) too, since keeping track of changing IP address can be worrisome

TD-er
Core team member
Posts: 8750
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: is it possible for one espeasy device to control other espeasy devices

#9 Post by TD-er » 23 Sep 2018, 12:18

enesbcs wrote: 20 Sep 2018, 17:55 [...]

Earlier there were also a "Global sync" option, which i shomehow can not find in the latest ESPEasy Mega releases, this was exactly made for exporting variables between ESPEasy nodes.
It has indeed been moved from that plugin-checkmark to a controller (C013 ESPEasy P2P network), since it has essentially the function of a controller.
Its implementation is still a bit 'experimental' (read: it has lots of room for optimization, especially when using lots of nodes)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 102 guests