Home Theatre Controller (Pioneer AVR + USB PowerMate)

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by Justintime »

stlaha2007 wrote:@sweup
@justintime

Lets start from the beginning.... As i have a rather basic implementation with the support of Nayr!
I have the following setup:

3 PI's connected by wire seperate VLANs spread over multiple floors and cabinets... Using a Raspbian SDcard Image as a basic startingpoint, with addons like ser2net, kodi, domoticz, several scripts for monitoring the PI's etc.

So rolling out a new PI would be easy, as a copy transfers always the latest version.

What we need to know where/what you know/have and where to go to.

Back to my setup:

Pioneer VSX920
address: 192.168.250.234
port: 8102 (<>telnet portnumber 23)

RPI-KODI:
address: 192.168.250.250
Raspbian (Debian 8 based)
installed: ser2net, kodi, domoticz, mosquitto, node-js, perl, python

RPI-DOMOTICZ:
address: 192.168.150.100
Raspbian (Debian 8 based) (Again, Not the Domoticz SDcard Image)
installed: ser2net, kodi (disabled), domoticz, perl, python

Setting up the PI to connect to the Pioneer AV-Receiver
On the RPI-KODI i installed nodejs, mosquitto, npm with as superuser or sudo:
apt-get update
apt-get install nodejs mosquitto npm -y
apt-get install git -y

Download the "latest" version from github with:
git clone https://github.com/nayrnet/domoticz-htc.git htc

Change into directory htc and configure it:
cd htc/
cp config.example config.js
nano config.js

Enable it with npm and start it as a daemon (backgrounding permanently):
npm install
./server.js {test it !!! CTRL-X or CTRL-C or key to stop}
sudo service daemon start

In case of maintenance etcetera Stop/Start it with:
~/htc/daemon.js stop
~/htc/daemon.js start

Configuration for 2 RPis (remote):
RPI-KODI contains the following settings in ~/htc/config.js:
// BEGIN CONFIG
var options = {
powermate : false, // Enable PowerMate Volume Knob
sharptv : false, // Enable SharpTV Sync & OSD
host : '192.168.250.250', // MQTT Broker Host (Domoticz) {{ ip.add.re.ss from domoticz }}
avrPort : 8102, // Serial Port (String) or TCP Port (Int) of Pioneer {{ serialport like /dev/serTTY01 or 23 }}
avrHost : "192.168.250.234", // IP Address of Pioneer (if Int used for avrPort) {{ ip.add.re.ss Pioneer else empty }}
maxvol : 161, // 0dB, issue telnet: 3SUD for hard enforcment.
defaultVolume : 30, // Default Volume (%) on Input Change
// tvPort : "/dev/ttyUSB-TV", // Serial Port for TV
tvPort : false, // Serial Port for TV
idx : [ ], // Init IDX Array
request : false, // Required for MQTT
status : 'htc/connected', // MQTT Status Path
syslog : false, // Log to Syslog
log : false, // Extra Debug Logging
};

// Domoticz Switches - NAME : IDX (false = Disabled)
var switches = {
inputs : 288, // Input Selector Switch (Required) {{ see below, the IDX belonging to InputSelector }}
modes : 290, // Mode Selector Switch {{ see below, the IDX belonging to SndModeSelector }}
volume : 292, // Volume Dimmer {{ see below, the IDX belonging to MasterVolume }}
voldisp : 95, // Volume Decibel Display
zone2 : false, // Zone2 Input Selector
z2volume : false, // Zone2 Volume Slider
z2voldisp : false, // Zone2 Volume Decibel Display
zone3 : false, // Zone3 Input Selector
tuner : 296, // AM/FM Tune Selector
displayText : 294, // Front Display Text
modeText : 291, // Audio Mode Text
lights : false, // Lights to dim w/PowerMate

// Domoticz Input Selector - LEVEL : [INPUT, NAME]
var inputs = {
0 : [ 0, 'Power Off' ],
10 : [ 25, 'Kodi Media' ],
20 : [ 19, 'HDMI1-DVD_HDDr' ],
30 : [ 20, 'HorizonTVbox' ],
40 : [ 21, 'PlayStation3' ],
50 : [ 01, 'CD/Audio Kodi' ],
60 : [ 02, 'Tuner/Radio' ],
70 : [ 15, 'DV/BDRecorder' ],
80 : [ 10, 'Video1' ],
90 : [ 14, 'Video2Front' ],
100 : [ 05, 'Televisie' ],
110 : [ 04, 'DVD-Decoder' ],
120 : [ 17, 'iPod/USB Front' ],
130 : [ 26, 'Internet Radio' ],
};

// Domoticz Audio Mode Selector - LEVEL : [MODE, NAME]
var modes = {
10 : [ '0006', 'Auto Surround' ],
20 : [ '0151', 'Auto Level Control' ],
30 : [ '0007', 'Stream Direct' ],
40 : [ '0001', 'Stereo' ],
50 : [ '0012', 'ProLogic' ],
60 : [ '0014', 'ProLogic Music' ],
70 : [ '0112', 'Extended Stereo'],
80 : [ '1103', '[)(] DIGITAL EX'],
90 : [ '0605', 'Stream Direct (Straight Decode)'],
};

Setup RPI-DOMOTICZ with the following IN Domoticz:
Create new hardware:
Name: MQTT GW Pioneer {Anything representing to your liking}
Type: MQTT Client GW with LAN-interface
Data Timeout: Disabled
Remote Address: 192.168.250.250 { or host and domainnames like rpi-kodi.localnet.intranet / 127.0.0.1 or localhost}
Port: 1883 { to be sure, u can use: netstat -nat | more, to find out which ports are listening on }

After that when not already created a Dummy {Virtual Switches} create that one also.
Then create some dummy devices:
- Name: InputSelector, Type SelectorSwitch
- Name: SndModeSelector, Type SelectorSwitch
- Name: Master Volume, Type: DimmerSwitch
- Name: TunerStationSelect, Type: SelectorSwitch
- Name: FrontDisplayTxt, Type: Text
- Name: AudioModeTxt, Type: Text

Zone2 and Z2Volume are not working correctly, so better not to be used, unless Nayr updated it between 04/2016 and 10/2016.
Also i'm not sure if i have embedded it myself are the voldisp/z2voldisp to display the actual Volume Level of the MasterZone or 2nd/3rd/4th Zone when available.


I think with the above info you must be able to get in running, even when your running locally.

And @justintime, perhaps start over ?? or try running as SuperUser (su -??) however i wouldn't recommend it, only to sort out some strange effects perhaps.
Thanks for the write up....

I have got it working... more or less. When i start the "./server.js" command everything is working. Only with a Domoticz reboot it doesnt, so the background process is not working.''

These commands work also:

~/htc/daemon.js stop
~/htc/daemon.js start

I still get the error messages with NPM install.
Is there another way to start it with a reboot?
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by Justintime »

Justintime wrote:
stlaha2007 wrote: RPI-DOMOTICZ:
address: 192.168.150.100
Raspbian (Debian 8 based) (Again, Not the Domoticz SDcard Image)
installed: ser2net, kodi (disabled), domoticz, perl, python

Setting up the PI to connect to the Pioneer AV-Receiver
On the RPI-KODI i installed nodejs, mosquitto, npm with as superuser or sudo:
apt-get update
apt-get install nodejs mosquitto npm -y
apt-get install git -y

Download the "latest" version from github with:
git clone https://github.com/nayrnet/domoticz-htc.git htc

Change into directory htc and configure it:
cd htc/
cp config.example config.js
nano config.js

Enable it with npm and start it as a daemon (backgrounding permanently):
npm install
./server.js {test it !!! CTRL-X or CTRL-C or key to stop}
sudo service daemon start

In case of maintenance etcetera Stop/Start it with:
~/htc/daemon.js stop
~/htc/daemon.js start


I think with the above info you must be able to get in running, even when your running locally.

And @justintime, perhaps start over ?? or try running as SuperUser (su -??) however i wouldn't recommend it, only to sort out some strange effects perhaps.
Thanks for the write up....

I have got it working... more or less. When i start the "./server.js" command everything is working. Only with a Domoticz reboot it doesnt, so the background process is not working.''

These commands work also:

~/htc/daemon.js stop
~/htc/daemon.js start

I still get the error messages with NPM install.
Is there another way to start it with a reboot?
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

Justintime wrote:
Thanks for the write up....

I have got it working... more or less. When i start the "./server.js" command everything is working. Only with a Domoticz reboot it doesnt, so the background process is not working.''

These commands work also:

~/htc/daemon.js stop
~/htc/daemon.js start

I still get the error messages with NPM install.
Is there another way to start it with a reboot?
Great to here. So far good.

I'm busy building a generic image for all of my pi's... and need to reconfigure that part also the coming few days.
There's a description somewhere on how to create your own specific init.d script. As i havenlt running it either at the moment. The daemon version loads and reloads automatically in case of failure from server or communicationlink(s) so dont worry about that.
Recently someone used @reboot in crontab to call /home/pi/scripts/scriptfile &.
So that can be an option, or use Domoticz to ping and switch a script with the on/off scripts part of that switch.

I will look into that later...

OT: Currently busy finetuning frontpage.html from G3rard and just implemented the CentralHeating with an OpenTherm gateway... Ran into a problem with the source for outside temp, it failed communication, and need to test this BME280 sensor now...

Sent from my K00C using Tapatalk
sweup
Posts: 37
Joined: Friday 19 February 2016 13:29
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by sweup »

stlaha2007 wrote:@sweup
@justintime

Lets start from the beginning.... As i have a rather basic implementation with the support of Nayr!
I have the following setup:

3 PI's connected by wire seperate VLANs spread over multiple floors and cabinets... Using a Raspbian SDcard Image as a basic startingpoint, with addons like ser2net, kodi, domoticz, several scripts for monitoring the PI's etc.

So rolling out a new PI would be easy, as a copy transfers always the latest version.

What we need to know where/what you know/have and where to go to.

Back to my setup:

Pioneer VSX920
address: 192.168.250.234
port: 8102 (<>telnet portnumber 23)

RPI-KODI:
address: 192.168.250.250
Raspbian (Debian 8 based)
installed: ser2net, kodi, domoticz, mosquitto, node-js, perl, python

RPI-DOMOTICZ:
address: 192.168.150.100
Raspbian (Debian 8 based) (Again, Not the Domoticz SDcard Image)
installed: ser2net, kodi (disabled), domoticz, perl, python

Setting up the PI to connect to the Pioneer AV-Receiver
On the RPI-KODI i installed nodejs, mosquitto, npm with as superuser or sudo:
apt-get update
apt-get install nodejs mosquitto npm -y
apt-get install git -y

Download the "latest" version from github with:
git clone https://github.com/nayrnet/domoticz-htc.git htc

Change into directory htc and configure it:
cd htc/
cp config.example config.js
nano config.js

Enable it with npm and start it as a daemon (backgrounding permanently):
npm install
./server.js {test it !!! CTRL-X or CTRL-C or key to stop}
sudo service daemon start

In case of maintenance etcetera Stop/Start it with:
~/htc/daemon.js stop
~/htc/daemon.js start

Configuration for 2 RPis (remote):
RPI-KODI contains the following settings in ~/htc/config.js:
// BEGIN CONFIG
var options = {
powermate : false, // Enable PowerMate Volume Knob
sharptv : false, // Enable SharpTV Sync & OSD
host : '192.168.250.250', // MQTT Broker Host (Domoticz) {{ ip.add.re.ss from domoticz }}
avrPort : 8102, // Serial Port (String) or TCP Port (Int) of Pioneer {{ serialport like /dev/serTTY01 or 23 }}
avrHost : "192.168.250.234", // IP Address of Pioneer (if Int used for avrPort) {{ ip.add.re.ss Pioneer else empty }}
maxvol : 161, // 0dB, issue telnet: 3SUD for hard enforcment.
defaultVolume : 30, // Default Volume (%) on Input Change
// tvPort : "/dev/ttyUSB-TV", // Serial Port for TV
tvPort : false, // Serial Port for TV
idx : [ ], // Init IDX Array
request : false, // Required for MQTT
status : 'htc/connected', // MQTT Status Path
syslog : false, // Log to Syslog
log : false, // Extra Debug Logging
};

// Domoticz Switches - NAME : IDX (false = Disabled)
var switches = {
inputs : 288, // Input Selector Switch (Required) {{ see below, the IDX belonging to InputSelector }}
modes : 290, // Mode Selector Switch {{ see below, the IDX belonging to SndModeSelector }}
volume : 292, // Volume Dimmer {{ see below, the IDX belonging to MasterVolume }}
voldisp : 95, // Volume Decibel Display
zone2 : false, // Zone2 Input Selector
z2volume : false, // Zone2 Volume Slider
z2voldisp : false, // Zone2 Volume Decibel Display
zone3 : false, // Zone3 Input Selector
tuner : 296, // AM/FM Tune Selector
displayText : 294, // Front Display Text
modeText : 291, // Audio Mode Text
lights : false, // Lights to dim w/PowerMate

// Domoticz Input Selector - LEVEL : [INPUT, NAME]
var inputs = {
0 : [ 0, 'Power Off' ],
10 : [ 25, 'Kodi Media' ],
20 : [ 19, 'HDMI1-DVD_HDDr' ],
30 : [ 20, 'HorizonTVbox' ],
40 : [ 21, 'PlayStation3' ],
50 : [ 01, 'CD/Audio Kodi' ],
60 : [ 02, 'Tuner/Radio' ],
70 : [ 15, 'DV/BDRecorder' ],
80 : [ 10, 'Video1' ],
90 : [ 14, 'Video2Front' ],
100 : [ 05, 'Televisie' ],
110 : [ 04, 'DVD-Decoder' ],
120 : [ 17, 'iPod/USB Front' ],
130 : [ 26, 'Internet Radio' ],
};

// Domoticz Audio Mode Selector - LEVEL : [MODE, NAME]
var modes = {
10 : [ '0006', 'Auto Surround' ],
20 : [ '0151', 'Auto Level Control' ],
30 : [ '0007', 'Stream Direct' ],
40 : [ '0001', 'Stereo' ],
50 : [ '0012', 'ProLogic' ],
60 : [ '0014', 'ProLogic Music' ],
70 : [ '0112', 'Extended Stereo'],
80 : [ '1103', '[)(] DIGITAL EX'],
90 : [ '0605', 'Stream Direct (Straight Decode)'],
};

Setup RPI-DOMOTICZ with the following IN Domoticz:
Create new hardware:
Name: MQTT GW Pioneer {Anything representing to your liking}
Type: MQTT Client GW with LAN-interface
Data Timeout: Disabled
Remote Address: 192.168.250.250 { or host and domainnames like rpi-kodi.localnet.intranet / 127.0.0.1 or localhost}
Port: 1883 { to be sure, u can use: netstat -nat | more, to find out which ports are listening on }

After that when not already created a Dummy {Virtual Switches} create that one also.
Then create some dummy devices:
- Name: InputSelector, Type SelectorSwitch
- Name: SndModeSelector, Type SelectorSwitch
- Name: Master Volume, Type: DimmerSwitch
- Name: TunerStationSelect, Type: SelectorSwitch
- Name: FrontDisplayTxt, Type: Text
- Name: AudioModeTxt, Type: Text

Zone2 and Z2Volume are not working correctly, so better not to be used, unless Nayr updated it between 04/2016 and 10/2016.
Also i'm not sure if i have embedded it myself are the voldisp/z2voldisp to display the actual Volume Level of the MasterZone or 2nd/3rd/4th Zone when available.


I think with the above info you must be able to get in running, even when your running locally.

And @justintime, perhaps start over ?? or try running as SuperUser (su -??) however i wouldn't recommend it, only to sort out some strange effects perhaps.
Thanks for helping out.

Im not using the kodi the remote, so for MQTT Client should i provide the ipadress for the domoticz or the receiver? Im realizing 23 is my telnet port for the receiver but were does this matters, I see you using your router port in the config (?)? - telnet port like 23 in the receiver should not be the same as for the port I open up in my router? Sry for all lame questions...
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

sweup wrote:
stlaha2007 wrote:@sweup
@justintime

Lets start from the beginning.... As i have a rather basic implementation with the support of Nayr!
I have the following setup:

3 PI's connected by wire seperate VLANs spread over multiple floors and cabinets... Using a Raspbian SDcard Image as a basic startingpoint, with addons like ser2net, kodi, domoticz, several scripts for monitoring the PI's etc.

So rolling out a new PI would be easy, as a copy transfers always the latest version.

What we need to know where/what you know/have and where to go to.

Back to my setup:

Pioneer VSX920
address: 192.168.250.234
port: 8102 (<>telnet portnumber 23)

RPI-KODI:
address: 192.168.250.250
Raspbian (Debian 8 based)
installed: ser2net, kodi, domoticz, mosquitto, node-js, perl, python

RPI-DOMOTICZ:
address: 192.168.150.100
Raspbian (Debian 8 based) (Again, Not the Domoticz SDcard Image)
installed: ser2net, kodi (disabled), domoticz, perl, python

Setting up the PI to connect to the Pioneer AV-Receiver
On the RPI-KODI i installed nodejs, mosquitto, npm with as superuser or sudo:
apt-get update
apt-get install nodejs mosquitto npm -y
apt-get install git -y

Download the "latest" version from github with:
git clone https://github.com/nayrnet/domoticz-htc.git htc

Change into directory htc and configure it:
cd htc/
cp config.example config.js
nano config.js

Enable it with npm and start it as a daemon (backgrounding permanently):
npm install
./server.js {test it !!! CTRL-X or CTRL-C or key to stop}
sudo service daemon start

In case of maintenance etcetera Stop/Start it with:
~/htc/daemon.js stop
~/htc/daemon.js start

Configuration for 2 RPis (remote):
RPI-KODI contains the following settings in ~/htc/config.js:
// BEGIN CONFIG
var options = {
powermate : false, // Enable PowerMate Volume Knob
sharptv : false, // Enable SharpTV Sync & OSD
host : '192.168.250.250', // MQTT Broker Host (Domoticz) {{ ip.add.re.ss from domoticz }}
avrPort : 8102, // Serial Port (String) or TCP Port (Int) of Pioneer {{ serialport like /dev/serTTY01 or 23 }}
avrHost : "192.168.250.234", // IP Address of Pioneer (if Int used for avrPort) {{ ip.add.re.ss Pioneer else empty }}
maxvol : 161, // 0dB, issue telnet: 3SUD for hard enforcment.
defaultVolume : 30, // Default Volume (%) on Input Change
// tvPort : "/dev/ttyUSB-TV", // Serial Port for TV
tvPort : false, // Serial Port for TV
idx : [ ], // Init IDX Array
request : false, // Required for MQTT
status : 'htc/connected', // MQTT Status Path
syslog : false, // Log to Syslog
log : false, // Extra Debug Logging
};

// Domoticz Switches - NAME : IDX (false = Disabled)
var switches = {
inputs : 288, // Input Selector Switch (Required) {{ see below, the IDX belonging to InputSelector }}
modes : 290, // Mode Selector Switch {{ see below, the IDX belonging to SndModeSelector }}
volume : 292, // Volume Dimmer {{ see below, the IDX belonging to MasterVolume }}
voldisp : 95, // Volume Decibel Display
zone2 : false, // Zone2 Input Selector
z2volume : false, // Zone2 Volume Slider
z2voldisp : false, // Zone2 Volume Decibel Display
zone3 : false, // Zone3 Input Selector
tuner : 296, // AM/FM Tune Selector
displayText : 294, // Front Display Text
modeText : 291, // Audio Mode Text
lights : false, // Lights to dim w/PowerMate

// Domoticz Input Selector - LEVEL : [INPUT, NAME]
var inputs = {
0 : [ 0, 'Power Off' ],
10 : [ 25, 'Kodi Media' ],
20 : [ 19, 'HDMI1-DVD_HDDr' ],
30 : [ 20, 'HorizonTVbox' ],
40 : [ 21, 'PlayStation3' ],
50 : [ 01, 'CD/Audio Kodi' ],
60 : [ 02, 'Tuner/Radio' ],
70 : [ 15, 'DV/BDRecorder' ],
80 : [ 10, 'Video1' ],
90 : [ 14, 'Video2Front' ],
100 : [ 05, 'Televisie' ],
110 : [ 04, 'DVD-Decoder' ],
120 : [ 17, 'iPod/USB Front' ],
130 : [ 26, 'Internet Radio' ],
};

// Domoticz Audio Mode Selector - LEVEL : [MODE, NAME]
var modes = {
10 : [ '0006', 'Auto Surround' ],
20 : [ '0151', 'Auto Level Control' ],
30 : [ '0007', 'Stream Direct' ],
40 : [ '0001', 'Stereo' ],
50 : [ '0012', 'ProLogic' ],
60 : [ '0014', 'ProLogic Music' ],
70 : [ '0112', 'Extended Stereo'],
80 : [ '1103', '[)(] DIGITAL EX'],
90 : [ '0605', 'Stream Direct (Straight Decode)'],
};

Setup RPI-DOMOTICZ with the following IN Domoticz:
Create new hardware:
Name: MQTT GW Pioneer {Anything representing to your liking}
Type: MQTT Client GW with LAN-interface
Data Timeout: Disabled
Remote Address: 192.168.250.250 { or host and domainnames like rpi-kodi.localnet.intranet / 127.0.0.1 or localhost}
Port: 1883 { to be sure, u can use: netstat -nat | more, to find out which ports are listening on }

After that when not already created a Dummy {Virtual Switches} create that one also.
Then create some dummy devices:
- Name: InputSelector, Type SelectorSwitch
- Name: SndModeSelector, Type SelectorSwitch
- Name: Master Volume, Type: DimmerSwitch
- Name: TunerStationSelect, Type: SelectorSwitch
- Name: FrontDisplayTxt, Type: Text
- Name: AudioModeTxt, Type: Text

Zone2 and Z2Volume are not working correctly, so better not to be used, unless Nayr updated it between 04/2016 and 10/2016.
Also i'm not sure if i have embedded it myself are the voldisp/z2voldisp to display the actual Volume Level of the MasterZone or 2nd/3rd/4th Zone when available.


I think with the above info you must be able to get in running, even when your running locally.

And @justintime, perhaps start over ?? or try running as SuperUser (su -??) however i wouldn't recommend it, only to sort out some strange effects perhaps.
Thanks for helping out.

Im not using the kodi the remote, so for MQTT Client should i provide the ipadress for the domoticz or the receiver? Im realizing 23 is my telnet port for the receiver but were does this matters, I see you using your router port in the config (?)? - telnet port like 23 in the receiver should not be the same as for the port I open up in my router? Sry for all lame questions...
According to my setup with more pi's connected.

In your case install/enable the htc (mqtt-instance) on your domoticz pi.
Basically all the configurations is described here. As my pi with kodi is located nearby my receiver. And my domoticz pi is in the DataCenter on my 2nd floor. Because all (have 3 more around) have several tasks/appliances configured on them.

I'd suggest to try to figure out your setup first or draw a picture of yours to be and from mine.

Sent from my K00C using Tapatalk
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by Justintime »

When you need some "special"commands just use a Python script.

For instance, when i listen to pure audio i want my surround amp in the receiver off. Made a switch which trigger this.

Code: Select all

#!/usr/bin/python

# Python script to send Telnet commands to Pioneer Receiver


import socket

# set host and port
HOST = '192.168.1.89'
PORT = 23

#import time
#time.sleep(1)

# connect to Pioneer
s = socket.socket( socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))

# Send Command - Pioneer - AMP OFF
s.sendall("03SAC\r")
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

Nice. Simply the way it should work, in your situation.

However as i understand it only sends one command (not a big deal) but it doesn't get feedback.

Problem with the 'older' receivers are there response times/responses.

Nyar wrote a very comprehensive java-based daemon, which connects/reconnects and collects/switches settings on demand.

Hardest part is the creation of dummy hardware and the MQTT broker. As long as its running locally not too hard, but interconnecting several locations require some knowledge which part is responcible for what action.

Fortunatly i spend some time on getting the knowledge i was missing. And i have the feeling some people think 'looks great, copy/paste, and it will work'. However thats where (what i think according to some replies) it all goes wrong, when they dont spent the time to investigate the setup and how it should be in there specific situation.
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by Justintime »

stlaha2007 wrote:Nice. Simply the way it should work, in your situation.

However as i understand it only sends one command (not a big deal) but it doesn't get feedback.

Problem with the 'older' receivers are there response times/responses.

Nyar wrote a very comprehensive java-based daemon, which connects/reconnects and collects/switches settings on demand.

Hardest part is the creation of dummy hardware and the MQTT broker. As long as its running locally not too hard, but interconnecting several locations require some knowledge which part is responcible for what action.

Fortunatly i spend some time on getting the knowledge i was missing. And i have the feeling some people think 'looks great, copy/paste, and it will work'. However thats where (what i think according to some replies) it all goes wrong, when they dont spent the time to investigate the setup and how it should be in there specific situation.
Haha been there done that... Looked very long at this great script from Nayar. And tried to modify with some of my special features. But it was driving me crazy.
Now it's running untouched next to my Python switches.

It is above my league (I am not a coder, but with some step by step tutorials I can come far) ....unfortunately.
So i came up with this. And yes no feedback but all of my commands comes through.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

Right, also not a coder ;-) However bash/php/perl :-)

