Smartthings Device Type for Pioneer VSX Receivers
This allows you to connect up a VSX-1130/VSX-1124/etc receiver to smartthings. The device utilizes a proxy which connects to the receiver via a socket connection.
Download all files from this repository
Login to https://graph.api.smartthings.com/
Click My Device Handlers
Click Create New Device Handler
Click From Code and paste in the contents of device-type-pioneervsx.groovy
Create Create
Click Publish
Click My Devices from the top menu bar and then click New Device
Give the device an appropriate name (ex. Downstairs Receiver) . Set the type to Pioneer VSX Network Receiver . Put in a number for the network id (ex. 999)
Click Create
Make device id shown in the url in the browser, ex. https://graph.api.smartthings.com/device/show/xxx-xxx-xxx-xxx-xxx . The device id is in the url after /show/. You will need this id for the config file in a later step.
Click My SmartApps
Click New Smartapp
Click From Code and paste in the contents of smartapp-pioneervsx-integration.groovy
Click Publish
Click App Settings then Oauth, the Enable Oauth in Smart App
Write down the Client ID and Client Secret
Open a web browser window in private mode (incognito). Navigate to this URL into your browser, substituting in the Client Id: https://graph.api.smartthings.com/oauth/authorize?response_type=code&client_id=
If you are prompted to login to SmartThings, go ahead.
Select you location from the drop down list and the receiver you want to have access to through the REST API
Click the Authorize button.
You'll be redirected to a URL that looks like this: http://localhost/?code=
Copy the Code from the URL for later use.
Go back to https://graph.api.smartthings.com/ide/apps and click on your VSX Integration SmartApp
Click Simulator. Set the Location, select your receivers, then click Install.
Copy the API Token shown in the bottom right corner. This is the callbackurl_access_token
Copy the URL from API Endpoint https://graph.api.smartthings.com/api/smartapps/installations/xxx-xxx-xxx-xxx . The last part of the url will be the callbackurl_app_id
Open the Smarthings app on your mobile device.
Install python and requests (pip install requests)
Copy the .cfg and .py files to location where you will run the server
Edit the vsxproxysrvr.cfg file editing the following items (at minimum)
Start the program using python vsxproxysrvr.py
The proxy accepts the following REST requests to control the receiver.