Simon extras

Dejal Simon is a powerful and flexible website & server monitoring tool. One of the reasons it is so flexible is that in addition to the many built-in services, filters, notifiers & reports, you can extend it by using or writing custom scripts (or port sessions).

Simon comes bundled with many examples of such scripts; check out the Services, Filters & Notifiers lists and look for the items with a “Script” subtitle. You can inspect and edit those to customize them to suit your needs, or use them as inspiration for your own.

As an additional resource, the Simon site has an Extras page, which lists several more scripts that customers have contributed over the years. Some of which have later been bundled with the app, but some are only available there.

If you create or modify a script that others might find useful, please share it! Send me an email with the script attached, along with a description, and I’ll be happy to add it to the Simon Extras page.

The Simon Extras page is organized by feature kind: Service Scripts, Filter Scripts, Notifier Scripts, Report Templates, and Other Goodies (including a way to add multiple tests, an extended siren sound, and a script to monitor a FTP site). There’s also info for developers on writing custom plugins.

Installing scripts is easy:

  1. Decompress the downloaded archive, if you browser didn’t do it for you;
  2. Launch Simon if not already running;
  3. Go to the Services or Notifiers list, as appropriate;
  4. Click the New toolbar button (or via the File menu);
  5. Choose the Service Kind (or Notifier Kind) button to show the service (or notifier) page.
  6. Choose the Script service/notifier kind, if not selected by default.
  7. Click the Open Script… button and choose the script file.

The script is copied into Simon, so there’s no need to keep the downloaded file around after loading it.

Where can I find more sounds for Time Out or Simon?

Time Out comes with a number of built-in sounds that you can play as part of the Break Actions, plus it lists all sounds you have installed on your Mac, which includes system default ones, and any you have added to the standard sound folders.

It’s worth noting that you can also have Time Out play any music from your Apple Music library, too.

Find more sounds

To add more sounds, you first need to find and download them from a website.

There are many sites that offer sounds of varying length, quality, themes, etc. Some for free, some as paid offerings. Usually with previews so you can listen before downloading.

Here are a few I’ve found; note that I don’t endorse or recommend any particular site; these are just ones I encountered in a brief search. If you’re aware of or find a better site, please post in the Reddit community to share with others.

Add the sounds

Once you have the new sounds, you can easily add them in one of the standard folders to make them available to all apps that can play sounds, or add them to the “Sounds” folder within the Time Out data folder to only make them available in Time Out.

The system sound folders you can add to are in the following paths (tip: you can paste these paths into the Finder’s Go ▶ Go to Folder… command to reveal them; if the folders don’t exist, you can create them):

  • /Library/Sounds — for sounds available to all users of your Mac.
  • ~/Library/Sounds — where “~” means your home folder.

(There is a third folder, at /System/Library/Sounds, but you shouldn’t modify that.)

On the other hand, Time Out’s sounds folder is at one of the following paths, depending on which edition of the app you have:

  • ~/Library/Group Containers/6Z7QW53WB6.com.dejal.timeout/Sounds — for the direct edition.
  • ~/Library/Group Containers/6Z7QW53WB6.com.dejal.timeout.free/Sounds — for the Mac App Store edition.
  • ~/Library/Group Containers/6Z7QW53WB6.com.dejal.timeout-setapp/Sounds — for the Setapp edition.

While you can use the Finder’s Go to Folder… command to access those, an easier way is to choose Reveal Scripts from the Add Action drop-down menu. That will show the Scripts folder, which is adjacent to the Sounds folder. (I do want to make this even easier in a future update.)

Simon is much the same, except will just look in the standard folders.

I hope this has been helpful!

Does Time Out have a lifetime purchase option?

In ye olde days, software was sold once, for what would be considered nowadays to be a high price, and every year or so the developer would release a major paid upgrade, typically charging about half of the original price.

I still do this for Simon, my pro tool to monitor websites and servers for changes or failures, since that model is still common for pro apps. Though it is also available on Setapp, as part of a subscription along with hundreds of other apps.

But for Time Out, my popular break reminder app, I wanted to try something different. I introduced a “supporter” model, where people can get the main features completely free, but be rewarded for supporting ongoing development with extra features.

