James is a small Node.js server running on my Rapberry Pi. It is the way into my internal network and ensures that my four Google Home Minis can automate and understand even more things. In combination with the appropriate DialogFlow script I teach James more and more commands.
Actually, James only establishes a permanent connection to a Redis queue to process messages. The same queue is used by a DialogFlow script to send messages. This allows me to communicate with devices in my internal network without connecting them to the Internet.
James uses only a handful of Node.js packages. Of course, a corresponding Redis database is also used, for this I use the Redislabs Free Plan. Below you will find a list of the modules and what they are used for.
The basic tech-stack to at least run the server:
node
8.9.3npm
5.5.1yarn
1.3.2
Now let's take a look at the Node.js packages:
-
bull
-> https://github.com/OptimalBits/bull - The fastest, most reliable, Redis-based queue for Node. Carefully written for rock solid stability and atomicity.bull
is used as a message queue. James DialogFlow script also usesbull
and sends the corresponding messages there. -
bravia
-> https://github.com/waynehaffenden/bravia - Node.js module for discovering and controlling Sony BRAVIA Android TVs. This module allows you retrieve all the available service protocol API methods and invoke any of them. That is the package to use if you have a Sony BRAVIA Android TV.