Reboot inside rules?
Moderators: grovkillen, Stuntteam, TD-er
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
You load the OTA bin file first and then you load the "real" bin file. Make sure you have everything backuped and documented of the update doesn't work!
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
but between the load of the OTA first bin, and the second load of "real" bin, i have to reboot the ESP or just load the OTA and immediatly after that the new firmware bin, without reboot?grovkillen wrote: ↑11 Feb 2019, 16:40 You load the OTA bin file first and then you load the "real" bin file. Make sure you have everything backuped and documented of the update doesn't work!
thanks
Re: Reboot inside rules?
I have tried once, but ran into problems. Settings were not correct and I could not get in at all. Ended up with a physical USB to my laptop, so I could make the settings right.megamarco83 wrote: ↑11 Feb 2019, 14:50sorry for asking a litte bit off topic, but there is a way to update ESP with 1mb with new firmware using OTA ?manjh wrote: ↑10 Feb 2019, 21:59
Great, just my luck. I use a mix of Mega and B147. I could upgrade, but some units are hidden away and I don't feel like digging them out for this reason. Upgrading OTA does not always work from B147 to Mega, I found out the hard way. Needs a physical USB connection to get things right.
So, I am back to the "uptime" method, have changed the rules in all of my units.Now to wait and see if they reboot.
i see that there are the two step bin file but how to use it? thanks
Note that this is for a major upgrade step, from 147 to Mega is quite a step.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
Oh, from R147 to mega is a no-no using OTA. I'd say you should not fix what's not broken or if you really need new features you need to connect the unit to a PC and do the complete new flash. Just remember to document everything you want to reconfigure!
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Reboot inside rules?
Yep, my thoughts exactly. "If it ain't broken, don't fix it". I'll stick to 147 until I see a good reason to migrate.grovkillen wrote: ↑11 Feb 2019, 17:15 Oh, from R147 to mega is a no-no using OTA. I'd say you should not fix what's not broken or if you really need new features you need to connect the unit to a PC and do the complete new flash. Just remember to document everything you want to reconfigure!
Also, I think I am still using one unit on B124, with a special modification : a 1024 RX buffer.
This was needed to use the P1 meter interface.
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
i try again with unit ESP01 with 1mb memorygrovkillen wrote: ↑11 Feb 2019, 16:40 You load the OTA bin file first and then you load the "real" bin file. Make sure you have everything backuped and documented of the update doesn't work!
i have fw espmega release Aug 9 2018 and i load the ESPEasy_2step_UploaderMega_1024.bin
from the last gitub release
i receive the error:
Update error: ERROR[4]: Not Enough Space
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
Okay, yes then it's too big
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
so, no way to update OTA the 1mb device with espmega?
Last edited by megamarco83 on 12 Feb 2019, 21:57, edited 1 time in total.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
Not with the current OTA bin together with those big versions already on there.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Reboot inside rules?
Do what I do, when all else fails: dig out the ESP unit, bring it to your desk, and use an old-fashioned USB cable to connect to serial. This way you should be able to load.
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
yes, right, i did in this way for my esp01, but sometimes is hard to reach some esp located in my house
Re: Reboot inside rules?
I know the feeling...megamarco83 wrote: ↑12 Feb 2019, 22:06 yes, right, i did in this way for my esp01, but sometimes is hard to reach some esp located in my house
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
At some point the size became too small. I suggest adding a bigger memory to it if you plan on updating it often.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
the problem is that the device are sonoff basic that has on board only 1mb memory...so that's the problem.grovkillen wrote: ↑13 Feb 2019, 05:38 At some point the size became too small. I suggest adding a bigger memory to it if you plan on updating it often.
and it's not possibile to add memory to this device
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
Yes I know. (But you can replace the 1 MB mem in ESP8266 with a 4 MB of you have good soldering skills).
EDIT: if they are ESP8285 then no.
EDIT: if they are ESP8285 then no.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Reboot inside rules?
It is still strange that the bin file listed as 1M, does not fit into a 1M memory...
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
I does fit if you do a cable flash.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Reboot inside rules?
If you do it Over The Air the target device has to has enough room to operate from the existing 1M file and store the new 1M file, so physically impossible.
If you do it over serial then you simply over-write the last one with the new one
-D
-D
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
yes, that correct and understandable, but is not possible to create a very small update (like 2 step OTA) to:
1) in one step substitute the current fw installed (espmega) with the smollest one (it will be only a bridge)
2) in second step substitute the little fw bridge installed with update 1mb new version of espmega
i think that this is the purpose of 2step ota update, but it not works giving back the error: "not enought space"
1) in one step substitute the current fw installed (espmega) with the smollest one (it will be only a bridge)
2) in second step substitute the little fw bridge installed with update 1mb new version of espmega
i think that this is the purpose of 2step ota update, but it not works giving back the error: "not enought space"
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: Reboot inside rules?
We know that the current minimal being done kb too big.
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
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: Reboot inside rules?
If you compile your own fw, you can have enough space to upload the OTA bin.megamarco83 wrote: ↑13 Feb 2019, 12:38 yes, that correct and understandable, but is not possible to create a very small update (like 2 step OTA) to:
1) in one step substitute the current fw installed (espmega) with the smollest one (it will be only a bridge)
2) in second step substitute the little fw bridge installed with update 1mb new version of espmega
i think that this is the purpose of 2step ota update, but it not works giving back the error: "not enought space"
I have already do it with recent Mega without any issues.
The issue is after, on the 2d step: after uploading the new fw, the ota bin reboot, and the sonoff basic is frozen.
A complet report is here:
https://www.letscontrolit.com/forum/vi ... 70#p33937
-
- Normal user
- Posts: 230
- Joined: 13 Apr 2017, 23:09
Re: Reboot inside rules?
thanks for report, but since now i see the same issue...is not possible to update sonoff with OTADjoe wrote: ↑26 Feb 2019, 05:35
If you compile your own fw, you can have enough space to upload the OTA bin.
I have already do it with recent Mega without any issues.
The issue is after, on the 2d step: after uploading the new fw, the ota bin reboot, and the sonoff basic is frozen.
A complet report is here:
https://www.letscontrolit.com/forum/vi ... 70#p33937
only with serial cable, but the problem is that my sonoff is not easy to reach, and i have to disconnect also the power...very big work...
i hope the soon as possible the updating of 1mb device will be possible.
Re: Reboot inside rules?
Lifting this thread again
One of my Wemos D1 looses ceonnection to my WIFI.
On the display attached to the WIFI bars and SSID name dont show up.
After unplug from powersource it works again.
I wonder if a rule that send ping to my mqtt server or gateway and if no answer then reboot the wemos can be done?
Or can I have a rule that when WIFI is disconnected it reboots after 5 minutes ?
Or is this the easier solution? ( see attached picture)
One of my Wemos D1 looses ceonnection to my WIFI.
On the display attached to the WIFI bars and SSID name dont show up.
After unplug from powersource it works again.
I wonder if a rule that send ping to my mqtt server or gateway and if no answer then reboot the wemos can be done?
Or can I have a rule that when WIFI is disconnected it reboots after 5 minutes ?
Or is this the easier solution? ( see attached picture)
- Attachments
-
- screen.jpg (48.93 KiB) Viewed 14254 times
Re: Reboot inside rules?
I also want to re-look this post. My situation is exactly the same, rebooting randomly. My setup is a Mini Node MCU ESP8266 - 4M, with a D1 Power shield fed off a mobile phone charger, 7V, 700mA.I also have two DHT22's connected.
I'll ry the settings for Connection failure threshold = 30, I had the RestartWiFi lost connection on for a long time already.
If this connection failure does setting not resolve the issue, I'll try the reboot rules as described earlier in the post as well. What I also think may be an issue, is the two DHT22's? Could that also be a cause, ie unstable power and current supply?
I'll ry the settings for Connection failure threshold = 30, I had the RestartWiFi lost connection on for a long time already.
If this connection failure does setting not resolve the issue, I'll try the reboot rules as described earlier in the post as well. What I also think may be an issue, is the two DHT22's? Could that also be a cause, ie unstable power and current supply?
Re: Reboot inside rules?
The parameter RestartWiFi lost connection is only restarting the wifi module in the ESP itself.
So it does turn off the wifi and turn it on again.
It does not restart the ESP.
The Connection Threshold does restart the ESP.
I agree those are not the most descriptive terms for their meaning.
And when in doubt of the stability of the power supply, you may want to add capacitors near the power lines of the sensor. (e.g. 100 nF close to the sensor)
Some cheap power supply units also have a high frequency ripple on their output voltage.
Those can be flattened by adding a bigger capacitor to the input of the ESP module (e.g. 330 uF at the 5V line of the USB plug)
So it does turn off the wifi and turn it on again.
It does not restart the ESP.
The Connection Threshold does restart the ESP.
I agree those are not the most descriptive terms for their meaning.
And when in doubt of the stability of the power supply, you may want to add capacitors near the power lines of the sensor. (e.g. 100 nF close to the sensor)
Some cheap power supply units also have a high frequency ripple on their output voltage.
Those can be flattened by adding a bigger capacitor to the input of the ESP module (e.g. 330 uF at the 5V line of the USB plug)
Who is online
Users browsing this forum: No registered users and 0 guests