2.3.2.2 mppopmd as a Daemon

Once you’ve got your configuration file prepared, you should probably start the daemon in the foreground for ease of trouble-shooting. I suggest starting it with the -v flag ("verbose") the first time, as well (there’s also a -d flag which will produce more copious debug output). You should expect to see something like this:

mppopmd -v -F -c <path to configuration file>
[2020-12-12T15:26:19.620806454-08:00][mppopmd] mppopmd 0.2.2 logging at level Debug.
[2020-12-12T15:26:19.621395828-08:00][mpdpopm] mpdpopm 0.2.2 beginning.
[2020-12-12T15:26:19.621998677-08:00][mpdpopm::clients] Connected 0.22.0.
[2020-12-12T15:26:19.623398521-08:00][mpdpopm::clients] Connected 0.22.0.
[2020-12-12T15:26:19.623874861-08:00][mpdpopm::clients] Sent subscribe message for unwoundstack.com:commands; got `OK
'.
[2020-12-12T15:26:19.623888424-08:00][mpdpopm::clients] Subscribed to unwoundstack.com:commands.
[2020-12-12T15:26:19.624985027-08:00][mpdpopm] selecting...
[2020-12-12T15:26:19.628412738-08:00][mpdpopm] output status is Ok(
    Output {
        status: ExitStatus(
            ExitStatus(
                0,
            ),
        ),
        stdout: "/home/sp1ff\n",
        stderr: "",
    },
)
[2020-12-12T15:26:19.628778521-08:00][mpdpopm] No database update needed
[2020-12-12T15:26:19.628817190-08:00][mpdpopm] No more commands to process.

At this point mppopmd is just sitting around, waiting for something to happen. Bring up your favorite MPD client & start playing a track. That should induce some activity:

[2020-12-12T15:26:29.522581696-08:00][mpdpopm::clients] Sent idle message; got `changed: player
OK
'.
[2020-12-12T15:26:29.522756287-08:00][mpdpopm] subsystem Player changed
[2020-12-12T15:26:29.527064915-08:00][mpdpopm::playcounts] Updating status: 0.000% complete.
...
[2020-12-12T15:28:19.653519123-08:00][mpdpopm::playcounts] Updating status: 60.698% complete.
[2020-12-12T15:28:19.653569350-08:00][mpdpopm::playcounts] Increment play count for 'M/Miles Davis - Boplicity.mp3' (songid: 262) at 0.6069790770994554 played.
[2020-12-12T15:28:19.661696678-08:00][mpdpopm::clients] Sent message `sticker get song "M/Miles Davis - Boplicity.mp3" "unwoundstack.com:playcount"'; got `sticker: unwoundstack.com:playcount=3
OK
'
[2020-12-12T15:28:19.661743547-08:00][mpdpopm::playcounts] Current PC is 3.
[2020-12-12T15:28:19.770956673-08:00][mpdpopm::clients] Sent `sticker set song "M/Miles Davis - Boplicity.mp3" "unwoundstack.com:lastplayed" "1607815699"'; got `OK
'
[2020-12-12T15:28:19.868244915-08:00][mpdpopm::clients] Sent `sticker set song "M/Miles Davis - Boplicity.mp3" "unwoundstack.com:playcount" "4"'; got `OK
'
...

In this example, mppopmd noticed that "Boplicity" by Miles Davis started playing; when it was played 60% of the way through, the daemon updated the play count from 3 to 4 & set the last played timestamp.

Once things seem to be working, you might consider removing the -F flag & running mppopmd as a proper daemon. mpdopm ships with a sample systemd unit.