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

Detailed download, installation and auto start instructions for Raspberry Pi #15

Open
MortenCopenhagen opened this issue Apr 21, 2017 · 1 comment

Comments

@MortenCopenhagen
Copy link

Would it be possible to add some help on what linux commands I need to move the .jar file to my Rpi? Also to ensure I have the needed programs updated and running. And how I make sure hue2mqtt starts automatically after each boot. If too trivial, then please just refer to where I can find out. Thanks a million from a newbie in Copenhagen.

@danieldulaney
Copy link

Sorry, I don't have an RPi in front of me, but I'm happy to help out in general.

You'll need to install a Java Runtime Environment (JRE), which has the Java command. It should be available with sudo apt-get install default-jre-headless. Make sure the java command works.

Then, you'll need to download the .jar file from the releases page. Put it somewhere safe (anywhere will work, just make sure you don't delete it in the future), and make a note of the full path to it. At this point, you should be able to run it with java -jar /path/to/hue2mqtt.jar. Make sure this runs -- it will use the default settings.

If you need to change settings, you can do that on the command line with the -D flag. For example, connect to a different MQTT broker with -Dhue2mqtt.mqtt.server=tcp://my.mqtt.server:port. You can do the same thing with the JAVA_OPTS environment variable. Make sure everything is working correctly with whatever settings you need.

Assuming you're using Raspbian, the standard way you start things on boot is with a systemd service. Here's a good tutorial. Basically, you need to make a file called hue2mqtt.service, fill it with information like they show in the tutorial, and tell systemd to start the service (systemctl start) and to restart it when the system boots (systemctl enable).

Let me know if you have any issues!

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