Two %eventvalue%

Moderators: grovkillen, Stuntteam, TD-er

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

Two %eventvalue%

#1 Post by mackowiakp » 01 Sep 2019, 08:47

I want to send two values from Domoticz script to nodeMCU in one http request. In rule, I assign user variable to %eventvalue%. My question is because if I sent such values in two separate requests (one by one, without 2-3 sec delay between), both user variables value are assigned to the first %eventvalue% received. It is important, because delay in sending is not always equal delay in receiving. So even delay in sending in some cases couse receiving in the same time (WiFi occasional problems, poor WiFi coverage etc). Is it possible to use something like (in the meaning of "philosophy") %eventvalue_one% and %eventvalue_two% or so? Or any workaround?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Two %eventvalue%

#2 Post by ThomasB » 04 Sep 2019, 20:19

Or any workaround?
Here's what I propose.
1. Send the two values to ESPEasy's dummy vars.
2. If mission critical, ESPEasy rules could "echo" back a message to the sender to acknowledge when each value was received.
3. Send a event command that runs a rule that acts on the new values.

- Thomas

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

Re: Two %eventvalue%

#3 Post by mackowiakp » 05 Sep 2019, 10:32

I will do so.

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

Re: Two %eventvalue%

#4 Post by mackowiakp » 05 Sep 2019, 17:25

Build 20190827 normal, core 2.5.2. Two questions
First. I set dummy sensor as temp/hum date type and click on Submit. But it returns to default data type "Single". So I try with type "dunle". But the result is the same. That means after clicking "Submit" it still returns to data type "Single". Is it issue?
Of course as workaround I can use two dummy devices.
Second. What is a proper syntax of HTTP request for sending data from server to easyESP? Docu contains only info about using dummy sensor in easyESP rule. That is:
TaskValueSet <task nr>,<taskvalue nr>,<value|formula>
But how to pass parameters in HTTP reqest from server to nodeMCU?

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Two %eventvalue%

#5 Post by ThomasB » 05 Sep 2019, 17:40

Q1: Can't help.

Q2:
What is a proper syntax of HTTP request for sending data from server to easyESP?
It uses ESPEasy's HTTP command format. Like this:
http://<espeasyip>/control?cmd=TaskValueSet,<task nr>,<taskvalue nr>,<value>
Docu contains only info about using dummy sensor in easyESP rule.
HTTP Protocol is shown here: https://www.letscontrolit.com/wiki/inde ... _Reference

- Thomas

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

Re: Two %eventvalue%

#6 Post by mackowiakp » 05 Sep 2019, 17:51

HTTP Protocol is shown here: https://www.letscontrolit.com/wiki/inde ... _Reference
THX. Sometimes is extremely difficult to find the simplest thing.. Shame..

But the first thing I will rapport as a issue.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 29 guests