Category

Wimoweh

Future of AudioSwitcher and Wimoweh

By | Audioswitcher, Blog, Test and Demo Versions, Wimoweh | 5 Comments

There’s been a distinct lack of development for Wimoweh and AudioSwitcher over the past couple of months for two main reasons.

Firstly, I’m working on a new knowledge management tool which is taking up a considerable amount of time but will be available for testing in early August.  If you’re interested or just curious and would like to be part of a closed beta group then PM me: @serialangels.

Secondly I’ve decided to rewrite both Wimoweh and AudioSwitcher:

i) To take advantage of Swift, Apples excellent new development language which makes development much more straightforward.  I use it almost exclusively for macOS and iOS development now and it greatly simplifies the maintenance and design of AS and Wimoweh.  Both AudioSwitcher and Wimoweh have changed massively over the past couple of years and it’s fair to say that their design and organisation has been organic, i.e, unplanned and slightly chaotic.

Old Wimoweh Screenshot

NSMenu: The way we were,

ii) Because of  need to leave the App Store. Both AS and Wimoweh are facing a real problem in that the technical restrictions imposed by the App Store are limiting the implementation of new features.  For these applications to continue to be useful and provide new features means taking both of them out of the App Store in the short term.  From a non technical standpoint my ability to provide support via the App Store is virtually non existent.

I started porting Wimoweh over to Swift this morning and within a few hours have the basic framework up – I’ve been able to shed dozens of lines of code and have a much cleaner project.  Follow on twitter for further updates.

Wimoweh 1.1.56

By | Test and Demo Versions, Wimoweh

Superseded

This is a test version of Wimoweh – you only want to download this version if you’re interested in helping test new features or want a demo version.

This version is valid for 7 days from the first time it is run.

  • Plex support will now detect if Plex is playing media rather than just running – this allows your machine to sleep after Plex has finished running. This also works with remote plex machines
  • Dark Mode Fixes
  • Various updates to move away from deprecated functions

Wimoweh 1.1.54 BETA

By | Test and Demo Versions, Wimoweh

Wimoweh.1.1.54

This is a test version of Wimoweh – you only want to download this version if you’re interested in helping test new features or want a demo version.

This version is valid for 7 days from the first time it is run.

  • Allow a delay when moving assertions, useful for Plex transcoders

Wimoweh Manual

By | Wimoweh

Control when your Mac sleeps as well as having a detailed view of which apps and are preventing sleep.  Keep your Mac awake on a schedule, using a timer or based on how busy your computer is.  You can even keep your Mac awake dependant on whether another computer is on and running a certain service! Wimoweh gives you complete control over your Mac’s sleep!

 

Using Wimoweh

Main Window

Screen Shot 2015-06-30 at 14.36.40

Wimoweh’s main window provides both an overview of system’s current power situation as well a quick and and easy way to choose when your Mac will sleep.

Current Processes

The top left pane shows the programs currently running on your Mac.  By default this list shows applications with windows that appear on the desktop. If you want to be able to see every process (system daemons etc) then check the box marked Show all Processes.

There are 5 columns in this pane:

Icon: The icon (if any) associted with the application – this can help you quickly locate the program you’re looking for

Name: The name of the application

PID: The Process ID, this is the unique number that OS X uses to keep track of each program running on the system.  For example, if you had two copies of the same program running their PIDs would be different.  This allows you to make sure you’re choosing the correct program.

Never Sleep: Ticking this checkbox tells Wimoweh to prevent your Mac from sleeping whenever this program is running.

Display Sleep: This tick box is enable only when Never Sleep has been checked.  This option keeps your Mac awake but allow the display to sleep which saves energy and can be less distracting when running at night.

 

Current Network Services

This pane shows all the computers on your local network that are advertising services using the Bonjour Service used by OS X and iOS as well as many Linux and (some) Windows computers.  You might want your Mac to stay awake not just when something is running on it (locally) but also when another computer is running a particualr program or providing a service.  For example, you might want your Mac to stay awake whenever your network aware TV is or media player is on.   There are three columns here:

Host: Each computer or device on your network has a name associated with it to make it easier to identify.  This is sometimes known as the the hostname.  Each computer or host may have several services.

