Open DanTheTechMan opened 3 years ago
I'm seeing the same thing on windows 10. Not sure what I'm doing wrong either
The arguments were moved into the config file a while back. Please look at the config example for more Information
Does that mean I can no longer create a Windows service and avoid having to open a Command Line window after every reboot?
Not at all. Put those settings in the config file instead of cmdline args. Not sure about nssm, but I know running things via cmd, you may need quotes around the paths that have spaces (ie "Program Files")
I have it running successfully via the command line. I'm using it as I type this. However, I'm trying to have a more automated solution. I would like to be able to, as the tutorial suggests, automatically load on reboot, just restart the service when updates are made to the py scripts, and not need to have a windows command line window open in order to use it. Is that still possible?
It should be. I haven't touched nssm in a very long time
Try setting the nssm startup directory to the l2p folder
It works great for me. Make sure you have the python 3 version, fill in the config.ini and just point to main.py in nssm.
I have Python3 already, and I already I filled in the config.ini file. It runs fine via the command line, however I don't want to have to go through the process of starting it every time I reboot.
I am now getting a different error:
I looked at the System Event Viewer for details on this error, and the error is occurring because the system can't find one of the files or folders, however that's all it says. It doesn't tell me which file or folder can't be located.
Also, do I need to add all the additional arguments still, or do I just point to Python in the "Path" field, and the main.py script in the "Arguments" field, without any additional arguments (such as Username, Password, IP:Port)?
BTW, thanks for all the help so far! Greatly appreciated!
I just installed a new service successfully. Make sure you point to main.py without ANY arguments. All options are in the config. Use srvman.exe to make it easy to delete any unwanted services. If you dont have it check my wiki article. i have the website listed there. i need to update it to remove the command line args.
On Oct 28, 2020, 3:43 PM, at 3:43 PM, DanTheTechMan notifications@github.com wrote:
I have Python3 already, and I already I filled in the config.ini file. It runs fine via the command line, however I don't want to have to go through the process of starting it every time I reboot.
I am now getting a different error:
I looked at the System Event Viewer for details on this error, and the error is occurring because the system can't find one of the files or folders, however that's all it says. It doesn't tell me which file or folder can't be located.
Also, do I need to add all the additional arguments still, or do I just point to Python in the "Path" field, and the main.py script in the "Arguments" field, without any additional arguments (such as Username, Password, IP:Port)?
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tgorgdotcom/locast2plex/issues/121#issuecomment-718250604
Ok. Thanks. This is what my NSSM window looks like:
Path: "C:\Program Files\Python38\python.exe" Startup Directory: D:\Plex\Plex Media Server\Scripts\locast2plex Arguments: "D:\Plex\Plex Media Server\Scripts\locast2plex\main.py" Service Name: Locast2Plex
Is that correct?
Yes! Make sure you don't already have a service named Locast2Plex
On Oct 28, 2020, 4:11 PM, at 4:11 PM, DanTheTechMan notifications@github.com wrote:
Ok. Thanks. This is what my NSSM window looks like:
Path: "C:\Program Files\Python38\python.exe" Startup Directory: D:\Plex\Plex Media Server\Scripts\locast2plex Arguments: "D:\Plex\Plex Media Server\Scripts\locast2plex\main.py" Service Name: Locast2Plex
Is that correct?
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/tgorgdotcom/locast2plex/issues/121#issuecomment-718260011
Thanks, however, it doesn't work for me. I get this error again:
The specific message from the Event Viewer is: The Locast2Plex service terminated with service-specific error The system cannot find the path specified..
Any ideas as to what the issue could be?
Does anyone have any other ideas on how to remedy this issue?
Does anyone have any other ideas on how to remedy this issue?
Upgrading Python did it for me. Point nssm to the new python and the arguments with no quotes to main.py.
Make sure you have the config.ini filled out with your username and password. Mine is working perfectly
Unfortunately, upgrading Python isn't an option for me at the moment, as I'm on the most recent version of Python that supports my OS. The next upgrade of Python compatible with my OS won't be released until Mid-November, so, unless anyone has any other ideas that don't require me waiting for something, it looks like I'm SOL for the moment. Also, as I've said multiple times, I already have it working via the command line (which means the config.ini file is already filled out), however, what I'm ultimately looking for is a completely automated solution (for the script to load automatically with my OS (and Plex), without any intervention from me), which, if I can get this set up correctly and working, will be exactly what I am looking for. The only time I should have to intervene is when the script(s) get updated, and even then, it should be as simple as 1-2-3 (stopping the service, overwriting the files, and starting the service back up). Also, removing the quotes returns me to the original error.
I'd say, you need to research on google how to use nssm for a python script.
@DanTheTechMan Please put your command line in a batch/cmd file and run it to make sure it works.
Here is mine. Please test it on your system and confirm it's running. In a locast2plex.cmd file place your path to python and main.py echo off cls "C:\Users\Valued Customer\AppData\Local\Programs\Python\Python38-32\python.exe" C:\code\locast2plex\main.py rem pause
nssm.exe In nssm.exe put in your path to Python in arguments put C:\code\locast2plex\main.py (or whatever your path is to main.py)
Here is what my successfull NSSM ui looks like.
I tried it exactly as you said and I still get an error. I have no idea why it's not working.
So you can run it from the cmd file successfully?
Yes.
Try moving your code out of the plex scripts folder to c:\code\locast2Plex. Just to see....
Check services to make sure your non working services are deleted.
Ok. I'll try that. I delete the service after every failed test, before I create it again, so there should be nothing to delete.
Well, I finally have a working solution. Here are the steps I took to get fully operational: Just as a test, as @tharris9d recommended, I copied the "locast2plex" folder to the "C" drive, then edited the arguments of the "Locast2Plex" service with NSSM (as I apparently forgot to delete it after my last failed test) to point to the new temporary location of the "locast2plex" folder. That worked, however, I did not want to run it from that location permanently, so I created a Directory Junction to point to the original location of the "locast2plex" folder (on the "D" drive), to see if I could fool the service to thinking it was still being run from the "C" drive. That worked like a charm. I am now fully up and running, exactly as I wanted to be. Thank you to everyone for all your help and advice, and a BIG thanks to @tharris9d for your diligence and for helping me get to this point.
Awesome! I am so happy you got it working.
On Oct 30, 2020, 3:23 PM, at 3:23 PM, DanTheTechMan notifications@github.com wrote:
Well, I finally came to a working solution. Here are the steps I took to get fully operational: As a test, as @tharris9d recommended, I copied the "locast2plex" folder to the "C" drive, then edited the arguments of the "Locast2Plex" service with NSSM (as I apparently forgot to delete it after my last failed test) to point to the new temporary location of the "locast2plex" folder. That worked, however, I did not want to run it from that location permanently, so I created a Directory Junction to point to the original location of the "locast2plex" folder (on the "D" drive), to see if I could fool the service to thinking it was still being run from the "C" drive. That worked like a charm. I am now fully up and running, exactly as I wanted to be. Thank you to everyone for all your help and advice, and a BIG thanks to @tharris9d for your diligence and for helping me get to this point.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/tgorgdotcom/locast2plex/issues/121#issuecomment-719827504
I got the service up and running, but both emby and plex give me errors trying to find the HDhomerun device.
This is my config.ini
[main]
locast_username = xxxxxx@xxxxx.com
locast_password =
The last line was tacked on by some other process.
I have tried it with and without the port info (not sure if the context is correct)
Hello @kogren161.
Noticed a few items with the ini file:
c = \locast2plex\main.py
can be removed:6077
part of the plex_accessible_ip can be removedTry seeing if making the changes to the ini resolves your issue.
Thank you for the suggestions, I was able to get this running in windows terminal, as well as successfully setting up the service and starting it. I was able to find the tuner in Plex as well as Emby. I was able to download the guide in Plex successfully but when I try to tune to a channel I get this error
"Playback Error Could not tune channel. Please check your tuner or antenna."
I have not setup a premium account in Plex, and don't appear to be able to go any further in Emby without a premium account.
I went ahead and signed up for the premium account with Plex. I can now setup a recording, but when I try to tune to a channel I still get the same error. :(
I thought perhaps that I needed to "install" ffmpeg, so I went through the instructions on youtube to do that and rebooted. Unfortunately now Plex can't see the tuner. I get the error there was a problem adding the device: 127.0.0.1:6077
I shut down the service, and restarted via command line. Plex found the tuner, and now will tune to the channels. It seems that Locast2Plex needed to update the FCC facilities database.
Although the service appears to be running, Locast2Plex only seems to be working from the command line.
I found that I have the path to the Python shortcut rather than the path to the file. It included a space.
No dice :( still only runs from the command line.
Seem to have gotten it. I seem to have misinterpreted where the main.py command needed to reside. Once I put it in the arguments it works. I have Python and Locast2plex in C:\
Awesome. Whenever you update the code to a newer version simply restart the service! Have fun.
I can't seem to get the Windows service for Locast2Plex to run. I follow the guide to the letter. The only things I change are the path to Python and the Arguments for the service. Here's what my screen looks like:
The arguments I put for the service are as follows: D:\Plex\Plex Media Server\Scripts\locast2plex\main.py -u:xxxxxxxxxx@xxxxx.xxx -p:xxxxxxxxxx --debug --addy:127.0.0.1 --port:6077
Note that I've replaced the all characters for the username and password with "x".
Here's the error message I get:
Any help will be greatly appreciated.