HowTo - Use SDK Drivers with RasberryPi

HowTo - Use SDK Drivers with RasberryPi

 

First I want that you know the following:

Firstly I want to write a guide how to setup and use the RasperryPi as an SDK Server, but then I found an guide witch provides all needed Information and this one is written almost 100% for our use. Therefor I only provide an Link to the Guide and mention what needs to be changed for our Needs:

 

http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/

 

If you follow this guide, you only need to add / change the following:

 

1.     Under prepare Remote Desktop you first need to deinstall the RealVNC from Raspberry, therefor type the following into an Terminal window and reboot the Rasperry afterwards:

Sudo apt-get purge realvnc-vnc-server

2.     At the Install Node.js Step use the following to install Version 6:

Curl –sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

 

If you have setup everything correctly, you can reboot the Raspery to activate everything and then open a new Terminal and type the following to implement the NEEO-SDK and the examples:

 

1.     NEEO-SDK

npm install git+https://github.com/NEEOInc/neeo-sdk.git

2.     NEEO-SDK Examples

npm install git+https://github.com/NEEOInc/neeo-sdk-examples.git

 

You now should see the NEEO SDK and the Examples under

            /home/pi/node_modules

 

If you like to install a SDK Driver repeat the steps above to install them as example here a provision to install my Enigma2 Driver

            npm install git+https://github.com/carp3-noctem/neeo-driver-enigma2.git

 

After Installation you need to edit the Config in most Dirvers, Coders should provide Infos how to do it on their GitHub Pages about the Driver. For mine you need to edit the controller.js and change the

‘$$LOCAL-IP’ to the IP Adress of your Enigma2 Box, therefor just browse to the folder

            /home/pi/node_modules/neeo-driver-enigma2

and open the controller.js file in an editor (on the Rasperry double click and select open) then change the $$LOCAL-IP to an ip-adress (e.g. 192.168.1.30 ) and save the file.

 

Then we need a Terminal and Select the node_modules folder, therefor type the following:

            cd /home/pi/node_modules/

enter now brings the Terminal into this folder, then you can start a driver by just typing “node” infront of every Driver Folder (as example my enigma2 driver):

            node neeo-driver-enigma2

You now should see the following:

 

This means the SDK Driver is ready to be discovered by NEEO, then you can add the Device with the NEEO App.

 

Actually the following Issues can occur:

-       Using more then one driver, need the change of the Port in the Driver itself

-       After restart of the Brain, the SDK Driver needs to be restarted

-       Communication times can sometimes be stretched, especially when using WiFi for Brain, RaspberryPi and the Equipment you want to control, therefor I recommend to hardwire everything!

 

If you have any Questions, do not hesitate to ask, if you willed, you can mention me and I receive an Mail and provide feedback as soon as possible.

 

Hope this Guide helps everybody to setup a SDK-Driver until NEEO provide a “on the Brain” Solution.

