I’d like to install Open Hybrid on the raspberry Pi (as an Hybrid Object).
I understand that it’s not implemented yet for raspberry, I can try to do it.
==> If you had to do it, how would you start? What would be the main steps?
Can you confirm that software is realease under the “Mozilla Public License, version 2.0” license ?
My current understanding,
The object “brain” is a node.js app. So the first steps are:
- Done: install node.js on the raspberry pi
- Done : delete the hardware interface for arduinoYun from object/hardwareInterfaces
- Done : execute the node.js “object” app
- Todo : test if it can connect to the IOS app and add markers
- Todo : write a new hardwareInterfaces based on emptyExample and arduinoYun for Raspberry
- Maybe: write an “HybridObject” for raspberry?
- The editor is the IOS part and shouldn’t need any changes
@valentin : Am I on the right path? Any advices?
You do not need to remove the ArduinoYun from object/hardwareInterfaces. You can define many hardware interfaces that are searched for at the same time.
Your first TODO should work out of the box.
Your second TODO might be more complicated and we could keep up a conversation about the APIs.
I think my advice would be that you study the arduinoYun hardware interface and come up with ideas how it could be easy adopted for the RasPi
This code https://github.com/openhybrid/object runs on your RasPi out of the box.
The problem is that you need to tell it how to connect to the GPIO or any other input output that you want to create.
https://github.com/openhybrid/object confirms also your question for the license.
You can see in every source code file the license under which it is released.
In our case it is mostly the mozilla license.
The raspberry pi does not have an inbuilt WiFi like the arduino Yun , so how do we resolve that when using a USB wifi adapter on the pi ?
You will need to run linux on the Pi. Within linux you will need to install the node.js compiler. This allows you to run the open hybrid server.
Since you run Linux, the networking hardware is taken care by the operation system.
It does not matter if there is ethernet or a wifi dongle.
If the PI has a network connection, the open hybrid server will work.
will the default raspebian OS for the pi be sufficient or should i install any specific version of linux?
Yes the Raspbian OS will work fine.
You can find a how to here:
i went through the hardware interfaces code, my doubt is that is it possible to use the same code for the pi by redefining the code for connection alone
Your doubt can be answered by typing “node js raspberry pi gpio” in to google.
Done: I’m able to connect to the IOS app almost out of the box as you said. I still removed the arduinoYun interface because it needs librairies that didn’t work on first try on the raspberry.
Todo: document how to install node.js and the required librairies on raspberry: I have a hard time making all dependencies working well on raspberry: it has to work on the right ARM version. I’ll post all the steps to install node.js and its dependencies when i’m able to make it all works.
Todo: Install a debugger: I understand the main steps of the workflow. It’s difficult to understand the details without a debugger, i’m trying to install one but it add more dependencies to make it work.
To sum up, it should go faster when I’m done with the install/compatibility issues.
@V_Mohammed_Ibrahim : using it on raspberry requires to rewrite some interfaces, that’s what i’m trying to do. Would you like to help?
@Nhibot yes i would definitely like to help , i have a team here and we are also trying to build it for the pi,we are also just begning
If you go to the folder with the server.js code you just have to type npm install. This should make sure all dependency get installed.
For debugging you just need flip the debug variable in the server.js code to true.
You can use the console.log() as debugging output.
I did “npm install”, it tries to install all dependencies, but some fails :o/
I didn’t see the debug variable, I’ll try, thanks.
Can you tell which one do not install?
Hi, the dependencies for the Hybrid Object won’t install.
I’m getting this error
/usr/local/bin/node: /usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version
GLIBCXX_3.4.20' not found (required by /usr/local/bin/node) /usr/local/bin/node: /lib/arm-linux-gnueabihf/libc.so.6: versionGLIBC_2.16’ not found (required by /usr/local/bin/node)
Maybe we should specify which operation system and version is used for the tutorial guide?
I am sure @professorminh gets this error, because of a wrong OS foundation.
@professorminh did you followed the following guide?
Yes, I’m following the installation guide.
My OS is Debian 7.8 ‘wheezy’
@professorminh I have confirmed that OpenHybrid will run on Raspbian GNU/Linux 8.0 (jessie), I have not tried an earlier OS version. It may run on 7.8, though. Before upgrading, could you try the following steps and let us know if they work well for you?
Update the system software.
sudo apt-get update
sudo apt-get upgrade -y
Remove the default nodejs instance and replace it with v0.12 or higher (more details on nodesource github)
sudo apt-get remove nodejs
curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs
Get the latest OpenHybrid Object code and download dependencies
git clone https://github.com/openhybrid/object.git
Run the OpenHybrid Object code
A this point, you should be able to navigate to port 8080 on your device and find the Object dashboard.
@valentin yes we should specify that too it will be a good, i will check and tell the version of OS and node
@professorminh if the error still remains after following @KevinOrtman instructions let us know ,we may need to test it on the OS you are using