njpatel / hivekit

Connect Hive Active Heating System and HomeKit
https://njp.io/introducing-hivekit/
Other
25 stars 2 forks source link

Can't seem to get hive to run on startup #9

Open cpives2008 opened 8 years ago

cpives2008 commented 8 years ago

I'm running hivekit on a Raspberry Pi. It runs fine, and I've created a script to run it rather than have to type in all the details everytime, so all I need to type is ./Hive and it runs perfectly.

However, I can't get it to run on startup. I've tried the init.d method and the rc.local method and neither works.

Help!

diwilli commented 8 years ago

Hi @cpives2008,

Incase you haven't already got it sorted I put this in my rc.local: nohup /root/hivekit/bin/hivekit -username <username> -password <password> -pin <pin> >> /var/log/hivekit/hivekit.log 2>&1 &

Create the logging directory: mkdir -p /var/log/hivekit

I'd previous created /etc/profile.d/golang.sh with the following content: export GOPATH=~/gocode export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

You'll need to adjust your paths if you've put it in a different place

cpives2008 commented 8 years ago

Not working for me

pete-leese commented 8 years ago

I just edited /etc/rc.local and added the command /bin/hivekit -username -password -pin

I did have to add a sleep 60 seconds command as my Raspberry Pi had not obtained an IP by the time hivekit started - works a treat!