Reply
49replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • So cool, thanks for this post! 👍👏

    Reply Like 1
  • I DO Really not understand why we have to use another device to add "drivers" to the neeo. why is there not a add-on system directly in the neeo. like other systems have ??

    Reply Like 2
  • Thanks for your detailed how-to. I‘ll try to implement this on my existing RPi. But I do have one more question to clarify things. My existing RPi 3 now is running Homebridge, manually installed and configured and therefore quite stable. Can I just integrate this driver for NEEO without crashing my exisiting Homebridge config ? As far as I know Homebridge also uses Node.js and I am not that kind of a Linux Crack that I can estimate if this installation would have any impact on my other setup. 

    Reply Like
    • Andreas Maier Did you try to set it up? Did it work?

      Reply Like
    • Markus Mahr not yet, I did try to clone my existing and working SD Card on a MacBook with the dd command. Just to make sure I have a working copy. Unfortunately the RPi starts up with the copy but hangs during the boot process with an error message. So I cannot use the clone to make tests. Until I cannot manage to get a fully working clone I‘m not able to run further tests.

      Reply Like
  • Hi thx for this, is there a reason you installed version 6? is it good practice to install latest LTS for example? or latest stable? of is the NEEO best with version6? Im sorry, just got the NEEO today, didnt have time to read all the info on this site yet.

    Reply Like
  • Andreas Maier this question can't be answered by myself. I only can say, you can make a image out of your SD-Card and the current running version. Then you can try to install, if it works, it will be fine, if not, you can go back via the saved Image.

    OR, maybe Patrick can point someone that maybe have more Node.js and Linux knowledge out of the Team.

    Remko The Version 6 is a require from the NEEO-SDK. You can find this Info over on the SDK-Github page under Prerequisite!

    Reply Like
  • Remko I use the current node.js version 8.9.0 for development. No problems so far.

    Reply Like
  • Thanks Markus Mahr  works like a charm

    Reply Like
  • Markus Mahr , Version 6 is only the minimal requierement but i could be wrong. I use last 8.x stable release w/o problems.

    Are you considering otherwise using PM2 to start and monitor application?

    Reply Like
    • Jean-christophe Vermandé It can be, that it is a minimum. But it also works ;-)

      Personally i don't use PM2, i only run two drivers actually (enigma2 and TP-Link HS-Plugs) these both are running in the Terminal on the PI. Also i use a dedicated PI for the Drivers, it was not used before the SDK so i thought it was time to make use of it.

      Also my written drivers are not up2date with the currently published SDK. But they still working. I will maybe recode them to be comatible with the current Version (multidriver...) but time will tell.

      Reply Like
  • I now managed to set up a new homebridge on my Pi. I then installed the NEEO SDK and the examples and was able to start the server on my Pi. It comes up with exactly the message in the manual. „Server running, please use the NEEO App to search for Enigma2“. But the NEEO App does not find any Vu+ entering Enigma2. There are a list of Philips and Magnavox devices showing up, but no Cable reveiver.

    Reply Like
    • Andreas Maier You only need to search for "Enigma2" then you see the following:

      You can then select the entry All Enigma2-Receiver. In the next step you are able to change the Name to whatever you want!

      Reply Like
    • Markus Mahr any further tips what else I could try ? I cannot add the Enigma2-Receiver to my NEEO Remote, see post below.

      Reply Like
  • Exactly that‘s the problem..... there is no „All Enigma2-Reciever“ in my list. Already rebootet the brain, the RPi and executed the command (node neeo-driver-enigma2) which brings up the message #READY! use the Neeo Brain app... See attachements.

    Reply Like
    • Andreas Maier did you have more then one Brain? If so, the driver can be registered at the wrong one. If not, did you allready reboot the Brain, close the app, restart the driver and recheck everything?

       

      Witch version of the driver you have currently?

      Reply Like
    • Andreas Maier I think I found the error, can you just search for enigma instead of enigma2 it seems, that there is a discovery issue when you add the 2

      Ok, the fault was on my side, i did not add Enigma2 as search Token. I've updated the Driver at Github to version 0.0.6.

      This also provides an external config and adaptions to the latest SDK. Will continue the work.

      Reply Like
    • Markus Mahr it worked, but before I read your comment ;-) the only thing I did was starting the server again on my Pi, then all the sudden „All Enigma2-Receiver“ appeared in the NEEO App and I was able to add it to my devices. Can you let us know whats the easiest was to update to version 0.0.6 of your driver on the Pi ?

      Reply Like
    • Andreas Maier it should be possible via

      npm update

      in the terminal or via

      npm install git+https://github.com/carp3-noctem/neeo-driver-enigma2.git --force

      Make sure to stop the Driver first. Also after the Update you need to edit the config file instead of the Controller file. The Config was outlined for better overview (and better possibilitys for later use!)

      If you tested out the driver, let me know what you think about it over here:

      https://planet.neeo.com/t/m2k53t/enigma2-sdk-driver

      Reply Like
  • Hi MArkus

    Thanks for your tutorial..i'm a absolutely noob to this. My problem is, that the server won't start..

    pi@raspberrypi:~ $ node -v
    v6.12.2
    pi@raspberrypi:~ $ cd /home/pi/node_modules/
    pi@raspberrypi:~/node_modules $ node neeo-driver-enigma2
    NEEO SDK Example "Enigma2" adapter
    ---------------------------------------------
    - discover one NEEO Brain...


    I never see the start server and READY Message.. any Idea what i'm doing wrong?

    Reply Like
    • Michi Bachmann this what you posted is the output? Then it seems, that your server don't find the NEEO Brain. But it is started. Can you check if you are able to ping the NEEO from your server?

      Reply Like 1
  • Thank you for the fast answer..!

     

    Sorry..i'm a really noob and my english isn't to good...so you mean ping the NEEO IP from the Raspberry?..

    This is the Result :

    pi@raspberrypi:~ $ ping 192.168.0.108
    PING 192.168.0.108 (192.168.0.108) 56(84) bytes of data.
    64 bytes from 192.168.0.108: icmp_seq=1 ttl=64 time=64.3 ms
    64 bytes from 192.168.0.108: icmp_seq=2 ttl=64 time=1.34 ms
    64 bytes from 192.168.0.108: icmp_seq=3 ttl=64 time=3.45 ms
    64 bytes from 192.168.0.108: icmp_seq=4 ttl=64 time=2.45 ms
    64 bytes from 192.168.0.108: icmp_seq=5 ttl=64 time=4.54 ms
    64 bytes from 192.168.0.108: icmp_seq=6 ttl=64 time=1.69 ms
    64 bytes from 192.168.0.108: icmp_seq=7 ttl=64 time=1.33 ms
    64 bytes from 192.168.0.108: icmp_seq=8 ttl=64 time=1.35 ms
    64 bytes from 192.168.0.108: icmp_seq=9 ttl=64 time=1.49 ms
    64 bytes from 192.168.0.108: icmp_seq=10 ttl=64 time=1.37 ms
    64 bytes from 192.168.0.108: icmp_seq=11 ttl=64 time=1.37 ms
    64 bytes from 192.168.0.108: icmp_seq=12 ttl=64 time=1.38 ms
    64 bytes from 192.168.0.108: icmp_seq=13 ttl=64 time=1.39 ms
    64 bytes from 192.168.0.108: icmp_seq=14 ttl=64 time=3.89 ms
    64 bytes from 192.168.0.108: icmp_seq=15 ttl=64 time=1.33 ms
    64 bytes from 192.168.0.108: icmp_seq=16 ttl=64 time=1.37 ms


    so..it seems to find the Brain..?

    Thank

    Reply Like
    • Michi Bachmann it seems. Can you reboot your brain by unplug the power connector and after boot up is finished start the driver again? Sometimes there where issues with the discovery process. If you like, you can send me a private message in German.

      Reply Like 1
  • Hello

    I try to setup this with docker on my synology nas but the server does not start.

    I get an error when starting:

     

    I can ping the Brain from within the docker container.

     

    I'm using the following docker image for node.js:

    https://hub.docker.com/r/stephanbureau/sky-build/

     

    I've followed the steps above to install the neeo sdk and the enigma2 driver.

    When installing the neeo sdk I get some warnings (same warnings when install the enigma2 driver):

     

    Any ideas whats wrong in my setup?

    Reply Like
    • It's working now, I had to set the ip of the brain fixed in the index.js of the enigma2 driver.

      Reply Like
    • Nicolas Maier Did you also provide the Bonjour Service in this Dockwer Container? If not, the auto discovery of the NEEO Brain will allways fail. You can check if you can edit the following line in the file index.js

      const brainIp = process.env.BRAINIP;

      to

      const brainIp = 'IP_OF-BRAIN';

      only need to set the IP of your Brain ( e.g. '192.168.1.23' make sure to use the ' infront and at the end).

      If this then works, everything is good, if not, then an other fault is occuring. But is guess it is the missing Bonjour service!

      Reply Like
    • Nicolas Maier Then it is the missing Bonjour Service inside your Docker Container with 100%!

      Reply Like
    • Markus Mahr seems that exactly this was the issue.

      Now its working linke a charm.

      Thank you for this driver!

      Reply Like
    • Nicolas Maier may I ask you witch device you use with the driver? If any issues or questions to this driver occur, please feel free to write an post over on the topic here:

      https://planet.neeo.com/t/m2k53t/enigma2-sdk-driver

      Reply Like
    • Markus Mahr I'm using a VU+ DUO2 with newest VTI Image.

      I'll test all functions in the next days and come back to you if anything missing/not working.

      Reply Like
  • Hi Markus

    Thank you very much for very helpful How-to, it works for me.

    Possibly you can answer me a linux question:

    I would like to start the drivers, like enigma2 when i reboot the raspberry.  If I use rc.local or cron, it sends the node command to the background, but the driver does not work.

    If i start the node command from a terminal, send it it to the background, it works.

    Any idea, what the problem could be ?

    PS: Thats true for every driver, I am using currenty the enigma2 and the mystrom

    Thank you very much for your support

    Regards

    Alfred

    Reply Like
    • Alfred Kurth Did you run them on a plain system (e.g. directly on the rapsberry) or did you run them into a boxed / virtual sourrounding?

      I'm not an expert to all of the SDK Stuff, but in some cases i can still provide some help. If you have a direct question, just type an @ followed by the name of the person you like to ask something, so you get in their attention, i was lucky to see your reply here.

      Reply Like
  • Markus Mahr

    Hi Markus

    Thanks for your fast reply.

    Its running on a plain system.

    Reply Like
    • Alfred Kurth Don't know, if this is the case, but does CRON or rc.local pause the Code if running in the background?

      i start the code by hand on the terminal, so i'm not aware of such issues. But maybe google can help with a search like Nodecode autostart with background support. I don't know... Else, maybe Patrick can ask one of the dev's if he knows a trick / issue

      Reply Like
  • Markus Mahr

    Hi Markus

    Yes, thats exactly the problem, cron or rc.local is not doing the job, even if it looks OK.

    What I test out now is to use systemd, I will let you and the community know if this is successful.

    Reply Like
  • I've successfully managed to setup some drivers using this method, thanks!

    At the moment I manually start the drivers from Terminal (macOS). Here's an example of one I'm using

    $ node /home/pi/node_modules/_neeo-homeassistant/index.js

     

    How are you guys making them auto-start after rebooting the Raspberry Pi, so you don't always have to start them manually?

    Reply Like
    • Jono Hunt Use Systemd or a more sophisticated solution like PM2.

      Reply Like 1
      • Jono Hunt
      • Jono_Hunt
      • 8 mths ago
      • 1
      • Reported - view

      Joerg Mattiello I'd tried PM2 but couldn't get it to work, but that guide for Systemd looks very helpful, thanks!

      Reply Like 1
  • What have I done wrong her:  

     

    Nothing just seem to work for me. What is wrong here?

    Reply Like
    • Jacob Wiqvist Did you install the node.js package to the Raspberry befor installing the SDK? If you allready did, type the follwoing steps in order ( i think the Pi didn't let you write to root folder)

      cd /home/pi/node_modules
      

      now it should show you the direction

      npm install git+https://github.com/NEEOInc/neeo-sdk.git

      this can bring up some warnings, but they should be ignorable

       npm install git+https://github.com/NEEOInc/neeo-sdk-examples.git
      Reply Like
    • Markus Mahr Today I get home at 20:40 something so a little more time to test. A litel more baybes also. But I will try. 

      Is the best sulotin realy a RasberyPi to run this things. Everyone who has had a Pi seems to have gone through the memory card krach. How can you get rid of it? Is there any UPS for Pi that is sensible. To detect if the power disappears to the battery and then shut down correctly. When I was renovating, I managed to trip on the cord, and now there is a lot that does not work. The lady is not happy.

       

      Is there any chance you can help me install Niels Kodi drivers on Pi as well? Perhaps as well?

       

      Thanks for your patience.

      Reply Like
      • Remko
      • Remko
      • 5 mths ago
      • Reported - view

      Jacob Wiqvist so many questions..  is this the best way to run this?, NO, NEEO should take care of this, personally i think development is very slow.. ups, ever heard of powerbanks? mobile chargers? if you trip, jus run the script and everything is working again no? shouldnt be that difficult.. keep dem ladies happy bro.

      Reply Like
  • In some way something broke homebridge, anyone have a solution?

    Reply Like
  • Can I install Neeo-SDK via guide in first post with my existing raspberry PI that has openhab?  I use openhab currently with the Need transport/binding created by Tim Roberts.

    Reply Like
  • Would it be possible to write a tutorial for the NEEO CLI? I don't know if i stilll need to install NEEO SDK for it and if i could install the newest Version of Node and not Version 6.

    Reply Like
reply to topic
Like11 Follow