OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Some issues and question
- This topic has 30 replies, 6 voices, and was last updated 3 days, 9 hours ago by
bena.
-
AuthorPosts
-
October 23, 2016 at 7:37 am #44370
tom36germanyParticipantHi everyone,
first of all I like to congrat for that fantastic open source project and great effort you all put in to that project.
3 Month a go I purchased the DC version of OS + man extension board. It came from the US to Thailand in the lightspeed of 2 weeks.
Great and fast – excellent. Thanks a lot to the OpenSprinkler Team !!!!All works well so far and I even control some of my Yard light´s with the system as the build in timer / WU (sunset to sunrise) matching perfectly my needs.
However,
(Question 1) : Here in Thailand we face the issue of recent power fails (sometimes just for a few seconds). So I face the problem
that the running program(s) for water and light not resume once the grid is back. I have to restart the program
for the current day manually.
Is there any change to that the program continues automatically once the OS controller got back his power supply?(Question 2) : Using Win 10 and Chrome as my OS and standard browser (I know that’s both not the best choice 😉 ) I was wondering why the
Status change for each channel can only be seen by “reload” the webpage of the OS user interface. I not face that issue on IOS and on
Android. Means I manually start an output -> it will show me the green light and status of the relevant output but when I stop the same output
or even all stations i have to manually reload the webpage.(Question 3) : Is it advisable and possible to change the white background of the OS – UI (e.g. with a nice picture) ? If yes where I have to
Include the relevant path – Not sure me as an amateur with some knowledge can do that, but would love to try 😉 – Expecting that the relevant HTML
file (that I have to modify) will be on the SD card, is it ?(Question / Hint 4) : Well the most of the UI is self explain and most of the menus are greatly created. I just wondering where is the
“go to home screen – or lets call it station overview” Button ? On the PC not the issue but on the phone / tablet it´s sometimes a hassle to click
20 times the “back” button to go to the main overview. Or am I so blind that I have overseen it somewhere?Apologize for my bad English and thanks in advance for your help.
I will post some picture of the setup in the relevant section (pictures and creative use) of the Forum.
Tom
Attachments:
October 31, 2016 at 12:49 am #44430
RayKeymasterHi, thanks for posting. See below for answers:
(Question 1) Power break: currently the firmware cannot resume the program run if there is a power break. There are two work-arounds to address this issue: one option is to make use of the ‘repeating start time’ feature and break a program into multiple shorter sessions. For example, instead of watering for 30 minutes all together, break it into 5 minutes and repeating 5 times. So the total run time is the same, but this way, even if there is a power break, you at most lose a 5-minute session and the remaining sessions will still run. Another option is to simply add a UPS (uninterrupted power source) that allows the controller to continue running across power break.
(Question 2) Win10 and Chrome: the app is designed to refresh automatically every few seconds, so not seeing update after a while is not normal. We will investigate this issue. If you have a mobile phone, I suggest you also try to download and install the OpenSprinkler mobile app and see if that works better.
(Question 3) Replacing background color: we haven’t thought about it. Good suggestion. I think reducing the window size can help reducing the amount of background color you see (keep in mind that although the web app runs fine in a browser, it is primarily designed for mobile platforms, so reducing the window size can better simulate a mobile platform).
(Question 4) there is no dedicated ‘go to homepage’ button. Generally you can use the ‘back’ button to navigate back, but I can see how if you have navigated among many other pages it can take many clicks to go back to the homepage. I will discuss with Samer about possibly adding a home button in the popup menu.
October 31, 2016 at 8:39 am #44440
SamerKeymasterJust to add to question 4, the status bar acts as a home button most of the time.
November 3, 2016 at 8:15 am #44459
moreejtParticipantI have found that using the back button normally wipes out whatever I was doing and am training myself NOT to use it. For example, if I am editing a program on my desktop browser it uses some popup/lightbox feature for times. If I change my mind and dont want to edit the time there is no cancel button. I instinctively hit the back button and all my changes are erased.
> Just to add to question 4, the status bar acts as a home button most of the time.
That’s good to know. It’s also not intuitive. Perhaps adding a small home icon into the status bar would help.–though A home icon in the top bar makes more sense.
November 3, 2016 at 8:21 am #44461
moreejtParticipantthere is also no way to cancel editing of a program since they are all edited inline on the page with all of the others. I’m guessing that I’m supposed to use the back button there?
And since we’re on the subject. I find the two menus confusing. Why are there two menus? The top menu on the home page is for editing opensprinkler for admin and the other is for managing the programs but multiple sections in one menu makes more sense to me. The top menu is where I am used to going to do everything in most other mobile apps these days.
November 6, 2016 at 10:51 am #44481
RayKeymasterI will let Samer answer the question about the two menus, but my recollection is that one menu would just appear too long on mobile phones. That’s why we split them into two different menus.
April 23, 2025 at 5:12 pm #81997
robohackParticipantHas there been any change in the status of the first question — i.e. can OpenSprinkler with v2.2.1 firmware now restart a program midway through after a power failure or reboot?
I’m guessing not — I’ve rebooted my controller and even though the current time has passed through points where a next zone should have started, nothing is happening, no zones are active.
Watering is too critical here and I can’t have it fail midway through a program, or even midway through a zone, just because the power glitched! My program is far too complex with far too many zones, and the need to regularly edit zone times, to be broken up into small intervals with fixed start times.
I _really_ need this feature too!
It seems absurd that there’s no “resume the running program” feature in a controller this sophisticated. It knows what time it is and it knows if a program should be running at the current time, and it knows what point in the current program the current time represents, so should be able to immediately restart the zone that should be running now and continue the program on from there.
The program simulation feature shows all of this information quite clearly, including the red bar for the current time.
On reboot the controller should just run the simulation of the day’s program(s) through to the current time, and if anything should be active it should simply jump in there and continue on as if nothing had happened.
April 23, 2025 at 6:18 pm #82002
RayKeymasterWhy not use a UPS (uninterrupted power supply). It’s widely available and is pretty cheap.
April 23, 2025 at 6:31 pm #82003
RayKeymasterI can explain why the way you wanted is much more difficult to implement than you may think. The scheduler in the firmware handle zone starting dynamically. The order of zones, overlapping programs, dynamic parameters, are only known at the time those programs start. If the controller reboots and it misses the start time, it’s actually very complicated to trace back in time to recreate the runtime variables. Additionally there is the question of how far it should trace back in time. If you lost power for 10 hours, does it need to step back in time minute by minute for 10 hours to find if any program may have lasted till the time of the reboot? Keep in mind the controller is a low performance microcontroller. Doing this computation all the time will consume all the computation power and prevent it from carrying out other tasks like responding to web requests.
The preview can be done quickly because that’s a client side program, which means it runs on your phone or computer as a JavaScript program, and it only runs it once when you click on the preview button. Your phone and computer are much more powerful processors and so computing the preview is quite easy.
The idea of computing the preview once at reboot and just keep using it doesn’t work. Programs can be changed and edited at any time. The watering percentage can change dynamically at any time. There are all sorts of dynamic events like zones stopped by rain sensors, manually stopped, paused etc. You may think your solution can fix one issue but likely it will result in multiple other issues that you may not have thought about.
Above all, if you have frequent power loss, couldn’t you address that issue directly by installing a UPS?
April 23, 2025 at 7:31 pm #82004
robohackParticipantSorry, but using a UPS is an extremely unreasonable suggestion!
The controller is mounted in a weatherproof box on the outside of a building using a pre-installed outdoor socket — there’s certainly no room for a UPS in that box and no cheap or easy way to connect one at the breaker box either.
Even if the power only went out once a week it would be critical here — I have a minimum of 21 hours of total program run time every day over 32 zones and losing any significant part of a day’s watering in some of those zones can have a significant adverse affect on the plants being cared for. A UPS doesn’t even solve the whole problem — I would also use a manual reboot to restart the system after doing any maintenance, or, e.g. mowing.
Both of the old controllers I’m replacing, one an Irritol Systems 24-zone unit for example, will restart their programs at the current time of day, even if they’ve been off and then turned on. Normally they only restart at the next zone’s start time, of course, not at the zone that should be running at the current time, but they’re much simpler microcontrollers with their firmware frozen in ROM and unmodifiable.
However I still need a reliable controller that “fails safely” in a basic engineering sense — which in this case means it only stops watering for the time the power is out (and maybe up until the time the next programmed zone should start). Even a manual reboot shouldn’t leave me with having to manually configure watering for the rest of the day — this is a computer that’s already supposed to be able to figure out and manage such things!
To me this is a critical feature that I’m stunned wasn’t included from the get-go, especially since existing commercial timers have been doing it for decades. Anyone replacing almost any existing controller will most certainly expect this!
Note that it’s not obvious to a user that the “Preview Programs” the web page isn’t produced on the controller — but either way that’s not important — I just thought it would be an obvious solution since it already seemed to exist already in software and it shows exactly where the execution should continue from. In any case I didn’t mean to keep using the preview — I just meant to use it to find where the current state should be, then to continue on as normal from there.
How about instead just look through the list of program start times, find the ones that should have started “today” (i.e. since the previous midnight), run through all the zones in those program(s) until their elapsed time matches the current time, turn on the zone that should currently be active and run any remaining time for it (or like the old controllers, wait for the next zone that should start, at the time it should start), then continue on with the active program(s) as if the controller had been actually been rebooted just before midnight?
Just do this on reboot, or perhaps if there’s a manual request to do it through the web API, though the primary concern is after any reboot.
None of the other issues are important — only future events need be dealt with, and they should be handled in exactly the same way as if the controller had always been running and a program had started at the actual start time but was otherwise unaffected by any dynamic or user-driven events. Any dynamic events that might have actually occurred between midnight and the current time can be ignored as if they never happened — all it needs to do is “fail safely” on reboot so that it continues on running any stored program(s) from the current time of day.
April 23, 2025 at 7:48 pm #82005
RayKeymasterThe existing commercial controllers from decades ago use extremely simple programs, they don’t account for dynamic events, the programs don’t overlap with each other, most of them also don’t pull weather data online to determine the dynamic water time. For those kind of simple programs, it’s certainly possible to do a simple look up to figure out what program should be running at any given time.
If you have long watering sessions, you can break them into smaller intervals using the ‘repeat every’ feature available in the programs. For example, instead of watering for a continuously long 12 hour session, set it to water 15 minutes at a time and repeat 48 times. This way, if the controller reboots in between, it at most loses a 15 minute session but the next repeat cycle it will run again. The user manual specifically mentions this ‘repeat’ feature as a way to break down long water sessions into smaller blocks.
Above all, the entire project is open-source. If you feel one feature is missing and needs to be improved, why not modify the code to implement it yourself? You can do it in anyway you want, and don’t have to wait for us to implement it for you.
April 23, 2025 at 11:40 pm #82008
robohackParticipantSo, Ray, I don’t think you’ve understood the magnitude of the problem for me (and perhaps others) when the controller doesn’t fail-safely.
I live in a semiarid desert and most of my ground is essentially gravel with a thin layer of topsoil, but it’s orchard and vineyard country and we have pretty good water sources (Lake Okanagan, for one, plus reservoirs up in the mountains) so we try to grow things on it anyway.
As I said I have 32 zones currently and during average weather conditions I have a total run time of 21 hours. That means during dry months I have room for about 112% watering budget expansion — which would take me to a teeny bit over 24 hours. Last time it was over 40°C every day for a few days I did run 24×7.
I can’t run any zones simultaneously because most of them max out the capacity of my system for water delivery.
I can’t run zones for just a few minutes — no water would get into the ground to the roots, it would all evaporate first. During the day I need to run some zones for upwards of 10 minutes before the area cools off enough for any water to be soaking in. I already have a few zones that only run for about 20 minutes. It’s obviously “wasteful” in absolute terms, but then again if we in this region were sensible there wouldn’t be an agriculture here except in the very bottom flood-plain of the valley.
I might be able to split all the times in half and run the program repeating every 12 hours, but that would be the limit. However 12 hours lost watering is still not acceptable — it doesn’t leave room for maintenance and field/orchard/lawn work. It would also make it nearly impossible to avoid running some zones in high-traffic areas when there is activity in those areas (at least not without a lot more, and far more complex, programming features). Getting that kind of timing right is something you want the computer to do and not have to work it out manually — but OpenSprinkler doesn’t have enough programming features and controls to do it.
Asking someone with a complex system to run every zone multiple times a day just to work around the lack of fail-safe reboots is nearly as absurd as making a UPS a requirement for reliable fail-safe operation! Both are non-starters — entirely impractical.
When I say “fail safe”, I mean it in the sense of something like a life support system, which in fact it is, for plants. You don’t allow a life support system to sit inactive for up to 24 hours just because it rebooted at the most inopportune time. The system has to come back fully operational and running on schedule, no matter how long or short the downtime or when it occurs. The downtime is unavoidable, but what the system does on reboot is entirely within its ability to manage.
When I compared OpenSprinkler to the old controllers I was trying to convey the facts that: (a) this form of fail-safe operation is a very common long-standing feature that I would expect every modern controller to have; and (b) OpenSprinkler has a great deal more computing power and resources than those old junkers (I think – there is a microcontroller CPU in the Irritrol) so there’s no reason why it can’t _easily_ support this feature.
Furthermore, as I said, past dynamic events are irrelevant if they can’t trivially be accommodated. “fail safely” means simply do what the programming says to do as if the controller had been rebooted while nothing was running, say at midnight, and no dynamic events were received since then. If you’ve got room to store weather events or pause requests, etc. (with their arrival timestamps) such that they won’t be erased by a reboot, then, sure, take them into account when running the program forward to the current time of day, but otherwise they don’t matter as much as simply getting the program on track again. If I tell the system to pause while I do some maintenance and there’s a glitch causing a reboot before I finish that gets me all wet, well it’s not the end of the world. If I really don’t want to get wet at the wrong time, well I know where the power switch is, not to mention the master valve! And if it would come back alive when I rebooted it I wouldn’t worry about turning it off for maintenance work!
As for OpenSprinkler being open-source, well yes I know it is, but as you may recall what I said in the past: while I have considerable programming experience, including in low-level systems code, the OS firmware is written in a language I have little ability in, and absolutely zero interest in expending any effort in learning. So unless the feature is so trivial to implement that even an old C programmer could work it out in short order, I’m unlikely to be able to help with it. Also, if it’s that simple, well…. If I had been the designer of the system I wouldn’t think it would be a very difficult feature to implement, but there are aspects to the current design that I don’t fathom the reason for even from a user perspective, so my guess isn’t likely worth very much.
In any case, as I said, I’m still stunned and dismayed that OpenSprinkler didn’t have this long known feature from day one. The lack of this feature was certainly not obvious to me before I made the purchase and committed to changing my system over and I really didn’t expect it to be missing.
April 24, 2025 at 12:07 pm #82012
RayKeymasterWell, as I said, you are asking for something we don’t have at the moment, and something that’s not easy to add to the firmware. So either you use the features available to accommodate your need, or just throw away OpenSprinkler and find a product that fits your need. Look, if the feature was easy to add, we would have added it already, don’t you think?
Regardless, I think you are refusing to make creative use of features already available to address your need. For example, if you can’t let each zone run for a short amount of time and switch to another zone, you can create one program per zone. Have that program run just one zone, and use ‘repeat’ to break it into small sessions so if power is reset it loses just one small session. Because the entire program has only one zone, it will just continuously run that zone until it finishes all repeats. Create another program for the next zone and start at the appropriate time. There are creative ways to get what you need. But it seems you would rather want to complain about what’s missing than to leverage what’s already there to address your need.
And I don’t understand why UPS is not viable solution. I am not talking about a big box UPS — it can be as small as a USB power bank. Only the controller itself needs to be powered, not your solenoids. No matter how small your box is, I can’t imagine why it wouldn’t fit essentially a cell phone battery in it.
I have never hard of this definition of ‘fail-safe’ as you described.
Lastly, again, why not choose another product? If every other product has this essential feature you want, why spending so much time here complaining about OpenSprinkler? Don’t you want to find a product that does what you want, and move on?
April 24, 2025 at 1:31 pm #82013
robohackParticipantSorry, but it seems like you’re not paying attention to the full set of concerns I have and their implications.
I did already consider creating one program per zone (indeed I researched doing it that way back before you added the ability to sort the run order by zone name because you did already allow easy re-ordering of programs — I posted about doing this in these forums), but that doesn’t allow for easily managing total run time when the system is nearly maxed out at 21 hours. It would also be extremely tedious to configure and then make changes with 32 zones — the UI is already heavy on requiring many clicks per operation. And so until you added the sorting feature I was still looking for alternative systems. The sorting feature was the key one that brought me back to looking at OpenSprinkler.
I’m already maxed out in time restrictions — as-is I can only run each zone once per day and just long enough for that zone. I’m not currently running any zones more than once per day, yet my program requires a full 21 hours, and during the hottest times of the year it will require a full 24 hours. I’d go for even more time if I could increase the % watering budget beyond that limit, but, well, there are only so many hours in the day.
I cannot run zones for just a few minutes multiple times per day — I need to run zones for enough time to overcome evaporation and to deliver water that will soak in; and I need to run zones in high-traffic areas _only_ at times when nobody can be expected to be there. There are not enough features in the current OpenSprinkler zone programming to build in such scheduling with those kinds of restrictions. It’s not unimaginable, but now you are talking serious amounts of additional code, not to mention storage for the additional values representing such restrictions.
I’m also concerned about reboots when the system is unattended — it is critical that it not sit idle for any significant portion of the day no matter whether there’s a power failure or a crash.
As for your imaginary miniature UPS, well there are obviously no existing separate power supply connections for the controller CPU alone, and as far as I’m aware there’s no battery charge controller already in the OpenSprinkler, and while I’m not opposed to a little bit more hardware hacking, that’s not something that was advertised as necessary. But even a UPS doesn’t solve the problem of reboots, either from crashes, or from necessary maintenance downtime.
If you don’t understand how a life support system needs to work in order to fail safely, then I guess that explains why you didn’t take this essential feature from all other sprinkler controllers into account in the original design of OpenSprinkler. I thought I explained it in a clear and obvious way, but perhaps you don’t have the background engineering experience with working on critical systems that have such requirements. One more try: Pretend you’re on the moon and you’re using OpenSprinkler to control your CO₂ scrubbers and they have a similar cycling requirement as my watering system — the program is maxed out to 24×7 operation and there’s no room for any unscheduled downtime. If the controller reboots just after midnight and then remains idle without restarting the program that should be active for the next 24 hours, well, then you’ll die. Such a controller _must_ restart the running program at the point it should be at for the current time of day after any reboot for any reason. Obviously my trees and garden won’t die from one day’s less watering, but it will start to impact their health, and if the failure went on for a week during the hot season, well some plants would die and trees would be highly stressed.
You ask why I think you haven’t added this feature already. Well, beyond it now being clear that you don’t understand how critical control systems must behave in order to fail safely, I think you’re also over-thinking the problem. You kept referring to how dynamic events impact the schedule generated from a program, but you don’t seem to realize that such things are entirely unimportant in the bigger picture of just getting the machine back on track and working again automatically.
Why not choose another product? Well, I do like to support open source projects — if you look me up on GitHub you’ll find I already maintain a number of them. I have already looked at most other products that have the capacity we need, but they all lack the one feature you were actually easily able to add to OpenSprinkler — the ability to control the order of zone operation without having to re-wire things. OpenSprinkler has the capacity to handle all the zones I have and more with just the one controller (I’m replacing two independent controllers), and the price is quite reasonable. All these factors, plus the fact I couldn’t imagine anyone designing a system that wouldn’t restart a program after a reboot, made OpenSprinkler a very attractive looking solution. I didn’t realize this problem until I was testing my primary zone control program and I couldn’t even find a way to manually start it after a reboot.
So as a supporter of open source projects I’d rather help you understand how this issue impacts users of your product and help you figure out how to change it so that it can support this obvious feature. Being able to say that OpenSprinkler can fully support all of the features of traditional controllers and then some would help you, me, and everyone else better promote it as an easy no-brainer upgrade for existing systems. I alone could easily sell five or more people on buying it, and without any need for convincing if it had this feature. However without it being able to do this most simple but necessary thing as all existing controllers can do I wouldn’t expect very many people to want to use it when they have an existing controller that already runs reliably and unattended even with flaky power.
Let me ask you: Why are you so reluctant to add a feature that you’ve clearly already figured out the algorithms for? What exactly in the controller code makes you think this is going to be so difficult to do? Are you still hung up on trying to support previous dynamic events that might have arrived between program start and the reboot, and if so, why? Where would you start in looking at the code to add such a feature in the simplest way possible without taking into account dynamic events?
April 25, 2025 at 7:19 am #82022
benaParticipantIt sounds as though your watering needs are critical. Even if a UPS doesn’t solve all of the concerns you brought up, a well implemented system should include one to reduce the impact of sudden power losses on critical hardware.
There are small plug and play off the shelf products that should work as a UPS for a DC OpenSprinkler. No hacking required.
Search for this on Amazon:
Mini UPS Battery Backup 10400mAh 38.48Wh,Output USB 5V/2A and DC 12V/2AIs 7 inch x 4 inch too big for your enclosure?
April 25, 2025 at 1:28 pm #82026
robohackParticipantI don’t have a DC version — I’m replacing commercial Irritol controllers in a 24VAC system.
As I mentioned above there are clearly no existing separate power supply connections for the controller CPU alone (on the AC version), and as far as I’m aware there’s no battery charge controller already in the (AC) OpenSprinkler.
April 25, 2025 at 5:13 pm #82027
benaParticipantGotcha. Here is one for AC that is smaller than most:
SKE Compact Size 425VA/240W UPS Battery Backup & Surge Protector for Computer UPS Uninterruptible Power Supply UPS Phoenix VL425
11.7″D x 3″W x 6.7″HI’m not sure why you need separate power supply connections for the controller cpu or a battery charge controller.
Just plug in the 24v transformer into the UPS and it should keep OpenSprinkler on as well as provide power to open the valves when needed. It should help with short power outages. If you want protection from long power outages, you’ll need a much larger UPS.April 25, 2025 at 6:22 pm #82029
RayKeymaster1) By ‘dynamic’ I didn’t mean user-triggered dynamic events. I mean the scheduler works by dynamically arrange all programs / stations as they are encountered. It cannot be easily implemented as a static schedule like other controllers. As an example: OpenSprinkler allows multiple zones to run at the same time. Have you seen other sprinkler controllers that allow this? As one program runs, other programs / stations can start as well, and the scheduler will automatically handle them according to the sequential group flag. So what runs at the current moment is the result of a ‘dynamic’ set of programs / stations that started in the past.
With other controllers, since no two programs can run at the same time, it just scans through all programs, finds which one overlaps the current moment, and starts the program from there. It’s a lot simpler to implement. But this is not how OpenSprinkler works. Additionally, as I said, how far back do you have to start the scan? You could have a program that runs over multiple days. Is the firmware supposed to look back 7 days and check all programs that may start that far back and figure out maybe one of them would have run to the current moment?
Have you seen any other sprinkler controller that uses the concept of sequential group? Sure you may say you don’t run multiple zones at the same time, but many other users do. You may also say you don’t have programs that run over multiple days, but some other users do. If we implement a feature, we can’t do it in a way that work in some situations but not other situations. That would be an incomplete feature.
2) OpenSprinkler has a +5V terminal port, it can be used to power the controller. Find a 5V mini UPS and connect it between 5V and GND and that will keep it running. But it sounds like from your description that you must reboot the controller manually from time to time. I don’t know why, but if you have to do that, this solution won’t help you since it won’t prevent you from rebooting the controller manually.
3) Your example of the moon is super far fetched. If it was your application, you would need to find a NASA-approved equipment. Obviously OpenSprinkler is not NASA-approved, nor FDA-approved either. I can’t help if you need something so mission critical. That’s not our focus. I can’t help if your setup entails multiple reboots / power breaks on a daily basis. This is not our focus.
4) I will say this again: you are asking for something that we don’t have and don’t offer. So either implement it yourself, or find another product that works for you and move on. Spending time here complaining and being angry doesn’t help. It’s like you go to a restaurant and complain that the way they cooked lasagna is wrong. Well, you know that, that’s how they do it. If you don’t like it, go somewhere else and move on.
April 25, 2025 at 7:28 pm #82032
robohackParticipantThat’s pretty big UPS for an outdoor enclosure — sure large enclosures are available, but the best UV resistant one I can find that would fit everything with a UPS is US$350, plus shipping, so that’s about CA$400.
So, that’s still an absurd solution to the real problem of just handling reboots properly.
April 25, 2025 at 10:25 pm #82034
robohackParticipantBTW, if you have room in non-volatile storage then you can keep a regularly updated timestamp there, and maybe also the current program(s) state too, then you’ll know exactly when to restart the simulation after a reboot.
April 26, 2025 at 10:27 am #82036
RayKeymasterStoring run-time in non-volatile memory doesn’t help: 1) flash memories have a limited amount of write cycles. If you write too frequently, like once every few seconds, it will prematurely fail; 2) even if you can write the current run-time into the non-volatile memory, it won’t help in the situation you have a long power break, and a program that would start during the power break won’t have any run-time data generated yet. So the power is back, and the program that didn’t start during the power break won’t start anyways since there wasn’t any run-time data generated for it.
Since other controllers all have this feature you need but are missing the sorting feature, why not go bug them and demand that they implement the sorting feature, then your problem is gone. Convince them that sorting is such a critical feature that it’s insane they haven’t done it yet, and I am sure they will do it for you.
April 26, 2025 at 2:05 pm #82042
benaParticipantOk, this UPS specifically has 5v output so you can wire it to the +5V terminal port that Ray mentioned above.
It is 6.3 x 1.3 x 4.1 inches
Mini UPS Battery Backup for Routers,Built-in 10400mAh Rechargeable Surge Protector with POE,Output USB 5V/2A DC 5V/9V/12V 2A for Modem,Security Camera, Smartphones (Black)
For your reboot issues, I would implement a Production Freeze type policy similar to critical manufacturing systems. Since your watering is so critical, no one should make changes or reboot the controller while any program is running. No exceptions! This is a standard practice in critical industries. Even if the system can “fail safe”, why risk it?
Then, adjust your watering programs to have short (5-10 minute) maintenance windows either once or twice a day that is most convenient for you. Then you should make all controller changes and reboots during this time.This of course doesn’t get what you want, but it does make it work with what the controller can currently do.
April 26, 2025 at 2:33 pm #82043
robohackParticipantYou still need to do the simulation!
The last known good timestamp in NVRAM would just allow you to more easily calculate the exact start time for the simulation run — it would be the start time of the longest running program before the last timestamp.
But, yes, as you say if the NVRAM can’t handle too many writes, then it can’t be used for such a timestamp, even if it’s only once per minute.
So, the easy and sure good time to start the simulation is just before two runs of the longest running program. The simulation will have to run through more steps, but it will be impossible for it to miss scheduling any programs that would have been running at the reboot time or started during the downtime.
You probably know very well how futile it would be to try to convince any commercial controller manufacturer to change their feature set in any way no matter how interesting or valuable such a proposal might be — they’ve designed their firmware as much as a decade ago or more and have planned it to run unchanged in their product line for as many years to come as they can possibly manage while still making enough sales to justify manufacturing. Even most of the WiFi connected ones are not yet offering OTA updates so far as I know. There may be a kickstarter project or similar startup that’ll try do better, but if they try to go head to head with the big guys without also being open source, well they’ll die. An open source project like OpenSprinkler is the only niche where one can hope for a more proactive approach to firmware upgrades with new features and fixes.
If you’re doing well enough now in ongoing sales to keep supporting the project, imagine how much better you might do by being able to offer additional key features that the commercial controllers already offer. I’ve found in software-only open source projects that word-of-mouth is the primary driver for increasing user counts. You already support OTA updates, and if you can reach out to existing customers, help them update their firmware, then I’m sure you can get most of them to convince at least one of their neighbours to buy a unit as well. As is though the people I’ve talked to would be unwilling to give up their current controllers for one that can’t maintain operation for up to 24 hours after an unattended reboot, no matter how clunky and old their current controller is. I’m obviously not the best sales person when I point out a flaw in the product I’m trying to sell, but what else can you do when you know about such a problem?
April 27, 2025 at 1:27 pm #82053
robohackParticipantThank’s for the UPS suggestion — though there’s no link, though I can find something that seems to match on Amazon.ca. I don’t know if it will fit, though it might. Having to hack into the OpenSprinkler case and find the 5vdc pads is annoying though. How do I know that a slight voltage difference won’t cause problems between the UPS and the built-in power supply? Is there already a protection circuit? There are too many unknowns to make me comfortable with this.
As for change freezes during production, well, yes, that’s what I will do, basically. The “pause” feature will work for some maintenance needs, provided the total runtime isn’t approaching 24 hours due to % watering budget compensation for the hot season. The ability to cancel zones without changing the schedule of following zones will also be used for maintenance and working in areas without getting soaked.
However having to wait 24 hours or more for a new zone to work, for example, is also rather annoying to say the least.
I.e. the same feature needed to recover after a reboot could also be used to rebuild the schedule after a program change, i.e. without having to wait until the next day or whenever the program restarts. I should be able to add a new zone to a program, or change the ordering (by changing the zone names), and have the schedule immediately reflect those changes.
Fail safe recovery into operating mode is still required for crashes too — unless you can somehow give me a mythical guarantee that the firmware will never ever crash!
April 28, 2025 at 4:46 pm #82071
benaParticipantI specifically didn’t provide a link as sometimes that blocks a comment from being posted on some forums.
but if you paste the the product title into amazon us, it should show the one I was referencing:
Mini UPS Battery Backup for Routers,Built-in 10400mAh Rechargeable Surge Protector with POE,Output USB 5V/2A DC 5V/9V/12V 2A for Modem,Security Camera, Smartphones (Black)
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Some issues and question