chendo / lifx-http

A HTTP API for controlling LIFX devices.
MIT License
91 stars 13 forks source link

start script isn't working #4

Open lightx opened 10 years ago

lightx commented 10 years ago

The start.sh script isn't working but the ./bin/lifx-http is.

It gives me this error when I try starting the start.sh script

/usr/local/rvm/gems/ruby-2.1.1@global/gems/bundler-1.5.3/lib/bundler/rubygems_integration.rb:240:in   `block in replace_gem': thin is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
        from /usr/local/rvm/gems/ruby-2.1.1/bin/thin:22:in `<main>'
        from /usr/local/rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `eval'
        from /usr/local/rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in `<main>'

Im trying to demonize the process on my Pi. Im sure I'm just missing something easy. Help.

chendo commented 10 years ago

Whoops, forgot to take out start.sh when I converted it into a gem. Right now, there's no built-in support to daemonize. Thin was a bit too heavy, and I didn't have enough time to try to shoehorn in the MDNS stuff nicely.

chendo commented 10 years ago

I'm running mine in a screen session at this point until I can write get some clean daemonizing thing in.

lightx commented 10 years ago

Makes sense..

PS: I got the lifx-http to communicate with https://github.com/Neal/PebblFX (its pretty cool) that's why I'm trying to get it to run in the background.

chendo commented 10 years ago

I'm using PebblFX myself :) It's just running in a screen session at this point. Daemonizing would require background logging etc, and I wanted to ship the MDNS stuff before the end of the weekend heh. If you can figure out a clean way, I'd be happy to pull it in

justinatomatic commented 9 years ago

Ive got lifx-http running in the background on a raspberry pi using supervisor and RVM wrapper scripts.

http://omaticlabs.com/homepage/24/lifx-http-supervisor

ristomatti commented 9 years ago

@justinatomatic, I have it running (in Raspberry) basically with just executing it in the background with "bin/lifx-http &". Have you had any issues of it freezing over time like every 0.5-3 days? I had the exact same issue with a virtual machine on an Intel platform. I've now "solved" the issue by creating a shell script that kills and restarts the process every 4 hours and now it's almost always responding...

justinatomatic commented 9 years ago

I've been running it in a detached screen session up until now and I've never had to restart it. So months of uptime.

Supervisor version up two days now, see how we go.

ristomatti commented 9 years ago

@justinatomatic, good luck then(?) :) I've been having this issue (and commented on it also) https://github.com/chendo/lifx-http/issues/16

As a side note- I've also went through a similar "forced" crash course on Ruby/RVM as you describe on your page.

chendo commented 9 years ago

We have an official HTTP API coming if you fellas want to wait for that. Similar API (much improved actually)

ristomatti commented 9 years ago

@chendo, that's great news! Will it be Ruby based also? I'm kind of hoping for some Node.js or native option since Ruby takes a lot of extra resources on memory constrained devices like Raspberry and I'm not using it for anything else. But in any case if it's more robust it's very welcome.

chendo commented 9 years ago

It's actually going to be hosted, so you'll hit an endpoint with a token. No need to host anything yourself!

chendo commented 9 years ago

As for a self-hosted version, I'll have to work on that in my own time, which is already split across so many personal projects heh

justinatomatic commented 9 years ago

This is rapidly going to get off topic, but in the absence of a decent LIFX forum :)

Local non cloud communication is what's important to me. I'm working on a LIFX-MQTT bridge in Ruby for bidirectional communication with my code/home.

Is the upcoming clouded based API related to the move to AllJoyn?

chendo commented 9 years ago

Ah cool, I'd like to see that if you plan to release it.

Nope, not related to AllJoyn

justinatomatic commented 9 years ago

Going to to be open source but i'm using your private API's as i need event callbacks so i don't have to poll for state changes. Be good to chat I'll get in touch during work hours as it's work related.