SendToHTTP result OK ?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 126
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

SendToHTTP result OK ?

#1 Post by mackowiakp » 03 Sep 2019, 09:34

Is it possible in rule to obtain result of SendTo HTTP command? I mean was it sent and received by server or not.

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

Re: SendToHTTP result OK ?

#2 Post by grovkillen » 03 Sep 2019, 13:16

Not currently, but I guess having the 20 or 40x value could be useful. Please elaborate on the use case and then we might open an feature request on GitHub.
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:

mackowiakp
Normal user
Posts: 126
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SendToHTTP result OK ?

#3 Post by mackowiakp » 03 Sep 2019, 18:38

So the only solution is to SendToHttp something to dummy sensor in Domoticz and then, using for example LUA script, send then back something from Domoticz to dummy sensor in easyESP. Little complicated - but works.

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

Re: SendToHTTP result OK ?

#4 Post by grovkillen » 03 Sep 2019, 18:43

Please explain more of the use case. It's not something we personally need so you need to fill in the missing pieces for us.
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:

mackowiakp
Normal user
Posts: 126
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SendToHTTP result OK ?

#5 Post by mackowiakp » 03 Sep 2019, 19:20

Imagine such situation. I have Domoticz on RPi. RPi is equipped with UPS, on which RPi can work at least for 4 days. nodeMCU do not have UPS. In addition - as you know - nodeMCU reset themselves from time to time, and even hang. I wrote the rules that reboot nodeMCU after 15 minutes if they hang. Either way, after losing power or after "hanging", I need to restore, for example, the state of the relays or the contents of the displays. They sometimes display a value from a sensor that is connected to a completely different nodeMCU or RPi itself. Additionally, the state of the relays for example, may have changed during a power outage, according to the schedule recorded in Domoticz. Therefore, during boot nodeMCU I send SendToHttp from nodeMCU to Domoticz, who "presses" the dummy button in Domoticz. This, in turn, launches the LUA script in Domoticz, which in turn sends to the nodeMCU set of the parameter values ​​downloaded from the Domoticz database, which should have the nodeMCU at that time and writes them to the user variables. It's just that I don't know if, for example, the "zero" values ​​themselves are correct or their zero value is due to the fact that they have not been transmitted from Domoticz to nodeMCU. So somehow you need to check that the transmission took place. If I cannot do this at the protocol level, I use workaround. First, I reset one user variable (semaphore), send SendToHTTP to Domoticz, the LUA script sends data and sets - previously zeroed - user variable to 1. This only confirms that I can trust the downloaded data. Well, only that it should happen at the protocol level and not in the rule.

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

Re: SendToHTTP result OK ?

#6 Post by grovkillen » 03 Sep 2019, 19:36

Please open a feature request on GitHub.
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:

mackowiakp
Normal user
Posts: 126
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: SendToHTTP result OK ?

#7 Post by mackowiakp » 03 Sep 2019, 19:48

OK. I just copy/paste the last my post to GitHub.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests