Berry script fails in aetoexec.be but works in console #20553
Unanswered
CyBaart
asked this question in
Support request
Replies: 2 comments 2 replies
-
On boot wifi is not yet connected, so you can't |
Beta Was this translation helpful? Give feedback.
1 reply
-
I will put a do while loop in a separate function to check that the WiFi is connected before running that function after boot. Also, it isn't a completely empty sensor value string, there is one sensor value of 14.7 which was the DS18B20 temperature - could it be that that sensor is ready to read quicker than the DHT11 and that some delay before running this function would fix that too? I'll know soon enough! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am new to Tasmota and berry script. I do have many years experience with C++, arduino etc.
I am making a controller for my hot tub using an ESP32 and Tasmota. There are 4 solid state relays, a DS18B20 temperature sensor and a DHT11 temperature and humidity sensor. I am trying to write a berry script to control it all but it is not finished yet.
One function sends the water temperature, the air temperature, and humidity levels to a Thingspeak channel. This is the code (actual api_key replaced).
So, if I copy and paste the lines of code into the berry console, it works perfectly but in the autoexec.be file, it doesn't work.
First, the console output when I paste the code in
And the output on boot
As you can see, there is only one of the sensor values within the webadr variable and the cl.GET returns a value of 1. My question is, why?
I don't think it is important but just in case, here is the full script. Ultimately, the things_log and main_loop will be on cron timers. Of course, if there is a better way of doing anything within my code, I would appreciate suggestions. Remember, it's not finished especially main_loop! Cheers, Steve
Beta Was this translation helpful? Give feedback.
All reactions