Unlike old-school purchases, the supporter purchases are much cheaper, only a few bucks, and for a specific period of time, 3, 6, or 12 months. The extra features can be tried for an hour at a time, or are unlocked permanently with any supporter level. The “catch”, such as it is, is that when I update the app, I may add new features that are only available to current supporters, so if your support has expired, you won’t get those features unless you renew your support. Of course, you can try them, to help decide if you want to renew.

That seems really fair to me; you can have breaks for free, or get extra features cheaply, and if you like my improvements, you can help pay for their development. Or continue using the older features forever without paying more.

Win/win — you get a useful app that is regularly improved, and I get to eat. I also don’t have to hold back major features for a big paid upgrade; I can add things whenever desired.

Even so, I occasionally get people asking about a lifetime purchase option. I don’t currently offer that, since I feel it would be detrimental to the long-term survival of the app. However, you can effectively make your own lifetime option, by purchasing multiple 12-month supporter statuses. Each one you purchase will extend your supporter status by a year. So if you envision using Time Out for the next 5 years, purchasing 5 times will extend your support that long. Or whatever duration you want to use.

Of course, it’s worth reiterating that you don’t have to pay more than once if you don’t want to. You can become a supporter at whatever level you feel comfortable with, and not pay again unless you want to show your appreciation (kinda like a tip jar). After your supporter status expires, all of the advanced features that you had when you were a supporter will remain available permanently. You’d only need to renew if I add new features in the future that you want to use.

How can I change the order of filters in Simon?

The Simon app has pages for filters, notifiers, reports and auto pause times while editing a test. These can be reordered very easily, by dragging them to the desired order.

The order really only matters for filters, since subsequent filters can refer to the output of previous ones, though others might look better in a custom order.

Simply click and drag anywhere outside a control to move a filter etc to a new position.

Here’s a looping video example:

Simon tip: check notifiers

I’ve had a couple of queries about checking if a notifier is working, so that seemed like a good blog topic.

Simon is a powerful app. One of its many features is the ability to create custom notifiers, the mechanism for informing you of changes or failures on the tests. Naturally, when you configure a new notifier, or edit an existing one, you want to make sure that it is set up correctly.

This can be done very easily. When showing the Notifiers list, you can simply select the notifier you want to check (as you probably already have if you’re editing one), and click the Reload button in the toolbar, or choose the File ▸ Notify Now menu command.

The selected notifier will then be used, just like when used with a test, except that placeholder values will be used for any variables (since there isn’t a test in this case).

For example, here’s a Notification Center notification, showing placeholder values:

Notification

The importance of a good backup strategy

I received a support email from a Simon customer who had a hard drive failure, and lost their data. Worse still, they were in the process of recreating their Time Machine backup at the time, so didn’t have a backup.

That prompted me to post about my backup strategy. When you live your life and make your living on computers, there is little more valuable than the data they contain. So it is critical to protect it from a loss that could set you back years.

Fortunately nowadays most important data is in the cloud… various remote servers. For example, if you use Apple Music, your music collection is safely on Apple’s servers (well, hopefully safely). Similarly for Apple Photos, and other iCloud services. And other services like Dropbox help protect important documents… if you put them in there.

For myself, I have a multi-pronged data management and backup strategy.

In terms of data management, I use cloud services to sync my data between my devices, which has the added benefit of keeping offsite copies of the important data:

  • My documents are all stored in Dropbox.
  • My app source code is managed by GitHub.
  • My music, photos and other data are stored in iCloud.

In fact, I replaced the Documents folder in my home directory with a symbolic link to a Documents folder within the Dropbox folder, so all of my documents are safely in Dropbox. It’s not necessary, but you can easily do this via a couple of simple Terminal commands: 

sudo mv ~/Documents ~/Dropbox/Documents

sudo ln -s ~/Dropbox/Documents ~/Documents

The first command moves the Documents folder to within Dropbox, and the second one makes a symbolic link to that folder where the old Documents folder was. The sudo is needed as the OS will normally prevent moving the Documents folder; Terminal will prompt you for your password.