Anyway managed to modify it to my needs...

So yes, like i said, build it or copy/paste/modify to your specific setup/needs. And you did investigated in whats behind.

Thumbs Up!!!
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

Hey there!

Getting stuck at the following statement:

Code: Select all

root@raspberrypi:/home/pi/htc# ./server.js
Illegal instruction
Adding sudo removes the error, but doesn't do anything else..

Anyone who had the same issue?

Thanks,
Rick
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

rickwilleme wrote:Hey there!

Getting stuck at the following statement:

Code: Select all

root@raspberrypi:/home/pi/htc# ./server.js
Illegal instruction
Adding sudo removes the error, but doesn't do anything else..

Anyone who had the same issue?

Thanks,
Rick
Rick,

According to your code: your already root, so sudo doesn't help you...

How did you implement it? As it looks like you're running newer software (node), or same binaries are not available...

Been a year now when i've implemented it. So... please give some debugging code how you implemented it.

Grtz Stephan
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

Hi Stephan,

I actually just wanted to report that I've got it working by running:

Code: Select all

node server.js
So far able to switch inputs.
Do you know if the volume slider already works?

Thanks,
Rick
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

Oh, and before I forget: how to get it running on reboot of my Rpi / on the background?
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

rickwilleme wrote:Hi Stephan,

