Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic startup instructions for Raspian unclear for noobs #20

Closed
pr3sidentspence opened this issue Jan 26, 2017 · 4 comments
Closed

Comments

@pr3sidentspence
Copy link

pr3sidentspence commented Jan 26, 2017

  • Raspian Jessie:
  • Python version:
  • 0.3.6:

My Issue

There are two parts in the Raspian autorun at start instructions that are unclear

The first: sudo cp extras/fauxmo.service /etc/systemd/system/fauxmo.service
- when I install from pypi I don't get an extras directory, I did realise it was available from source
- when investigating I found at least one other person who ran into this asking (unanswered) on reddit where to find it

The second: Edit the paths in /etc/systemd/system/fauxmo.service
and from fauxmo.service:
WorkingDirectory=/abs/path/to/dir/fauxmo
# Fix the paths below:
ExecStart=/abs/path/to/venv/bin/fauxmo -c /abs/path/to/fauxmo/config.json -v

What should these three paths be changed too? The last, I gather is where I put config.json, but what are the other two?

@pr3sidentspence
Copy link
Author

Ok, I gave it ~ for working (seems to work), and found with the type -a command that fauxmo is in /usr/local/bin

@n8henrie
Copy link
Owner

Thanks for bringing up these issues.

1

The first: sudo cp extras/fauxmo.service /etc/systemd/system/fauxmo.service

  • when I install from pypi I don't get an extras directory, I did realise it was available from source
  • when investigating I found at least one other person who ran into this asking (unanswered) on reddit where to find it

Where is this Reddit conversation? I have notifications set up for my username but haven't seen anything, feel free to bring me into the convo: u/n8henrie

No, I haven't included the systemd service files in the pypi distribution, mostly because systemd service files are only one of a bunch of ways of doing the autorun. I don't want to include files for systemd, supervisor, monit, sysvinit, etc. etc. etc. -- users are in charge of figuring out the best way to autorun Fauxmo for their particular use case. I include my systemd files in the repo as a "step in the right direction" because that's how I'm doing it, and this way it keeps them in VCS for my future reference.

That said, I agree that it would be reasonable to specify in the readme that these files have to be downloaded from the repo separately, so I have updated the README to reflect this. Hopefully this will save a few future users the time you spent figuring this out.

2

What should these three paths be changed too? The last, I gather is where I put config.json, but what are the other two?

I'm using /abs/path/to to indicate "absolute path to", so in other words I'm recommending that you use the full path starting at your system root /. Finding where you've installed these files is outside the scope of the project, and will vary depending on your route of installation (but should be similar to any other Python project that includes a command line script).

In short, reasonable ways to find your absolute path to an executable file (like fauxmo) may include (among others):

  • type -a fauxmo
  • command -v fauxmo
  • which fauxmo
  • sudo find / -type f -executable -name fauxmo 2>/dev/null

As I've updated the README, and you've figured out your paths, I'll go ahead and close this issue.

@pr3sidentspence
Copy link
Author

Oh, forgot to link the reddit conversation. The person asked you, but they did it in reply to their own thank you. https://www.reddit.com/r/amazonecho/comments/3zpvcu/wemo_emulator_on_raspberry_pi/cz1ig4b/

@n8henrie
Copy link
Owner

n8henrie commented Jan 26, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants