send data via rules to another device
Moderators: grovkillen, Stuntteam, TD-er
send data via rules to another device
Dear,
I want to send or read data from one device to another, I hope somebody can help me with this.
Perhaps the same was asked before, but a similar task I did not found.
On the first NodeMCU called ESP1 (DigiDash 1) I have "Accu1" = Task 8 and "Accu2" = Task 9 (192.168.3.104)
On the second there is ESP3 (DigiDash 3) there I have "Accu keuze 1 of 2" = Task 5 (192.168.3.107)
When "Accu1" has a value of for instance 22.5V on ESP1 I want a rule that switches "Accu keuze 1 of 2" on ESP3 (DigiDash 3) to 1.
And when "Accu2" has a value of for instance 22.5V on ESP1 its has to switch "Accu keuze 1 of 2" on ESP3 (DigiDash 3) to 0.
With searching in the tutorial I made (Maybe you can correct it or complete it).
Switch to 1:
On ESP1 rule:
on Accu1#Voltage=22.5 do
SendToHTTP 192.168.3.107,80,/control?cmd=event, Accu keuze 1 of 2 ?????command?????
endon
On ESP3 rule:
on Accu keuze 1 of 2 ?????command????? do
pcfgpio,67,1 //Accu keuze 1 of 2 switch naar 1, and 67 stands for ESPEasy port nr
endon
Switch to back to 0:
On ESP1 rule:
on Accu2#Voltage=22.5 do
SendToHTTP 192.168.3.107,80,/control?cmd=event, Accu keuze 1 of 2 ?????command?????
endon
On ESP3 rule:
on Accu keuze 1 of 2 ?????command????? do
pcfgpio,67,0 //Accu keuze 1 of 2 switch naar 0, and 67 stands for ESPEasy port nr
endon
If this works I want also do something with Gell accu 3 (calls now: "Accu3"), I then want him to switch another switch on ESP3 (that's for later )
Thanks for your time.
NetEye
I want to send or read data from one device to another, I hope somebody can help me with this.
Perhaps the same was asked before, but a similar task I did not found.
On the first NodeMCU called ESP1 (DigiDash 1) I have "Accu1" = Task 8 and "Accu2" = Task 9 (192.168.3.104)
On the second there is ESP3 (DigiDash 3) there I have "Accu keuze 1 of 2" = Task 5 (192.168.3.107)
When "Accu1" has a value of for instance 22.5V on ESP1 I want a rule that switches "Accu keuze 1 of 2" on ESP3 (DigiDash 3) to 1.
And when "Accu2" has a value of for instance 22.5V on ESP1 its has to switch "Accu keuze 1 of 2" on ESP3 (DigiDash 3) to 0.
With searching in the tutorial I made (Maybe you can correct it or complete it).
Switch to 1:
On ESP1 rule:
on Accu1#Voltage=22.5 do
SendToHTTP 192.168.3.107,80,/control?cmd=event, Accu keuze 1 of 2 ?????command?????
endon
On ESP3 rule:
on Accu keuze 1 of 2 ?????command????? do
pcfgpio,67,1 //Accu keuze 1 of 2 switch naar 1, and 67 stands for ESPEasy port nr
endon
Switch to back to 0:
On ESP1 rule:
on Accu2#Voltage=22.5 do
SendToHTTP 192.168.3.107,80,/control?cmd=event, Accu keuze 1 of 2 ?????command?????
endon
On ESP3 rule:
on Accu keuze 1 of 2 ?????command????? do
pcfgpio,67,0 //Accu keuze 1 of 2 switch naar 0, and 67 stands for ESPEasy port nr
endon
If this works I want also do something with Gell accu 3 (calls now: "Accu3"), I then want him to switch another switch on ESP3 (that's for later )
Thanks for your time.
NetEye
- Attachments
-
- 5 devices.png (276.74 KiB) Viewed 8462 times
-
- 6 devices.png (297.81 KiB) Viewed 8462 times
-
- 5 devices.PNG (428.63 KiB) Viewed 8462 times
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: send data via rules to another device
First I would like you to download latest version of ESP Easy. Then we'll talk
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: send data via rules to another device
First I suggest do not use =22.5 but better >22.5.
You can easily miss exact value.
Switch to 1:
On ESP1 rule:
on Accu1#Voltage>22.5 do
SendToHTTP 192.168.3.107/control?cmd=event,Accu1
endon
On ESP3 rule:
on Accu1 do
pcfgpio,67,1 //Accu keuze 1 of 2 switch naar 1, and 67 stands for ESPEasy port nr
endon
Switch to back to 0:
On ESP1 rule:
on Accu2#Voltage>22.5 do
SendToHTTP 192.168.3.107/control?cmd=event,Accu2
endon
On ESP3 rule:
on Accu2 do
pcfgpio,67,0 //Accu keuze 1 of 2 switch naar 0, and 67 stands for ESPEasy port nr
endon
You can easily miss exact value.
Switch to 1:
On ESP1 rule:
on Accu1#Voltage>22.5 do
SendToHTTP 192.168.3.107/control?cmd=event,Accu1
endon
On ESP3 rule:
on Accu1 do
pcfgpio,67,1 //Accu keuze 1 of 2 switch naar 1, and 67 stands for ESPEasy port nr
endon
Switch to back to 0:
On ESP1 rule:
on Accu2#Voltage>22.5 do
SendToHTTP 192.168.3.107/control?cmd=event,Accu2
endon
On ESP3 rule:
on Accu2 do
pcfgpio,67,0 //Accu keuze 1 of 2 switch naar 0, and 67 stands for ESPEasy port nr
endon
Re: send data via rules to another device
Dear Kimot,
Wow, thanks,
I will try the rule.
I’ll be back
Wow, thanks,
I will try the rule.
I’ll be back
Re: send data via rules to another device
Dear Kimot,
I changed > higher to < smaller (voltage drops).
The words Accu1 and Accu2 does nothing on ESP3, it does not change the values from 0 to 1 or reverse.
Pity.
Maybe you know the solution or else I have to do it manualy.
Regards and nice weekend
I changed > higher to < smaller (voltage drops).
The words Accu1 and Accu2 does nothing on ESP3, it does not change the values from 0 to 1 or reverse.
Pity.
Maybe you know the solution or else I have to do it manualy.
Regards and nice weekend
Re: send data via rules to another device
Maybe ,80, is the issue?
SendToHTTP 192.168.3.107,80,/control?cmd=event,Accu2
SendToHTTP 192.168.3.107,80,/control?cmd=event,Accu2
Re: send data via rules to another device
I am not using port number and it works in my system:
( 192.168.1.102 is IP address my ESPeasy thermostat )
But I am not using Mega version - it is absolutely inapplicable for me and my rules.
I am using v2.0-20180322
And here are my rules for switch, which can be triggered by pressing local switch, sending events lamp_on or lamp_off from Domoticz
or even lamp_change from other ESP.
Actual state of relay is reported back to Domoticz.
( 192.168.1.102 is IP address my ESPeasy thermostat )
But I am not using Mega version - it is absolutely inapplicable for me and my rules.
I am using v2.0-20180322
And here are my rules for switch, which can be triggered by pressing local switch, sending events lamp_on or lamp_off from Domoticz
or even lamp_change from other ESP.
Actual state of relay is reported back to Domoticz.
Code: Select all
on lamp_on do
gpio,12,1 // sepnuti rele
gpio,13,0 // rozsviceni LED
endon
on lamp_off do
gpio,12,0
gpio,13,1
endon
on lamp_change do
if [rele#Switch]=1 // jestliže je rele v sepnutem stavu
event,lamp_off // tak ho vypni
SendToHTTP 192.168.1.253,8080,/json.htm?type=command¶m=switchlight&idx=19&switchcmd=Off // pošli aktuální stav do Domoticz
else
event,lamp_on
SendToHTTP 192.168.1.253,8080,/json.htm?type=command¶m=switchlight&idx=19&switchcmd=On
endif
endon
on SW01#Switch do // jestliže bylo stisknuto tlačítko
event,lamp_change // změň stav rele
endon
Re: send data via rules to another device
Impressive to see what people can make.
I will stroggle on.
I think I’am almost there
Thanks kimot
I will stroggle on.
I think I’am almost there
Thanks kimot
Who is online
Users browsing this forum: Google [Bot] and 1 guest