Open ajagnanan opened 8 years ago
@ajagnanan Actually I think the code of gateblu-forever
does NOT work as stated Gateblu using forever to run devices in their own processes
Please have a look at device-manager.coffee. The function spawnChildProcess
is not executed in run-time.
So, guess what? This repo is not ready for you to deploy on your own hardware.
There are specific setup instructions to get gateblu-forever working on Linux (I run it on Ubuntu all the time). The intention of the build if for RaspberryPi actually, so a few modifications need to be made for other Linux distros. The biggest hitch is that some of the dependent npm modules require node-pre-gyp which assumes python 2.7, if you have python 3 it will be all broken.
The steps I follow for Ubuntu are here: https://gist.github.com/brianehlert/6b7fa7c86be098722d73f944e96b1bf9
Hi @brianehlert, can you actually get devices added to it afterwards? I got gateblu running and registered to octoblu, I just had issues with getting devices registered.
@ajagnanan Well, the code is not fully functional.
Ok thought so. In the mean time, I have node-red registered to octoblu and running on my local network. Thats an alternative for now at least.
@ajagnanan Yes. Yes, I can add devices afterward. I frequently work with the Hue for testing various things and that plug-in npm module has some sub dependencies that frequently cause it to fail properly installing. Beyond that.. There have been bugs in the past where pushing new modules / plug-ins / device from the cloud service has failed. Those have generally been cloud service side issues and I hope that is not what you are running in to.
I'll try again to test out. Thanks
@ajagnanan There's another thing I must tell you: in addition to not being activated, your plugin instances may NOT
receive any message from meshblu
(with the current repo).
Want a proof? Well, if you follow the tutorial Building A Custom Connector, it states that:
In the Plugin.prototype.onMessage function, define how you want your device to behave when it receives a message
If you search for onMessage
in gateblu
or gateblu-forever
codebase, you'll get nothing at all.
@anhldbk onMessage is what your device sends to meshblu. It does not register it with Gateblu. Gateblu is simply a proxy to meshblu. Gateblu is for those devices that cannot talk directly to meshblu - such as Bluetooth or locally attached devices. No different than a hardware IoT gateway to get LAN devices bridged to some cloud service.
Otherwise your device directly registers with and directly connects to Meshblu.
Also, not making any claims that the docs are not out of date. As I know some are.
There are a number of the 'connectors' listed on that readme.io page that do not use Gateblu at all. They connect directly with Meshblu.
Gateblu specific connectors are mentioned here: https://gateblu.readme.io/docs/connectors
@brianehlert I see. Thank you for your thorough explanation.
Each of the devices that run on the Gateblu have their own connection to Meshblu, so they all handle onMessage
on their own. Gateblu doesn't take any action onMessage
since pretty much everything it does is handled onConfig
.
Hello, I have gateblu-forever installed on a linux vm. This part works and I see the thing "gateblu" online in octoblu. When I try to connect a wemo or hue to it though, it fails on "Loading Device Options..." with no error message in logs. In octoblu's browser console, I see it making requests for a status, this is the output:
Am i missing a step? or is there somewhere else i should check for an error? Thanks.