Service: A service, as far as Wimoweh is concerned, is a type of program that provides some kind of functionality that might be useful over a network.  File  sharing, media servers and the sshd system are examples of services.

Stay Awake: Ticking this box will keep your Mac awake whenever the service is available on the network.

No Sleep if Average CPU >  X%

Wimoweh can stay awake if it detects that your system is busy.  Every few seconds Wimoweh checks to see how busy the processor (CPU) in your Mac is and if it exceeds a user defined percentage over a user defined period of time then Wimoweh can keep your Mac awake.

This can be a useful alternative to the Current Processes pane if you have a job that will take an unknown period of time to complete but you’d like your Mac to sleep afterwards even if the program is still running.  Ripping and encoding programs are good examples of this type of job.

Checking the tick box enables two sliders, the first alters the average % usage the processor – 0% is idle and 100% is fully utilised.   The second slider alters the period of time we’re interested in, from one minute to one hour.

You can also see the current average CPU usage over time here as well.

Current Power Assertions

This bottom pane provides an overview of all the programs on your Mac that are currently making demands on the OS X power system.

Assertion is the name that Apple use to describe these demands.  The concept is perhaps best explained with an example.

Imagine that you have written a program that converts music files from one format to another.  If the user has selected 100 files then it might take some time to complete the conversion – it would be a bad experience for the user if they set the conversion running, went and made cup of tea and came back to find that in the meantime their Mac had gone to sleep and not completed the job or aborted partway through.

As a good programmer you might want to prevent the Mac from sleeping to allow your job to complete.  Historically this has been difficult for a number of technical reasons but the Assertion model makes it easy from a programmer’s perspective.  Rather than have to understand and fiddle with the Mac’ sleep subsystem you simple create an Assertion which effectively says to OS X ‘my program is currently doing some useful work, if it’s OK then don’t sleep until I remove the assertion’.  Once our conversion job is finished we ask OS X to remove the assertion.  You’ll note that we say to OS X ‘if it’s OK’ – ultimately OS X retains full control over when sleep happens and will always override applications if it needs to if, for example, the battery runs out, the lid of a portable is closed or the intriguing ‘unplanned thermal events’.

There are five columns used to describe assertions:

Application: The name of the application that created the assertion.  Some of these might not be immediately recognisable to you as they are system processes that handle things to do with hardware or network services.

Any application you tick in Current Processes will appear here.

You’ll often see Wimoweh listed here as we create assertions for network services, timers etc.

Assertion Name: This is the name associated with the assertion – the format varies as it’s set by the application programmer.  Apple stuff normally follows the  com.apple.subsystem.interesting.things pattern as does Wimoweh.  If the programmer didn’t put anything here we’ll indicate that.

Reason: This is another application provided field which (should / normally ) provides details as to why the assertion was created, for example, ‘Playing Music’, ‘Converting files’.  If this isn’t provided we’ll say so here

Detail: Another application provided field which normally provides a little extra detail about the assertion.  If this isn’t provided we’ll say so here

Type: This column shows which type of assertion this is – UserIsActive is used when for example keyboard and mouse movement is detected.

Snow Leopard Support

By | Audioswitcher, Wimoweh

I occasionally get e-mails asking why AudioSwitcher and Wimoweh require OS X 10.7. The main technical reason is to do with the user interface, specifically the ‘popup’ type effect which is dependant on features introduced in OS X 10.7.

The major reason beyond that is my time and effort in maintaining two differing versions – as such I’d like to take quick poll to see how many people would be interested in a 10.6 version.  I’ll let it run for a month or so and see if we can get more than 100 ‘YES’ votes

[poll id=”8″]

Wimoweh FAQs

By | Wimoweh
[accordion accordion_type=’accordion’] [accordion_item caption=”How does Wimoweh work?” title_color=” plus_minus=’grey’]

Wimoweh uses IOPM to create assertions on behalf of other applications.  Instead of an application telling OS X that its busy and not to sleep Wimoweh makes the request on the applications behalf and keeps a track of them.

[/accordion_item] [accordion_item caption=”What’s an assertion?” title_color=” plus_minus=’grey’]

