pyatv: atvscript stops push updates

Describe the bug When running atvscript -s 10.11.11.2 push_updates I don’t seem to get it to run more than about 24 hours. I’m running without any credentials or pairing. Everything works great for several hours then the output stops coming through.

I’ve set things so all output will be saved to a text file, I’ll be able to check it next time.

To Reproduce Let atvscript run for a day or two.

Expected behavior I hoped it could run indefinitely.

System Setup (please complete the following information):

  • OS: raspbian
  • Python: 3.7.3
  • pyatv: ?? pulled off github 6 days ago.

Additional context I’m running inside of a node red daemon node. This should be equivalent to running as user pi in cli. The output of atvscript is sent into node red environment as individual lines of text.

If there is a reason this should or should not happen, that’s great. I’ll be watching for exceptions in my text output file, hopefully that gives me more information. If an exception comes out I can certainly use that to restart the script but I was hoping this could run in the background forever…

Sometimes it quits while the ATV is off, today it quit while it was playing content.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 38 (38 by maintainers)

Most upvoted comments

I’ll put together a little script to log whenever position > total_time then provide debug logs if/when that happens next.

The problem with the device closing the connection will still exist, so at some point that should happen. Hopefully the script will exit properly now and be restarted, so that’s one thing to look for. The other one is the incorrect metadata you mentioned earlier, where old content was pushed. If you see that, then that will help me as long as I can correlate the debug log and output of atvscript (which should be easy now with the time stamp).

I’m saving a full output of the script on 2 ATV’s to text file. I’ll let you know if I see anything abnormal when the updates stop.