I actually just wanted to report that I've got it working by running:

Code: Select all

node server.js
So far able to switch inputs.
Do you know if the volume slider already works?

Thanks,
Rick
Ok. Misunderstood...
And slider... Yes it should work... Not using it on main tablet controller. Using NewFrontpage there with up-down buttons.

Also have 2nd zone configured, but wasn't able with nayr to sort out why the 2 sliders to work correctly. Mainly switching mainzone slider to value of 2nd zone. But they definatly work.
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

rickwilleme wrote:Oh, and before I forget: how to get it running on reboot of my Rpi / on the background?
Have tried several ways...
Not very succesful. Did not investigated it why...

What works for now with me, is adding a line in pi's crontab or maybe in root's...

Code: Select all

15 * * * * /home/pi/htc/server.js start
This way it starts every 15 minutes after the hour everyday the server part. It detects it if already running and also goes into the background. Only caveat is the reboot/start of the RPI needs to be clean. Else it fails starting...

As already said, need to spend some time debugging why ;-)
But can help you get started.
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

stlaha2007 wrote: And slider... Yes it should work...
Today I've been performing some tests by directly controlling my AVR over telnet.
I strongly have the feeling that my AVR (Pioneer VSX-528) doesn't support all the commands.
Luckily, I'm able to switch inputs which was my biggest challenge. Although, volume and sound would be nice as well.