It’s Apple terminology for a request or more accurately a hint to OS X that a particular process is busy doing some useful work and, if possible, the computer should not enter a sleep state.

 

[/accordion_item] [accordion_item caption=”Accordion 3″ title_color=” plus_minus=’grey’]

This is some content

[/accordion_item] [/accordion]

 

 

3. Can Wimoweh stop my (portable) Mac from going to sleep when I close the lid?

No.

4. But <application> does it? Can Wimoweh do that too?

OK, so it’s technically possible but you probably don’t want Wimoweh to do it for two reasons.

i. The methods to do this are quite sophisticated and are not really recommended by Apple.  They tend to operate in-kernel (Wimoweh is user space) and the complexity involved in the implementation make these kinds of applications difficult to support as well as difficult to develop.  You’d want somebody with a good understanding of the OS X kernel and the time to keep the app up to date with new point releases of OS X  and that, unfortunately, is not me.

ii. There’s a reason that Apple don’t expose that kind of functionally to developers without making them jump through hoops.  They presumably do not want to deal with warranty claims when your $2000 Macbook Pro melts itself into plastic slag because a badly behaved application kept the core(s) at 100% overnight.  I certainly wouldn’t want to deal with the feedback.

Also I don’t own a portable Mac but I’m sure if someone was to send me one I’d change my position.

5. Shouldn’t Applications / OS X  being doing this already?

Yes they absolutely should.  I first wrote Wimoweh to scratch an itch – I was fed up of coming back to find that my machine had gone to sleep when it should have been ripping a disc or encoding a file.  As newer versions of OS X have made power management at the application level easier the problem should lessen.  Handbrake  for example now creates assertions when it’s working.

If you’re using Wimoweh to stop the system sleeping to handle one specific app it might be worth asking the developer to check out IOPMAssertionCreateWithDescription  in Apple’s developer documentation.  In just a few lines of code they can have their application inform OS X when the application is busy and then you, in the best possible way, will no longer need to use Wimoweh.

That being  said Wimoweh makes it easy to do this kind of power management in one place and is particularly useful for command line, Java or Web applications that do not have visibility of OS X’s power management interfaces.

6. Why don’t the icon colours or the lists of processes always change immediately?

Because Wimoweh is lazy and in this case laziness is a good thing.  Wimoweh uses a timer to update it’s various lists and icons but it leaves the exact timing up to the system.  More recent versions of OS X use a technique known as timer coalescing to bunch up timers in an attempt to save energy; this means that sometimes there are apparent delays in updates.

7. Why don’t my icon colours change?  / Why doesn’t Wimoweh remember my preferences?

i) Make sure Wimoweh is in /Applications

ii) Double check permissions on /Applications/Wimoweh.app they should be readable and executable for your user

iii) Try manually removing the preferences file using the command line:

rm -f $HOME/Library/Preferences/uk.co.serialangels.Wimoweh.plist

Or in Finder –  use  ⇧⌘G to ‘Go to folder’

~/Library/Preferences  N.B enter the tilde character to reference your home directory and delete the uk.co.serialangels.Wimoweh.plist file.

If that doesn’t work or the above files do no exist then please e-mail feedback@serialangels.co.uk with a copy of your logs

8. Why are stable versions only available on the Mac App Store (MAS)?

i) Bandwidth costs me real money.  The total donations to the site in the whole of 2013 covered 2 weeks of hosting costs.  Now I’m clearly not in this for the money but having Apple servers do the heavy lifting is a big saving both financially and technically.

ii) For better or for worse the App Store is a great Shop Window: The number of people who download my apps from the App Store exceed all of the other sources combined by a factor of twenty.

iii) Support: There are technical differences between even apps which are identical in functionality when they’re packaged for the App Store.  Around half the support requests I deal with have arisen as a direct result of these differences.  Having just one download source reduces those problems.

9. Why is it called Wimoweh?

‘The Lion Sleeps Tonight’ geddit?

9.1 But does it still work with Mavericks?

The app does, the pun is no longer compatible

 

Got a question? E-mail us at feedback@serialangels.co.uk