NEEO - Driver Manager (ALPHA)

Hi All,

I ordered my NEEO yesterday and rather than clock watching I thought I'd try and be productive, so I started working on a NEEO Driver Manager.

After reading the forums it seems to me that there are some users who don't have any programming experience or are unfamiliar with JavaScript and Node. In addition, I personally didn't want to micro manage drivers and wanted a more "automated" system of finding/installing/maintaining them. So I started work on NEEO Driver Manager. I've added a link to an incredible lo-res (sorry!) video on YouTube of my progress after a few hours.

As I mentioned above I don't have my NEEO yet so I haven't test with real hardware and I also don't have any of the devices the drivers are trying to work with so some of them just error out when installed and started.

At a very high-level all this is doing is:

  • Searching npm for driver packages
  • npm installing the package you select
  • Using pm2 to manage the driver processes

In the short term I see this as a useful tool to manage drivers but I have a mini longer term roadmap in-mind:

  • Containerise/self-contain into a more user friendly installation (docker/exe/dmg etc)
  • Sandbox area for developing and publishing you own drivers (think stackblitz but nowhere near as good)
  • Install drivers via the NEEO remote (not sure if this will be possible, but I'd like to try)
  • Pie in the sky - build a Google Assistant app using Dialog flow and let this be the bridge between the NEEO locally and Google Home services.

The codes not up on GitHub yet as the GUI is awful but once I have that cleaned up and I have my NEEO devices to test on I will happily push the code up for everyone to contribute and report issues.

Hopefully this tool can make finding drivers easier and have better "advertising" around them as it makes it simpler for end users to use them. It might also help standardise naming conventions for drivers, e.g. neeo-driver-<x>.

Interested to know if people think this is any use?

Reply
29replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Looks awesome! Looking forward to using this, will make testing and using drivers so much easier 👍

    Reply Like
  • I've made some good progress today:

    • A proper client side implementation
    • Websocket integration for UI updates
    • Major code tidy on the backend

    I've decided to use React and Mobx as a learning exercise as I'm more familiar with Vue and Angular. The outstanding tasks before I'll post the repo:

    • Tidy client code a bit more
    • Driver overview in application bar (e.g. 5 online, 1 stopped, 2 errored)
    • Start All & Stop All buttons in application bar
    • Helpful README
    • PR template
    • git commit validation using husky & commitizen
    • Code styling rules (eslint, editorconfing etc.)
    • Test on my NEEO when it arrives

    When all of those are done then I think I'm ready to open it up, right now it's not quite there. I'll hopefully have it done in a couple of days.

    Cheers

    Reply Like 1
  • Hey Chris,

    This looks awesome! 

    We are working internally on making the driver development and re-use a lot easier. I'm sure there are some things we can consolidate together. Maybe it makes sense that you open a thread on the SDK's GitHub repository?  

    Reply Like 1
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • 1
      • Reported - view

      Hi Bruno 

      Thanks - it's still some way from being MVP and sharable with the community as outlined in the post above but it's getting there. I'll definitely create an issue on the SDK repo and share a link when its ready, hopefully the NEEO engineering team can pull the parts they like/want lol.

      Reply Like 1
  • Bruno Patrick

    I've pushed the repo up here. I've also created an issue on the SDK repo linking to it. If you can't install it in its current form, here is an updated video.

    Reply Like
  • Wow, I’m so excited for your project! I’ll go and play with/use it tomorrow.

    thanks for your efforts! This is just what we needed.

    Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Niels de Klerk Thanks, I hope it turns out to be useful. I haven't been on here very long but I can see that you're very active in the community and are contributing lots towards the drivers and SDK development so I'd love to know how you get on with this and welcome any feedback you have :)

      Reply Like
    • Chris Shepherd funny thing is that I’m not using any driver myself. Not having a driver manager plays a big role. I mainly use my homey integration because it’s easy to (re)start/stop code, have error log when something went wrong and automatically starts every code after a reboot.

      it seems that you have most things already in place. So that’s really cool.

       

      Something I’m not missing myself but think will help out the guys that are new to coding is if they can make use of a settings system. Thing is that most drivers that are made by users now include some static configuration like IP’s. making devices  discoverable is for most users a step to complicated. Maybe a simple interface to edit for instance a settings.json could help making their drivers available to the “masses”. So this could be an idea as well.

      anyway I’m really looking forward to test it tomorrow.

      Reply Like
  • I’ll tag Tim Roberts Markus Mahr as I believe they might be interested as well.

    Reply Like
  • If other developers are interested in taking part in the discussion, the thread is available here: https://github.com/NEEOInc/neeo-sdk/issues/74

    Reply Like
  • What do I need to do to access this from a different machine? I am running it on stripped down debian vm.

    Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Mike Potts So at the moment it is using a webpack development server which by default doesn't allow remote connections, however you can make one real quick change in the webpack,.config.js file. if you add:

      host: '0.0.0.0',

      in that config then it will be accessible via your debian vm IP+port. For example: http://192.168.12.50:3000 (assuming you debian vm ip is 192.168.12.50.

      Its still beta so in the future I want it to be self contained and require no setup, but its not at that stage yet.

      Hope that help.

      Reply Like
  • I added the below to line 3 but still no go.

    host: '0.0.0.0',
    Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Mike Potts Replace the section "devServer", with:

      devServer: {
          host: '0.0.0.0',
          port: 3000,
          proxy: {
            '/api': {
              'target': 'http://localhost:3001',
              'ws': true
            },
            '/socket.io': {
              'target': 'http://localhost:3001',
              'ws': true
            }
          },
          compress: true,
          historyApiFallback: true,
          open: true,
          // hot: true, // hot module replacement. Depends on HotModuleReplacementPlugin
        }

      I just tried that here and it's working for me remotely. If that doesn't work then can you post a screenshot of what you're are seeing?

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Mike Potts If you pull down the latest code I've updated it so it should work remotely without you needing to change any config. Let me know if it works.

      Reply Like
      • Mike Potts
      • Mike_Potts
      • 7 mths ago
      • Reported - view

      Chris Shepherd I added the host line in the correct spot and it loaded fine. Where is it searching for drivers?

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Mike Potts At the moment you have to manually add them by searching NPM, once installed the manager will auto start them. If they fail to run (nothing to do with the manager) then it will show as errored. So if you have some drivers already running it won't recognise them, you will need to stop the existing driver servers you already have running and then add them through the manager (providing the person that built them has published them to NPM).

      It is limited at the moment but it is a start. After speaking with the SDK devs it looks like some useful driver management stuff is coming into the the next release of the SDK via a command line. When that is released I might be able to tap into it a bit more for things like discovery of drivers etc.

      I would recommend pulling down my latest changes as it adds another fix in there for the websocket connection for real time GUI updates.

      Reply Like
      • Mike Potts
      • Mike_Potts
      • 7 mths ago
      • Reported - view

      Chris Shepherd Thanks, I'll pull the latest update and follow this thread.

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Mike Potts no worries, just follow what the video does. Hopefully that does a better job of explaining then my words!

      Reply Like
  • I'm having some issues with the search bar. tested on windows with chrome and edge.

    neeo_driver doesn't result in any find's.

     

    also the search bar does not return a just published package. I've just published neeo_driver-dreamscreen to NPM but the i do not get it returned through the manager UI.

    C:\Users\niels.dklerk\Documents\Code\NEEO\APPS\neeo_driver-DreamScreen>npm search dreamscreen
    NAME                      | DESCRIPTION          | AUTHOR          | DATE       | VERSION  | KEYWORDS
    dreamscreen               | A high level…        | =smirea         | 2016-11-27 | 0.4.1    | DreamScreen BLE
    dreamscreen-node          | Node.js…             | =ksecord        | 2018-03-28 | 0.0.4    |
    neeo_driver-dreamscreen   | NEEO driver,…        | =nielsdeklerk.… | 2018-05-10 | 0.0.6    |

     

    when entering a "%" character the code crashes.

    Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • 1
      • Reported - view

      Niels de Klerk Thanks so much for trying it out and providing some feedback. Would it possible for you to raise these issues against the GitHub repo so I can keep track of them and take a look for you? Thanks again, much appreciated :)

      Reply Like 1
    • Chris Shepherd No problem, I've created some issues and requests.

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Niels de Klerk Ace. Thanks so much. I just triaged them and I will have a fix up for the 4 bugs in ~5 mins. Just testing it now. The search UX is much nicer now too.

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 7 mths ago
      • Reported - view

      Niels de Klerk All fixed bud, also got a way nicer search UX going on:

       

      Please pull the latest code.

      Reply Like
  • Niels de Klerk So I spent an hour looking into the best way to distribute this as a production piece of software and after some playing around I think I am settled on an electron app (native wrapper around web based technologies). I put together a real simple example of it in the attached video. It will have the ability to auto start on boot which is a big win, but also some other nice features are opened up using the approach. I will have some time at the weekend to hopefully get this done and some more features complete too. Watch this space!

    Reply Like 1
    • Chris Shepherd just wow!

      Reply Like
    • Chris Shepherd  very cool, thank you for all the work you put into this

      Reply Like
      • Chris Shepherd
      • Software Engineer
      • Chris_Shepherd
      • 6 mths ago
      • 1
      • Reported - view

      David Ledermann No worries. It's currently on pause until the SDK export functionality is finalised by the NEEO dev team but as soon as it is I will carry on and release :)

      Reply Like 1
  • Nice work. But as long as the apps cannot be installed on the brain, Not many „normal“ users will use any app at all.

    Reply Like 1
reply to topic
Like8 Follow