This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed

Shutdown option

Fire69Fire69 Member
edited February 2016 in Archive
Would it be possible to also add a Shutdown option in the Stuff for Geeks?
I don't like pulling the plug on running devices that have a filesystem :)

Comments

  • +1
  • WeatherlightWeatherlight Member
    edited February 2016
    Agreed, as i'm waiting on my pre-order geek, it would not be bad to have such option(s) available... Since it is a live filesystem... So +1 smile 
  • Doesn't the reboot button does the same? Only it also performs a start command.
    When you unplug the cable you physically remove the power and thereby empty some registers/memory which won't be emptied by a software command.
  • And when exactly is it safe to unplug it? 
    When you restart and unplug it too soon or too late, that would be the same as unplugging it when it's running. Possibly that might even be worse... 
  • BumblezBumblez Member
    edited February 2016
    Doesn't Homey have some kind of 'safe shutdown' (battery?) built in, to ensure that it always powers off safely when the power is interrupted? As the user may not always be in control of when that happens...
  • It's a small computer, just like an Rpi or similar. It's pretty rare to have a built-in battery for such devices. 
  • BumblezBumblez Member
    edited February 2016
    Well, there are quite a few options for this available for the Rpi (fairly inexpensive), and with a device like Homey, I'd expect the developers to see the need for something like that themselves... after all, you don't want to lose everything that's in Homey's memory (on Homey's disk) when there is an unexpected power failure, right?
  • Is there any important data in its working memory which can be lost? Everything important will be written to the permanent storage I presume? Everything else can be regenerated by apps or cloud services.

    Or am I missing something?
  • Crunch said:
     Everything important will be written to the permanent storage I presume? 
    What if it's writing when you pull the plug?  ;)
  • Fire69 said:
    Crunch said:
     Everything important will be written to the permanent storage I presume? 
    What if it's writing when you pull the plug?  ;)
    You lose a few minutes of data, max :blush: 
  • I don't know what filesystem Homey uses, but I guess there's always a risk of corruption when you interrupt a write action.
  • +1  And the reboot button does not have the same result. If I reboot my Homey my 433 Tranceiver doesn't work anymore. I then need to powercycle my Homey. It still works but I would prefer a powerdown first to be sure the filesystem is closed correctly before pulling the powercord.....
  • Perhaps it's possible to add some kind of a powerbank with dual usb between homey and your power socket? 1 usb keeps charging the powerbank and one usb keeps giving power to Homey.
  • Fire69Fire69 Member
    edited February 2016
    I tested a powerbank earlier this week. 
    I have a 10000mah model, Homey ran for 14 hours on it.  :)

    I'll have to test if you can charge it while a device is connected to it... 

    But that wasn't really my question. :) I would like to shut it down properly before unplugging it. 
  • Fire69 said:
    I tested a powerbank earlier this week. 
    I have a 10000mah model, Homey ran for 14 hours on it  :)

    I'll have to test if you can charge it while a device is connected to it... 
    I really would like to hear from your findings!  Sounds like a fine safety solution when someone accidently pulls the power cable out of the socket or with some power failure.
  • Unfortunately, my powerbank won't let me use and charge it at the same time  :(
  • Fire69 said:
    Unfortunately, my powerbank won't let me use and charge it at the same time  :(
    seen it more than once on powerbanks, 
    to charge or to be charged....
    but not concurrent. 
    Anyone who knows a Powerbank that supports that please stand up!
  • Fire69 said:
    Unfortunately, my powerbank won't let me use and charge it at the same time  :(
    Correct me if im wrong, but isnt it normale behavior of a battery that it's not able to do both at the same time? I always thought if you wanted to do both you need more batteries in your device...
  • A powerbank is more than a battery, 
    For the battery you are correct, the controller electronics should bypass while plugged, switch to battery when unplugged and the charger should provide enough power (current) to charge and feed the homey at the same time.
    With specified 2A max for USB devices I think it is possible but not much room for charging as with the ring on Homey uses approx. 1.1 A.
    I don't think a lot of powerbanks will support this. 
  • My powerbank has 3A output (if only 1 of the outputs is used).
    I disabled Homey's idle ledring, so it doesn't use much power actually :)

    It think it's just a protection for the battery because charging it continuously will shorten the lifespan a lot.
  • Fire69 said:
    Unfortunately, my powerbank won't let me use and charge it at the same time  :(
    seen it more than once on powerbanks, 
    to charge or to be charged....
    but not concurrent. 
    Anyone who knows a Powerbank that supports that please stand up!
    There are actually quite a few powerbanks that can do both at the same time. See for example this thread:
    https://www.raspberrypi.org/forums/viewtopic.php?f=45&t=13558

    Do make sure that the power supply that charges the powerbank, can provide power faster than the device that you're using it for consumes, though!
  • @Fire69 ;
    Just curious :smile: 
    10000mAh  = 10Ah
    Output = 5V (usb)
    So thats 50W for one hour.
    You say 14h on the bank; 50W/14h = 3.57Wh
    Which is almost the same figure as measured earlier for a Homey with ledring off.
    So the big question; did you had the ledring on or ff ?

    :smile: 
  • Nice calculations.  The ledring was indeed turned off.  ;)
  • Thanx and nice double check!

    I'm very(!) positive surprise about the low power consumption of Homey!! (I like low power devices :smile: )
  • MarcoF said:
    @Fire69 ;
    Just curious :smile: 
    10000mAh  = 10Ah
    Output = 5V (usb)
    So thats 50W for one hour.
    You say 14h on the bank; 50W/14h = 3.57Wh
    You mean 50 Wh power in the bank which leads to 50 Wh/14 h = 3,57 W I guess? ;)
  • Isn't much more important the next question: Can Homey always survive losing power when it's halfway writing a file or multiple files?  I think Athom should answer that first.

    Having said that: Technical background: There a filesystems which are automatically recovering from such a failure, using a rollback transaction log like system. If Homey also is designed that file-writes (even to multiple files, or storing in a single transactional DB is also an option) are done in an atomic transaction like way, and the file system itself is auto-recovering, then pulling the plug NEVER is a problem. There are many examples where this is 100% safely implemented. So BEFORE using all kinds of batteries to ensure this, I think Athom should comment on this. @Emile ;
    ?   (However, using batteries as a UPS to continu working, so not making a power interruption safe, is another purpose and might also be nice.)
  • this one will charge and discharge at the same time !!
    http://www.elv.de/power-bank-pc11200-11200-mah.html
  • Athomey said:
    Isn't much more important the next question: Can Homey always survive losing power when it's halfway writing a file or multiple files?  I think Athom should answer that first.

    Having said that: Technical background: There a filesystems which are automatically recovering from such a failure, using a rollback transaction log like system. If Homey also is designed that file-writes (even to multiple files, or storing in a single transactional DB is also an option) are done in an atomic transaction like way, and the file system itself is auto-recovering, then pulling the plug NEVER is a problem. There are many examples where this is 100% safely implemented. So BEFORE using all kinds of batteries to ensure this, I think Athom should comment on this. @Emile ;
    ?   (However, using batteries as a UPS to continu working, so not making a power interruption safe, is another purpose and might also be nice.)
    I know a little bit about journalling filesystems and stuff but still, I'd sleep better when I can shut it down properly  :p

    The test I did with the battery was just me being a geek.  When the power goes, my lights and stuff won't work either, so not much use for Homey anymore then. Unless it can detect the power outage, and warn me about it when I'm not at home  :)
  • AthomeyAthomey Member
    edited February 2016
    If it only could receive updates from sensors, then Homey could warn you some way. :wink:   Maybe even receiving it wirelessly!


  • MarcoF said:
    @Fire69 ;
    Just curious :smile: 
    10000mAh  = 10Ah
    Output = 5V (usb)
    So thats 50W for one hour.
    You say 14h on the bank; 50W/14h = 3.57Wh
    You mean 50 Wh power in the bank which leads to 50 Wh/14 h = 3,57 W I guess? ;)
    You are so right! 

    mixed up some things by writing out the "h" and copy/paste.... 

    So it should be;
    10000mAh  = 10Ah
    Output = 5V (usb)
    So thats 10Ah * 5V = 50Wh
    You say Homey ran 14h on the bank; 50Wh/14h = 3.57W power for Homey
    Thanx!
This discussion has been closed.