Timeres not activated after power outage

Functionality and usage of the OpenNethome Server
lassiko
Posts: 25
Joined: Tue Dec 30, 2014 11:57 am

Re: Timeres not activated after power outage

Post by lassiko »

stefangsbb wrote:Oops - that is a bug... It should really save and restore the disabled state. I will fix that.
Thanks! Let me know when it is implemented and i will upgrade my OpenNethome.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Timeres not activated after power outage

Post by stefangsbb »

Ok, fixed it. It is in the nightly build.
lassiko
Posts: 25
Joined: Tue Dec 30, 2014 11:57 am

Re: Timeres not activated after power outage

Post by lassiko »

Hi Stefan,

Just upgraded the nighly build. After openenethome booted up, i disabled the items and rebooted (sudo shutdown -r now) the RPi.
After RPi and nethome booted up again, those items were again enabled.

I also tried with sudo /etc/init.d/nethome stop and then sudo /etc/init.d/nethome start and also after that, items were in enabled state.

I am running version:
**Starting HomeManager 2.1-SNAPSHOT-bc7d0**

Any advice's? Thank you!
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Timeres not activated after power outage

Post by stefangsbb »

Well, it is a bit more complicated... The states of the Items are only saved directly when you actually edit an Item and then press save. Apart from that, all Items are automatically saved once every hour. I don't want to save them too often, as this will wear down the flash cards too fast on a Raspberry Pi.

I could make this auto save period configurable if you want to have them saved more often. Also, if you know you want to save the Items at a specific time, you can call the "SaveItems"-method in the "Event Broker"-Item. You can also reach this manually on the settings tab.
lassiko
Posts: 25
Joined: Tue Dec 30, 2014 11:57 am

Re: Timeres not activated after power outage

Post by lassiko »

Items i am talking about here are all the time in disabled mode. Those are motion sensors which should be in enabled mode only when i enable those manually, which is very rarely.

I also used "save items" option from settings and then restarted opennethome. Again when it booted up, those were enabled.
Maybe this is my config issue in someway?
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Timeres not activated after power outage

Post by Nasty76 »

Hhhhm I see little bug there , ok I go my motion sensor , click disable and save item , now I see my homeitem.xml I see Somemotion disabled.
ok this look good motion is in config file disable state. but when start nethome motion sensor show enabled , still config file say that item is disabled state. not sure if this is permanent solution , I use that my demo server to test that.
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Timeres not activated after power outage

Post by stefangsbb »

Ok, this was a bit embarrassing... I had made the change and tested it - but... I had failed to commit the change to GitHub, so it was not in the nightly build. I have done that now, and I tested to download from nightly build and it worked. So it should be ok now.
lassiko
Posts: 25
Joined: Tue Dec 30, 2014 11:57 am

Re: Timeres not activated after power outage

Post by lassiko »

stefangsbb wrote:Ok, this was a bit embarrassing... I had made the change and tested it - but... I had failed to commit the change to GitHub, so it was not in the nightly build. I have done that now, and I tested to download from nightly build and it worked. So it should be ok now.
Working now! Thanks!
Post Reply