I have ESP board running on mega-20190630 and I'm trying to make temperature/humidity datalogger running from batteries. I want data stored in InfluxDB. So, in controllers I have defined Generic HTTP Advanced with parameters for my Influx. Under devices I have defined DHT11 sensor with option to send data to controller and interval 60 seconds. So far it's working very well - ESP running, every 60 seconds new record in my influx database.
Now I tried to set up deep sleep to prepare it for running from batteries. And there is the problem - currently I have configured awake interval 10 seconds and sleep for 60 seconds. This is working fine - ESP after 60 seconds woke up, connect's to WiFi (I can ping it) and it's alive for approximately 10 seconds. Issue is that no data in this case is written to Influx. It seems that writing data using controllers is done after sensor update interval which means after another 60 seconds - which is nonsense to keep ESP from battery so long alive. Well, I can set shorter interval for sensor. But I also have (working) physical switch to turn off deepsleep and in that case when I keep ESP running it flood my influx database with a lot of unwanted data.
I also tried to play with rules to achieve data publication after wake up. I tried this rule:
but still no data in Influx. In examples on the internet they are often using in rules commands Publish or SendToHTTP. But unfortunately none of them is suitable for InfluxDB - Publish is for MQTT protocol and SendToHTTP didn't support HTTP POST which I need for posting data to influx (and it's working fine using Generic HTTP Advanced controller).on WiFi#Connected do
So there is some way with current mega release how to force publishing data after wake up as soon as possible? Without requiring to create some HTTP-GET to InfluxDB od MQTT to InfluxDB proxy as current ESPEasy mega release can do POST requests fine...