Coder Social home page Coder Social logo

Comments (8)

rgc99 avatar rgc99 commented on August 15, 2024

It is assumed that all switches are in the OFF state. It could be possible to set the entities to off or you could create an automation that does this on start up. Restoring the state is a little more complex than it seems as the zone could be part of a sequence or due to finish at a certain time. The bigger question is what about a catastrophic event like hardware or communication failure where it goes down and doesn't get back up anytime soon. This was touched upon in this issue #12. It would be good to have a broader discussion about this maybe even on the community forum https://community.home-assistant.io/t/irrigation-unlimited-integration/325468. It is applicable to any and all irrigation systems to consider these situations.

from irrigation_unlimited.

drthanwho avatar drthanwho commented on August 15, 2024

Yeah true I see your point. I have this integrated with ESPHOME so my plan is to implement some failsafes on the firmware itself to e.g. turn off relays on boot (since ESPHOME will autoreboot if it looses connection to the API so either HA is down or your WiFi is down). I need to also think about a failsafe if HA just restart while something is watering. It could be that I forget it's watering and I restart while changing something but it could also be it restarts itself rarely (a memory leak I can't pin point yet so autorestarts for now when RAM gets to >90%)

from irrigation_unlimited.

erikpendragon avatar erikpendragon commented on August 15, 2024

I just had this happen yesterday, well the day before is when it turned on, yesterday is when I noticed and manually turned it off.
I agree that some sort of check to realign the switch state and the integration state would be great.

from irrigation_unlimited.

Fox350 avatar Fox350 commented on August 15, 2024

I did write an automation to set all outputs off at home assistant shutdown and it is doing the job. But I would really appreciate a feature like asking to resume the irrigation after a restart. You really did a great job with that code and I encourage you to continue!

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

I am adding a turn off as the controller/zone is flagged by HA for removal. Simple enough to restore a single zone but a sequence needs more consideration.

from irrigation_unlimited.

stomko11 avatar stomko11 commented on August 15, 2024

Same just happened to me. I have 2 relays that water different zones, and are part of sequence. So whenever i restart HA while sequence is running, upon restart, irrigation is OFF and one of relays stays on and will water forever until turned off.
That means that this is desired behavior?

On top of it, I have 5 zones, 3 of them are intentionally off as I don't water lawn yet. When above condition happens, it turns irrigation OFF, but upon next toggle, all zones turn on (so I have to manually turn off 3 unneeded zones).

Even if I turned off irrigation upon graceful restart, it won't re-start the zone/sequence that was already running, right?

from irrigation_unlimited.

rgc99 avatar rgc99 commented on August 15, 2024

I am finishing some code started a while back to check, report and reset any switches/relays upon startup. This will set the switches to a known state. Should be available in the next release.

Zones that are disabled should be restored to their previous state. This looks more like how the service call has been made. Please provide your config and log entries from the integration, in particular the service call data.

Restoration of a running schedule has not been implemented. Perhaps in a future release.

You should consider some sort of hardware level deadman switch in the case of a catastrophic failure. If HA can't be restarted then the valves will be left open. This is an unfortunate feature of a lot of WiFi switches that simply respond to the last command received and remain in that state.

from irrigation_unlimited.

w32-blaster avatar w32-blaster commented on August 15, 2024

Just found this issue thread. I think a safe option would be to simply turn off everything when HA starts up. Its safer and it will make sure that switches will become synced with the irrigation state.

from irrigation_unlimited.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.