But that doesn’t mean that backups aren’t important too. Backups are useful to get back earlier versions of documents (via Time Machine), or provide redundancy in case a cloud service loses something, or just as a quick way to get back up-and-running. Plus, of course, protecting data like settings that aren’t included in Dropbox or other cloud syncing.

I use multiple services for backups, too:

  • I use Time Machine to do hourly incremental backups of the most important files. Useful to get back earlier versions of documents.
  • I use Carbon Copy Cloner to make nightly exact clones of my SSD main drive and spinning media drive onto backup disks. Useful to quickly get back up-to-speed if a hard drive fails, or I need to revert an obscure file.
  • I use Backblaze to make nightly offsite backups of pretty much all of my files. Useful in case of a major disaster like my house burning down, or failure of one of the other backups.

(Full disclosure, if you use the Dropbox link to sign up I’ll get more space, not that I need it, and you’ll get 500 MB bonus space. And similarly that Backblaze link will give both you and I a free month of service.)

Your data is valuable — don’t risk losing it when it is so easy to protect it!

Simon tip: groups

One feature request that I received many times for Simon was the ability to organize tests into folders or groups — especially useful for people with lots of tests, or simply want to collect all tests relating to a particular server or client together.

Tests can be grouped together however you wish. It’s easy to create a group: simply choose the New Group command in the File menu or the + pop-up menu, then drag the tests into the new group. Even easier, you can just select some tests and choose the New Group with Selection command to make a group and move those tests into it in one step.

New menu

Groups appear with disclosure triangles, enabling them to be collapsed. The group row shows a summary of the contents, with any common values displayed for easy reference. And similarly, the info pane shows a summary of the contained tests.

Tests

Groups can even be nested, if desired — you can have an unlimited number of groups within other groups, if that helps organize them.

But wait, there’s more! While grouping tests is perhaps one of the most-requested features, I didn’t stop there: you can also group services, filters, notifiers and reports in the same way!

Notifiers

When these items are grouped, they appear indented in the Kind pop-up menu in the test editor, so you can keep related items together:

Popup

I hope you enjoy this feature.

Simon tip: hide the Dock icon

Simon has a feature that many people have asked for over the years: the ability to hide the app from the Dock.

By default, the Dock icon is shown, but there is an option in the General Settings to hide it.

Why might you want to hide it? Maybe you want to keep your Dock as sparse as possible. Simon’s Dock icon can display the most interesting status, but maybe you don’t need to see that all the time, or you’re satisfied with seeing that only in the status menu. Since you’d probably want to keep Simon running all the time, treating it as a background-only app can make a lot of sense. Now you can!

General Settings

If you turn off the Show the Simon icon in the Dock checkbox, the app icon vanishes from the Dock, and also from the Cmd-Tab app switcher. Note that if you have chosen the Keep in Dock option in the Dock menu, the icon will linger, in an inactive state; you can disable that or drag the icon out of the Dock to remove it.

When Simon is hidden from the Dock, you can still activate the app via the status menu, if you have that enabled — and the app will automatically turn it on when you turn off the Dock icon, as a convenience. If you don’t want the status menu, you can turn it off again… in which case the only way to activate the app will be to click on one of its windows, if any are visible, or open it from the Finder.

One thing to note is that as a necessary side-effect of hiding the Dock icon, Simon will no longer have a menubar. It’ll truly be a background-only app. When you display the Simon Monitor window, the menus won’t change from whatever other app you were using. This isn’t a problem for most functions, as the toolbar buttons and sort drop-down menu options cover most menu commands. But for app functions like checking for updates, accessing preferences, etc, when the Dock icon is disabled a special action menu is added to the toolbar. For power users, the keyboard equivalents still work, too — so you can press Ctrl-Cmd-1 to switch to Preview mode, for example.

Actions

I know that this is an exciting feature for many customers. For anyone who wants Simon to “disappear” into the background, try turning off the Dock icon. You can always turn it back on again. No restart required.

Simon password protection

Simon includes a password feature, that can be used to require a password when Simon is launched or activated. This provides some level of security to prevent unauthorized people from accessing the app. It doesn’t encrypt data or any other changes, it’s just a simple access control.

By default, a password is not required. If you want to require one, open up the General Settings. Notice the Choose Password… button and the text to the left indicating that a password hasn’t been set:

Password not required

Click the button to display the password sheet. If a password hasn’t already been set, the first field will be disabled (and display “None”). If one has been set, enter the existing password there. The next two fields are for the new password; enter the same one in both, or leave them both blank to disable the password feature. If entering a password, you should also enter a hint that will remind you of the password (without being too obvious):

Password sheet

After setting a password, the text in the Settings window will change to indicate so:

Password required

When a password has been set, whenever you activate Simon it will display an unlock sheet, asking for the password. It includes a Quit button to quickly stop Simon, and a Cancel to deactivate Simon. After two failed attempts, it will display the password hint (if any); after two more failed attempts, it’ll disallow further attempts until after you quit or cancel:

Unlock

I expect that most people won’t need this feature, but for those who do, it should prove quite useful.

A Simon filters case study

Before I moved the Dejal blog to WordPress, I had a test that was bundled with Simon called “Dejal posts” (you may still have this if you’re a long-time customer). This was a great example of using multiple filters to narrow down the output of a Web Page service. While the URL it monitored is no longer valid, it remains a useful example for you to learn more about creating your own filters.

The general idea of this test was to look at a “Recent Posts” page of the Dejal site, which listed all recent blog, forum, FAQ etc posts and their comments, and output some tidy text describing the most recent one, along with a changed state when a new post or comment is added.

Firstly, here’s the Service page; nothing remarkable here (the cookies are automatically recorded, and unimportant for this test):

Service

The most interesting page is the Filters one:

Filters

When you check the test and look in the Activity log, you can see the output from each of those filters (from bottom to top):

Activity

Another way to view the output is via the Preview pane, which includes not only the service response and headers, but also the full output of each filter, to help you diagnose each step.

Here’s the output of the service; the full HTML of the web page:

Preview0

Let’s break down each of the filters, via the Preview filter output.

The first filter, a Block one, takes the service response as its Input, and has Start text of <tbody> and End text of <td class="replies">. This finds the first occurrence of each of those bits of HTML in the service response, which corresponds with the most recent post information:

Filter1

This filter outputs that:

Preview1

The second filter is another Block one. It takes the output of the first filter as its input, and narrows it down further to just the title of the post. Notice that it also uses options disclosed on the right-hand-side of the filter configuration: it looks for the second occurrence of the Start text, searching from the beginning of the input:

Filter2

The output of this filter is the post title:

Preview2

The third filter is yet another Block (it is one of the most useful filters), but the input is different: this time it uses the output of the first filter, instead of the previous one (as is the default). It also has an option to look for the third occurrence:

Filter3

It extracts the author information:

Preview3

Filter number four is different. It uses an Ignore Links filter to extract out just the author name from the previous filter output. The previous filter doesn’t do this as when you were not logged in on the Dejal site, only the name is included (in which case this filter has no effect):

Filter4

The output is just the non-HTML part of the input:

Preview4

Next we’re back to a Block filter again, but this time looking at the original service response text to extract the number of replies to the post:

Filter5

This should always output a number:

Preview5

We then use a Singular or Plural filter, to take the number found in the previous filter and output “reply” if it is one, or “replies” for any other number:

Filter6

As seen in the preview:

Preview6

The last filter puts it all together: an Override Custom filter uses variables to combine the output of several filters in a nice readable way. In this case all the variables are variations of the filter output, but other variables are available too. Something that isn’t immediately obvious is that you can insert numbers to reference specific filters (otherwise it refers to the previous one):

Filter7

Which results in:

Preview7

So now that we’ve got some nice output text, what do we do with it? Of course, you can just see it in the Tests list, if you have the last change and failure displayed:

Tests

But you’ll probably want to get a notification:

Notifiers

I hope this case study is helpful. Most tests don’t need a series of filters like this, and there are other ways to achieve similar effects (like writing all the logic in a script), but it can be very useful when you want it. You can use similar techniques in your own tests.