Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jac459/metadriver into ma…
Browse files Browse the repository at this point in the history
…ster
  • Loading branch information
jac459 committed Sep 12, 2020
2 parents 22c7978 + 47d3d91 commit e60e5f4
Show file tree
Hide file tree
Showing 7 changed files with 965 additions and 292 deletions.
50 changes: 25 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ As I am working quite a lot on this driver nowadays, don't hesitate to supporte
https://www.paypal.me/jac459

# metadriver
Programmable driver for Neeo to command any device and generate complex integration.
Programmable driver for NEEO to control any device and generate complex integration.
Examples of integration:
#### https://youtu.be/ybQrpgSK1yM
#### https://www.youtube.com/watch?v=-XNF1mSqwuo
Expand All @@ -15,23 +15,23 @@ Examples of integration:
#### https://youtu.be/9Z_wd0l7iyM
#### https://www.youtube.com/watch?v=LN6M7-U_0Bk&t=12s

This readme apply to metadriver Version 0.8-Alpha-1 (build 13) release for advanced users.
This readme applies to metadriver Version 0.8-Alpha-1 (build 13) release for advanced users.

#### Latest update

Version 0.8-Alpha-1 is basically a consolidation of v0.8.1 with:
##### New Features
- Enhanced support of HTTP-REST (incl. PUT)
- Enhanced support for HTTP-REST (incl. PUT)
- Extended jsonpath support (new framework and multithreaded execution)
- Fully working registration support for security code.
- sample registration devices: snapcast, Philips hue with color pick, yamaha network receiver with model detection.
- Sample registration devices: snapcast, Philips hue with color pick, yamaha network receiver with model detection.
- Refined polling activation for device listening.
- Refined resource management for discovered devices.
##### known bugs and limitations
- Depending on the way the driver is installed and override a previous version you can end up with a "component not found" bug preventing update of components in the remote (labels, sliders).
==> this bug is currently my public enemy number one. If it happens to you please note exactly what you did before it happens and write to me through github issues ideally or the telegram group (link in the drivers in brain repo)
- power off doesn't exit the recipe for lights hue (you need to press home).
- Further resource management improvement can be done for the dynamically discovered resources.
- Depending on the way the driver is installed and overrides a previous version you can end up with a "component not found" bug preventing update of components in the remote (labels, sliders).
==> this bug is currently my public enemy number one. If it happens to you please note exactly what you did before it happens and write to me through github issues ideally or the telegram group (link in the drivers in brain repo).
- Power off doesn't exit the recipe for lights hue (you need to press home).
- Further resource management improvement can be done to the dynamically discovered resources.

Version 0.8.1 brings some bug fixes as well as:
- Architecture refactoring with creation of a Variable Vault (centralized)
Expand All @@ -48,21 +48,21 @@ Version 0.7.3 brings some minor bug fixes as well as:
- Refined device listening with better Brain resource management.
- Improved Volumio sample device
- Snapcast support (in progress)
- Technical protocols: JSON over TCP
- Technical protocol: JSON over TCP

