Skip to content

Latest commit

 

History

History

02-mopidy-device-control

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Second layer - mopidy adapter

This layer lives inside of my home network and have no direct access from internet, that is actually the reason I need this layer. App will subscribe to IoT Hub device channel and listen to certain events, and call to Mopidy REST service directly.

Just as other layers I reuse intent-schema.json to load all the intents from it.

Setup

Docker

Service runs in docker (like everything else does) Two dockerfiles available: x86-64 and armhf, both tested on debian/ubuntu

  1. Create service file in /etc/systemd/system from mopidy-device-control.service file (just copy content)
  2. Adjust environment variables, change image architecture to x86_64 if you need to
  3. Execute in terminal
 sudo systemctl daemon-reload
 sudo systemctl start mopidy-device-control.service

this will take some time, since image should be pulled first

 sudo systemctl enable mopidy-device-control.service

to start service by default

Nodejs

OR you can run this from node directly

From www folder

  1. Create config file, config-example.js should be your starting point.
  2. Start service by running
 npm install
 npm start

Links

Screenshots

Running service