As the Pioneer app is able to control these values, I still have some hope I'll be able to script it as well. Only need to figure out what codes I need to send :roll:
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

I have some documents available with the commands... Also have experienced that not all 'telnet' commands do work.

I'll try to find the reference document links or upload/share it in a couple of days... if you're interested.

Just curious, which app-version do you use or what's the introduction year of your model?
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

stlaha2007 wrote:I have some documents available with the commands... Also have experienced that not all 'telnet' commands do work.
I'll try to find the reference document links or upload/share it in a couple of days... if you're interested.
After a lot of trial and error, I found the following codes which worked:

Code: Select all

0010 Dolby ProLogic
0005 Direct
0100 FSSAdvance
0200 Eco 1
Pretty sure there will be more though.
Any documentation/help will be appreciated!

stlaha2007 wrote:Just curious, which app-version do you use or what's the introduction year of your model?
I've been using ControlApp and iControlAV5. Not 100% sure about the introduction year, but I'm guessing 2013.
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
rickwilleme
Posts: 53
Joined: Wednesday 16 December 2015 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.6792
Location: Landgraaf, The Netherlands
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by rickwilleme »

stlaha2007 wrote:What works for now with me, is adding a line in pi's crontab or maybe in root's...

Code: Select all

15 * * * * /home/pi/htc/server.js start
Even that didn't work for me :(
Raspberry Pi ~ Fibaro Dimmer (Z-Wave) ~ Several KAKU switches and dimmers (433 MHz) ~ Amazon Echo ~ Somfy RTS ~ Sony TV ~ Kodi/XBMC ~ Essent E-Thermostaat (ICY) ~ Cresta thermostat ~ Wundermap Weather ~ Smoke detectors
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by stlaha2007 »

Not nice than. Gonna look into it.

Got my solarpanels installed today and have to integrate them asap.

I'll try to get back soon, with specific details, how i have it working.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest