Send data at once

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
PeJeWe
New user
Posts: 7
Joined: 22 Mar 2022, 18:52

Send data at once

#1 Post by PeJeWe » 22 Mar 2022, 19:01

I have installed ESP_Easy_mega_20211224_normal_ESP8266_4M1M Dec 24 2021 on my wemos d1 mini.
I have set a sleep mode 300 sec sleep 10 awake.
I use it as weather station with 5 sensors and send it to domoticz.
I see that the wemos not send the data at once in the window of 10 seconds.
Is there a setting for this?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Send data at once

#2 Post by Ath » 22 Mar 2022, 21:31

The common way to send multiple sensor values closely together is to run the task explicitly, best triggered at wifi#connected, and allowing a few seconds for the controllers to send out their values, something like this:

Code: Select all

on WiFi#Connected do // We are connected (takes a few seconds), now send out data
  taskrun,sensor1 // Use current tasknames
  taskrun,sensor2
  taskrun,sensor3
  taskrun,sensor4
  taskrun,sensor5
  TimerSet,1,3 // Allow a few seconds to get all data out before going to sleep
endon

on Rules#Timer=1 do
  if [Bypass#State]=1 // Bypass switch not engaged
    DeepSleep,300
  endif
endon
I've added support for a bypass switch, so regular maintenance can be done on the unit, by pulling a GPIO pin to gnd
/Ton (PayPal.me)

PeJeWe
New user
Posts: 7
Joined: 22 Mar 2022, 18:52

Re: Send data at once

#3 Post by PeJeWe » 22 Mar 2022, 21:40

where can i put the script

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Send data at once

#4 Post by Ath » 22 Mar 2022, 21:43

You will have to enable Rules option in Tools/Advanced, then the Rules tab will be visible in the webpage, between Devices and Notifications (or Tools on builds that don't have notifiers)
/Ton (PayPal.me)

PeJeWe
New user
Posts: 7
Joined: 22 Mar 2022, 18:52

Re: Send data at once

#5 Post by PeJeWe » 22 Mar 2022, 21:51

Thanks, I will test it.

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests