Controlling Observe & Detect – Spy mode

This application is implemented as two separate components when you are running in Spy mode:

  • Observation & Detection (O&D) : this component observes your Sonos units, and detects your track plays. This piece may run on your PC, but alternatively it could be hosted elsewhere (as discussed here).
  • Play count processing : this component uses your track play data to update MediaMonkey, and (optionally). This piece runs upon the PC which is hosting MediaMonkey, and is the component that you interact with on a regular basis.

The O&D component runs in the background, and in a typical set up you will have little need to interact with it. As an option, it may be running on a simple Linux device, with no screen nor keyboard. For these reasons it is implemented with a web server, so that you can interact with it using a browser session running on your main computer.

When the O&D component starts up it writes a menu file which you can use from your main computer.

  • the menu file is found in the directory that you have made available for this application’s inter-component communications (see the _nas_path option described here
  • the menu file is created when the the O&D component starts running
  • it is only available while the O&D component is running, and for for security reasons a fresh copy is written whenever the O&D component starts, and only the latest copy is operable (ie. don’t copy the menu elsewhere, and then try to use an old copy)
  • for ease of use you should locate the menu file, and create a browser bookmark for it

Control menu for the O&D component

The menu file offers facilities for the following purposes:

  • get a life sign from the O&D component; check that it is running and still detecting and recording track plays ok
  • read the current log file, to see what is happening inside the O&D component
  • export the optional transfer text file, of spy track play observations; see here for a comparison of the the text file vs the recommedned database transfer option
  • shut down the the O&D component; it is recommended shut this component down before rebooting the O&D computer (see following)

List known zones

Useful for a quick check to determine whether the O&D component started ok, and whether it has successfully established communications with all of your Sonos kit.

O&D List of Sonos zones detected

Recent track starts

Lists the latest 10 track starts (or less than 10 if the the O&D component has just been restarted).

Useful as a check to ensure that observation, detection & recording continues to function OK. If you have deployed the O&D component on a remote computer, and are using the database transfer option, this display also provides a quick check to see whether there is successful communications with your NAS, or wherever you have placed the transfer database.

Recent track starts

Import the current O&D run log

This option imports a copy of the O&D component’s current log file. It allows you to view what is going on inside that component. If you have any problems, a copy of this log file could be forwarded to whomever is helping you.

This option returns a simple screen which displaying the location where the log file wqas written to.

log export confirmation

My browser (Chrome) has a security restriction blocking any hyperlink pointing to a local file. I presume that others do too, so you need to either create a browser bookmark pointing to the fixed file location (which is displayed on screen), or copy and paste the file location into your browsers address bar.

The log file covers just the current invocation of the O&D component.

log display

Export the Spy text transfer file

The text transfer file is an optional conduit for the transfer of track play observations from the O&D module to the Play count processing module. Read more about the transfer options here.

The menu option exports the contents of the text file to the location where it will be picked by the Play Count Processing component of the AlbumPlays application. The menu option also empties the text file, so that duplicated Spy observations will not be exported by the next use of this facility.

See here for instructions regarding use of the text file option.

Close down the Observe & Detect module

This menu shuts down the Observe & Detect module.

It is a good practice to do this before:

  • before upgrading the O&D component
  • before re-booting, or shutting down, the computer running the O&D component

This is especially important if you use the database transfer option.

If this component is intalled as intended, you restart the O&D component by rebooting the computer which is hosting it.

Control if the O&D component has been started manually

A design assumption is that the O&D component will be auto-started by whichever computer is running it.

If you are running it under Windows, you may have elected to start it yourself via the “Sonos Spy” short cut created by the install procedure.

In this case the application will will be running in its own window, which you will see on the Windows TaskBar.

Running O&D manually

You can enter commands directly into this window. Type in help to see a list of the available commands.

Manual control of O&D component

next step : Using the text file transfer option

back to top : Spy mode index