## Features
### Neeo UI Support
#### Neeo Components
95% of Neeo Interface is fully supported so far:
95% of NEEO Interface is fully supported so far:
- Create Buttons
- Create sliders
- Create Brightness sliders
- Create switches
- Create Images
- Create lists (directories) with paging and complex navigation (items and tiles)
==> to be supported: buttons inside directories (didn't had a use for this yet), Sonos style player (bug on the cover display).
==> to be supported: buttons inside directories (don't have a use for this yet), Sonos style player (bug on the cover display).
#### Neeo Interactions
- buttons, sliders, switches, directories triggers any action you want.
- Buttons, sliders, switches, directories triggers any action you want.
- Link buttons with sliders (volume increase will move the volume slider for example).
- Have your switches, sliders, labels display the value of your variables.
- Chained commands (one button has different behaviour each time pressed. Example: mute toggle will mute on or off when pressed)
Expand All @@ -77,7 +77,7 @@ Version 0.7.3 brings some minor bug fixes as well as:
- Control any device with MQTT.
- Wake On Lan
### Neeo Special features:
- Device Discovery (examples with Philips Hue bulbs and groups, Snapcast driver)
- Device Discovery (examples for Philips Hue bulbs and groups, Snapcast driver)
- Basic registration with security code. (example for Philips Hue and Yamaha Network Receiver)

#### Release Plan
Expand All @@ -86,25 +86,25 @@ Version 0.7.3 brings some minor bug fixes as well as:

## Install

This driver is based on Node.js technology, you thus need to install node.js first in your computer: https://nodejs.org/en/download/. At time of writing this article (Q3 - 2020) this driver support the latest version of node.js.
This driver is based on Node.js technology, therefore you need to install node.js first on your computer: https://nodejs.org/en/download/. At time of writing this article (Q3 - 2020) this driver support the latest version of node.js.
Note: this driver can be directly installed on the Neeo brain provided that you root it first. Please consult the following repository to get more information: https://github.com/jac459/NeeoDriversInBrain.
Note that installing the driver in the brain is more complex overall and it is recommended to start by using a computer or a raspberry ideally.

##### Option 1
In order to install, look at the right of your screen to see the release section and click on tag. Then choose the latest release (currently alpha 1).
In order to install, look at the right of your screen to see the release section and click on TAG. Then choose the latest release (currently alpha 1).
Download the zip of the repository and unzip/unrar in your target computer (or brain).
Go to the created folder and type:
```npm install```
This command will install the driver and all the dependencies. You need to have an internet access in order to download the dependencies.

##### Option 2
Alternatively you can also type
Alternatively you can also type:
```npm install jac459/metadriver```
This will install the latest version of the driver in a folder named node_modules/@jac459/metadriver.

#### What am I installing?
The main dependency you are installing is obviously the neeo libraries. Itis automatically installed so you don't need to go to neeo's github.
Other than that you install an hand full of connections libraries in order to connect to the various potential devices you own and speaking all slightly different languages.
The main dependency you are installing is obviously the ÑEEO libraries. They are automatically installed so you don't need to go to NEEO's github.
Other than that you install a hand full of connection libraries in order to connect to the various potential devices you own and speaking all slightly different languages.

To run the driver, you can either type:
```npm start```
Expand All @@ -125,13 +125,13 @@ The target for this driver is to create a "device files database" in order to co

In terms of architecture, this driver is based on 4 main parts:
##### Meta.js:
It constitutes the glue with neeo api to create the graphical side (kind of MVC).
Constitutes the glue with NEEO API to create the graphical side (kind of MVC).
##### Metacontroller.js:
It is the main engine including a basic syntaxique engine interpreting the device.json file in order to create the desired behaviors
The main engine including a basic syntax engine interpreting the device.json file in order to create the desired behaviors.
##### Processingmanager.js:
This is the glue to the outside world. Depending of the device maker choice it will trigger different techniques in order to interact with the actual device to be controlled. It contains both the communication protocole and the data retrieval strategy (xpath, jsonpath, regex). It is a kind of strategy pattern.
The glue to the outside world. Depending of the device maker's choice, it will trigger different techniques in order to interact with the actual device to be controlled. It contains both the communication protocols and the data retrieval strategy (xpath, jsonpath, regex). It is a kind of strategy pattern.
##### Variables Vault.js:
This vault contains all the data manipulated by the devices created as well as the callback to be called when a value is changed (kind of observer pattern). It also contains the persistency logic.
This vault contains all the data manipulated by the devices created, as well as the callback to be called when a value is changed (kind of observer pattern). It also contains the persistency logic.

## How to use

Expand All @@ -145,11 +145,11 @@ To use the driver without creating your own device files, you just need to know

## User Corner

As of today, the majority of devices created are based on AV Receiver type of device as it is the most versatile. This device doesn't appear by default in the remote interface and you need to go to the recipe part in the app in order to make it visible.
As of today, the majority of devices created are based on AV Receiver type of device as it is the most versatile. This device doesn't appear by default in the remote interface and you need to go to the recipe part in the app/GUI in order to make it visible.
Also, you will probably need to add your own shortcuts in order to compose the interface you like the way you want.
When running the device through the remote it will bring you to the shortcut slide. You can generally remove other slides as not useful.

Some devices store data. For example, if you have a device needing a registration code, the meta will save the code in -datastore.json file in order to avoid you to have it to type again. If somehow the installation of your device doesn't work and the device doesn't behave the way you want, you may prefere to dete the -datastore file and restart the meta in order to have a fresh install of your driver.
Some devices store data. For example, if you have a device needing a registration code, the meta will save the code in -datastore.json file in order to avoid the need to type it again. If somehow the installation of your device doesn't work and the device doesn't behave the way you want, you may prefere to dete the -datastore file and restart the meta in order to have a fresh install of your driver.

TODO: add how-to for the different devices created

Expand All @@ -161,4 +161,4 @@ https://github.com/jac459/metadriver/blob/master/TUTORIALS.md

You can also use the more up-to-date explanation of the yamaha driver:
https://github.com/jac459/metadriver/blob/master/YAMAHARECEIVER-EXPLAINED.md
More devices full explanation will be created in the future.
More full explanation for other devices will be created in the future.
Loading

0 comments on commit e60e5f4

Please sign in to comment.