Real-time Monitor Notifications

Tuner sharing. If enabled in the client, the streams go through the DVR server to allow the tuner to be shared. If not enabled, then clients stream directly from the tuners, bypassing the DVR server.

I am unable to get the iOS client to register connections through the DVR on a regular basis. The tvOS app consistently logs activity through the DVR. Both apps have tuner sharing on and I am starting multiple connections on different channels.

Recorded shows behave the same way. I have tried on both the production and beta versions of the iOS apps.

Can you submit diagnostics from the iOS app?

Just played a station and submitted diagnostics.

Thanks. It looks like you used "Connect to DVR > At Home" and then entered a hostname instead of IP address, so tuner sharing is failing. Only IPs are supported for direct connect.

So, to fix I would log out in the app and connect again and choose the dvr IP addr?

Just click Connect to DVR > At Home and then either leave it empty and hit save (which will fallback to auto-discovery), or enter the IP of your mac there and hit save.

That worked! Thanks.

1 Like

I need to reopen this as I am seeing some weird behavior from the activity stream.

If I start a recording on the local network it get multiple repeating activities like this:

{"Type":"hello", "Version":"2019.12.06.0248"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 192.168.7.182."}
{"Type":"files.updated","Name":"9441","UpdatedAt":1575681226362}
{"Type":"files.updated","Name":"9441","UpdatedAt":1575681226374}
{"Type":"groups.updated","Name":"12308123","UpdatedAt":1575681226385}
{"Type":"activities.set","Name":"6-file-9441-192.168.7.182"}

But if I start the same recording from remote network I get the expected output of only a few lines of activity.

{"Type":"hello", "Version":"2019.12.06.0248"}
{"Type":"activities.set","Name":"7-file9441-23278ccdc69d","Value":"Streaming recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg."}
{"Type":"activities.set","Name":"7-file9441-23278ccdc69d","Value":"Watching recording NBC Nightly News With Lester Holt 2019-12-06-1830.mpg from 166.177.184.18 (Transcoder Running at 904kbps: 3s @ 0.97x (197.76fps))."}
{"Type":"activities.set","Name":"7-file9441-23278ccdc69d"}

This seems to still be happening with tvOS and iOS Clients only when you are connected to the local network. When you try this from remote or cellular it does not happen. I could only test remote iOS Client. I am assuming it will happen with remote tvOS client as well.

This is normal and has to do with how the client fetches different parts of the recording file when seeking.

as redirected here from you, is there any complete documentation for DVR Events API?

Your json file is no longer available. Could you prepare some other for me and tell me what you want to achieve since you don't want to be programmer, I can play with this:)

There is no documentation. But you can run this command and see how it works:

curl http://x.x.x.x:8089/dvr/events/subscribe

I swear these activity events used to be logged in the DVR log?
I'm trying to get timestamps and so far the closest I got was having curl dump an ascii trace with timestamps to a log file.
curl --trace-time --trace-ascii "logfilename" http://x.x.x.x:8089/dvr/events/subscribe

I can also get timestamps from my browsers web console inspector, but that's not viable for long term logging.

curl -Ns http://x:8089/dvr/events/subscribe | jq -c ".time = now"
{"Type":"hello","Version":"2020.11.26.2332","time":1606517206.585699}

curl -Ns http://x:8089/dvr/events/subscribe | jq -c ".time = (now | todate)"
{"Type":"hello","Version":"2020.11.26.2332","time":"2020-11-27T22:48:05Z"}

1 Like

Elegant!
This puts the date/time first, just how I wanted it.
jq -c -S ".At = (now | todate)"

{"At":"2020-11-28T00:25:26Z","Type":"hello","Version":"2020.11.26.0632"}
{"At":"2020-11-28T00:26:58Z","Name":"6-scanner","Type":"activities.set","Value":"Scanning for local content."}
{"At":"2020-11-28T00:26:58Z","Name":"6-scanner","Type":"activities.set","Value":"Scanning for movies in /volume1/arkives/testMovies"}
{"At":"2020-11-28T00:26:58Z","Name":"6-scanner","Type":"activities.set","Value":"Scanning for TV shows in /volume1/arkives/testTV Shows"}
{"At":"2020-11-28T00:26:58Z","Name":"6-scanner","Type":"activities.set"}
{"At":"2020-11-28T00:26:58Z","Name":"3-processor","Type":"activities.set","Value":"Processing newly recorded files."}
{"At":"2020-11-28T00:26:59Z","Name":"3-processor","Type":"activities.set"}

Thank You

3 Likes

Is there any way using jq to prepend (insert) the time as the first key:value pair in the object?

i.e. go from this
{"Type":"hello","Version":"2020.11.26.0632","time":"2020-11-28T05:06:45Z"}
to this
{"time":"2020-11-28T05:06:45Z","Type":"hello","Version":"2020.11.26.0632"}

Right now I'm sorting the object keys with the -S option and using the key 'At' to make it sort first.
I would prefer to keep the original unsorted object, but prepend instead of appending the time to the object.

I've previously written some scripts using curl and js to extract and sort things, but I read through the "js manual" until my head hurt tonight and nothing jumped out at me :man_shrugging:

Curious what this event is that occurs every 3 hrs.
Taking out the Trash?

{"At":"2020-11-28T07:15:05Z","Name":"5-pruner","Type":"activities.set","Value":"Pruning expired recordings."}
{"At":"2020-11-28T07:15:05Z","Name":"5-pruner","Type":"activities.set"}
{"At":"2020-11-28T10:15:05Z","Name":"5-pruner","Type":"activities.set","Value":"Pruning expired recordings."}
{"At":"2020-11-28T10:15:05Z","Name":"5-pruner","Type":"activities.set"}
{"At":"2020-11-28T13:15:05Z","Name":"5-pruner","Type":"activities.set","Value":"Pruning expired recordings."}
{"At":"2020-11-28T13:15:05Z","Name":"5-pruner","Type":"activities.set"}

Yes that is trash.

The order of keys in the json is meaningless, so the sort trick seems best.

1 Like