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

User avatar
nayr
Posts: 354
Joined: Tuesday 11 November 2014 18:42
Target OS: Linux
Domoticz version: github
Location: Denver, CO - USA
Contact:

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

Post by nayr »

Its already using TAC, and Ive had no problems with all my radio frequencies..

Code: Select all

Pioneer.prototype.setTuner = function(frequency) {
        if (frequency.length !== 5) {
                if (TRACE) { console.log("invalid frequency: " + frequency) }
                return false
        }
        array = frequency.split("")
        if (TRACE) {
                console.log("setting tuner to : " + array[0] + array[1] + array[2] + "." + array[3] + array[4] + "MHz");
        }
        this.client.write("TAC\r" + array[0] + "TP\r" + array[1] + "TP\r" + array[2] + "TP\r" + array[3] + "TP\r" + array[4] + "TP\r");
};
there might be a bug if you try to adjust both volumes within a timeout period of eachother.. I'll try to correct that and see if it helps you out
Debian Jessie: CuBox-i4 (Primary) w/Static Routed IP and x509 / BeagleBone with OpenSprinkler / BeagleBone Planted Aquarium / 3x Raspbery Pi2b GPIO Slaves
Elemental Theme - node-domoticz-mqtt - Home Theatre Controller - AndroidTV Simple OSD Remote - x509 TLS Auth
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 »

Oh ok must have missed that.
Gonna do some debugging later on.

Perhaps we did some things to fast for before the timeouts. Maybe the immediate update/response code of the receiver is too fast to catch properly? Dont worry for now.

Have to debug later when wife and kids are in bed or out of the house. Will get back soon with more details then.


Grtz,
Stephan
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 »

Nayr, i checked a little further with a telnet session to the receiver.

Response code from manually tuning with remote FRF09555 FRF09560 etcetera, also switching presets PRA01 PRA02 etcetera.

However using presetcode A01PR or A02PR response E04 like error.
Also TAC does not accept to 5 digits manually.

Also checked switching frequency with domoticz. The command comes to tje receiver... briefly displaying the requested frequency with a blinking cursor on the last digit as 94.5_.

Guess i need to find a document specific for my VSX920 (2010 model) and see if and how it differs with a VSX922.

Grtz,
Stephan
stlaha2007
Posts: 370
Joined: Monday 05 October 2015 10:16
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + SharpTV)

Post by stlaha2007 »

HNBC84 wrote:Great job! Was looking for a good VSX control in Domoticz
I just have some scripts in the background, but its a slow process.

Would like to see a basic hot-to install

Btw, nice amp you have i just have a old vsx-920 but still up and running.
Hi HNBC84,

Youre also using the "old" VSX-920 like me.

Im having trouble with the tuner part.
programmed domoticz selector and config.js with a few dutch radio channels. However my receiver is showing briefly the requested frequency and will not switch to the requested one.

Did some debugging in telnet session as nayr already has implemented the TAC methode. unfortunately TAC is not working for me, only presets like A9 B2 etcetera can be called.

Do you have the same issues? If not i would like to know how your receiver is set with soubdmode firmware version. So i can elimanate those factors too.

Grtz,
Stephan
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 »

nayr wrote:try updating, I havent tested it but it should be enough.
Did some testing on bigger screen...
Changing volumes of zones let to some strange behaviour... Zone2 indipended, until Master goes up, Zone2 Volume as well....

Eventually managed to modify server.js now MasterZone and Zone2 can be controlled independed
Only thing i cant find is why the slider for Zone2 in Domoticz still goes up when turning the MasterZone up. Fortunate the Zone2 Volume itself does not.

The following partial code i have modified:

Code: Select all

	// Zone 2 Volume Switch
	if (data.idx === switches.z2volume) {
		if ((data.dtype !== "Light/Switch") || (data.stype !== "Switch") || (data.switchType !== "Dimmer")) {
			domoticz.log("[HTC] ERROR: Wrong Switch Type - " + data.name)
			console.log("DOMO ERROR: Wrong Switch Type - " + data.name)
			return 0
		}
		val = parseInt(data.svalue1) + 1
		if ((val !== Z2VOLUME) && (Z2VOLUME) && (data.nvalue === 2) && (READY)) {
			if (TRACE) { console.log("DOMO: Zone 2 Volume " + val) }
			Z2MUTE=0
			Z2VOLUME=val
			receiver.volume2zone(val)
		} else if ((data.nvalue === 0) && (!MUTE)) {
			if (TRACE) { console.log("DOMO: Zone 2 Mute ON") }
			Z2MUTE=1
			receiver.mute2zone(true)
		} else if ((data.nvalue === 1) && (MUTE)) {
			if (TRACE) { console.log("DOMO: Zone 2 Mute OFF") }
			Z2MUTE=0
			receiver.mute2zone(false)			
		}
	}

Code: Select all

// receiver: zone 2 volume
receiver.on('volume', function(val) {
	if (TRACE) 				console.log("ZONE2 VOLUME: " + val + "%");
	clearTimeout(switchTimer)
	switchTimer = setTimeout(function() { 
		if (switches.z2volume)		domoticz.switch(switches.z2volume,parseInt(val));
	}, 1700);
	Z2VOLUME=val
	READY=true
});
In particular VOLUME changed to Z2VOLUME
HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: RE: Re: Home Theatre Controller (Pioneer AVR + SharpTV)

Post by HNBC84 »

stlaha2007 wrote:
HNBC84 wrote:Great job! Was looking for a good VSX control in Domoticz
I just have some scripts in the background, but its a slow process.

Would like to see a basic hot-to install

Btw, nice amp you have i just have a old vsx-920 but still up and running.
Hi HNBC84,

Youre also using the "old" VSX-920 like me.

Im having trouble with the tuner part.
programmed domoticz selector and config.js with a few dutch radio channels. However my receiver is showing briefly the requested frequency and will not switch to the requested one.

Did some debugging in telnet session as nayr already has implemented the TAC methode. unfortunately TAC is not working for me, only presets like A9 B2 etcetera can be called.

Do you have the same issues? If not i would like to know how your receiver is set with soubdmode firmware version. So i can elimanate those factors too.

Grtz,
Stephan
I'm sorry i don't listen to radio stations :) So i dont have set it up. I don't even have the antenna set up.

Sorry for the late answer, i am a bit busy at the moment and a little bit sick at the same time :(.
When i have some free time on my hand i will set it up for a quick test.
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 »

Don't hurry, get well first. You don't have to setup Domoticz and HTC, a simple telnet-session will do. As the TAC commands resulted in a switch to a preset for me... So quick and easy to test without complete setup.

Also found a way to reset the receiver. Need to find out if that will reset all of it and perhaps also elininates my problem.
Gonna do that next week, as mcacc needs to be run again against my recent rearrangements in my livingroom :-)


Grtz,
Stephan
HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

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

Post by HNBC84 »

I don't think they completed it in the VSX920 or is somewhere hidden...
Only the '*TP' range and '?fr' works for me. From what i test a direct freq suggest fails in a E04

Code: Select all

1tp
FL02413120464D2038372E35304D487A
PRA01

2tp
FL02413220464D2038372E35304D487A
PRA02
3tp
FL02413320464D2038372E35304D487A
PRA03

?fr
FRF08750

HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

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

Post by HNBC84 »

Looks like this is the list for the 920:
http://www.pioneerelectronics.com/pio/p ... tocols.pdf

From:
http://www.pioneerelectronics.com/PUSA/ ... +Receivers
Don't know when this list is updated by Pioneer but cant be longer as a half year when i was there the last time
HNBC84
Posts: 63
Joined: Tuesday 01 December 2015 10:53
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

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

Post by HNBC84 »

stlaha2007 wrote:Don't hurry, get well first. You don't have to setup Domoticz and HTC, a simple telnet-session will do. As the TAC commands resulted in a switch to a preset for me... So quick and easy to test without complete setup.

Also found a way to reset the receiver. Need to find out if that will reset all of it and perhaps also elininates my problem.
Gonna do that next week, as mcacc needs to be run again against my recent rearrangements in my livingroom :-)


Grtz,
Stephan
Let me know about this "reset" and what it does.
Don't have troubles with it, but you never never know...
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 »

Thanks.

Looks like it reacts exactly like mine. Meanwhile already started myself to do some enhancements to get preset working... as TFI/TFD also dont work. Gonna take some time, done less coding in javascript.

When i compare documents for vsx9120 with vsx1021, theres definitely a gap between how these controls are embedded.

Again Thanks for testing...
So resetting is overkill for now, i guess. Gonna run mcacc only.


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 folks!

Who else got this running on a RPi?
I get stuck at the point where systemd/htc.service doesn't seem to exist.
(Once I execute nano systemd/htc.service, it says [ New File ] :| )

This is the log so far:

Code: Select all

pi@raspberrypi ~ $ git clone https://github.com/nayrnet/domoticz-htc.git htc
Cloning into 'htc'...
remote: Counting objects: 570, done.
remote: Total 570 (delta 0), reused 0 (delta 0), pack-reused 570
Receiving objects: 100% (570/570), 4.67 MiB | 885.00 KiB/s, done.
Resolving deltas: 100% (338/338), done.
Checking connectivity... done.
pi@raspberrypi ~ $ cd htc
pi@raspberrypi ~/htc $ npm install
 
> [email protected] install /home/pi/htc/node_modules/ain2/node_modules/unix-dgram
> node-gyp rebuild

make: Entering directory '/home/pi/htc/node_modules/ain2/node_modules/unix-dgram/build'
  CXX(target) Release/obj.target/unix_dgram/src/unix_dgram.o
  SOLINK_MODULE(target) Release/obj.target/unix_dgram.node
  COPY Release/unix_dgram.node
make: Leaving directory '/home/pi/htc/node_modules/ain2/node_modules/unix-dgram/build'
-
> [email protected] install /home/pi/htc/node_modules/serialport
> node-pre-gyp install --fallback-to-build

make: Entering directory '/home/pi/htc/node_modules/serialport/build'
  CXX(target) Release/obj.target/serialport/src/serialport.o
  CXX(target) Release/obj.target/serialport/src/serialport_unix.o
  CXX(target) Release/obj.target/serialport/src/serialport_poller.o
  SOLINK_MODULE(target) Release/obj.target/serialport.node
  COPY Release/serialport.node
make: Leaving directory '/home/pi/htc/node_modules/serialport/build'
[email protected] node_modules/net

[email protected] node_modules/node-domoticz-mqtt

[email protected] node_modules/daemonize2

[email protected] node_modules/events

[email protected] node_modules/util
└── [email protected]

[email protected] node_modules/ain2
└── [email protected] ([email protected], [email protected])

[email protected] node_modules/request
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])

[email protected] node_modules/mqtt
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected])

[email protected] node_modules/serialport
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected])
pi@raspberrypi ~/htc $ nano systemd/htc.service
How to proceed?

Thanks!
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
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 »

Hello,

I hope this thread is still active. I have problems installing the Node-Pre-Gyp.

Hope someone can help me out here.

Code: Select all

pi@raspberrypi ~ $ cd htc
pi@raspberrypi ~/htc $ npm install
\
> [email protected] install /home/pi/htc/node_modules/serialport
> node-pre-gyp install --fallback-to-build

gyp: /home/pi/.node-gyp/4.2.2/common.gypi not found (cwd: /home/pi/htc/node_modules/serialport) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.19-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/htc/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/home/pi/htc/node_modules/serialport/build/Release"
gyp ERR! cwd /home/pi/htc/node_modules/serialport
gyp ERR! node -v v4.2.2
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/htc/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/htc/node_modules/serialport/build/Release' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/pi/htc/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:818:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.1.19-v7+
node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/htc/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/pi/htc/node_modules/serialport
node-pre-gyp ERR! node -v v4.2.2
node-pre-gyp ERR! node-pre-gyp -v v0.6.26
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/htc/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/home/pi/htc/node_modules/serialport/build/Release' (1)
npm ERR! Linux 4.1.19-v7+
npm ERR! argv "/usr/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.2
npm ERR! npm  v2.15.3
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs serialport
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls serialport
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/htc/npm-debug.log
pi@raspberrypi ~/htc $
:roll:
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 »

Hi there,

Seems a little bit quite here right ;-)

Have used it for a while, however stopped it because of some misbehaviour on several rpi images.

Will have a look into it in the next couple of days. Had it running on an older raspbian jessy, which was upgraded a few month ago.

To help you start debugging for now. Read through the whole thread. Have been in contact with Nayr when this started and also had some install issues. Mainly because of different raspbian versions (domoticz image was older raspbian)

Grtz St

Sent from my D6603 using Tapatalk
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:Hi there,

Seems a little bit quite here right ;-)

Have used it for a while, however stopped it because of some misbehaviour on several rpi images.

Will have a look into it in the next couple of days. Had it running on an older raspbian jessy, which was upgraded a few month ago.

To help you start debugging for now. Read through the whole thread. Have been in contact with Nayr when this started and also had some install issues. Mainly because of different raspbian versions (domoticz image was older raspbian)

Grtz St

Sent from my D6603 using Tapatalk
If you can look into it? That would be great. I have read all the posts.

And saw a person who had a similar problem. But the suggested solution didn't work for me.

I want to control the trigger outputs on my receiver. Which can't be done by Ir but it can with Rs232 commands.

Thanks...
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 »

This is a bit out of my league but really wants this work. I have follow the installation procedures but don't get any effect on the AVR. Hoping that someone could point me in the right direction.

The MQTT switch using my AVR IP-number. Right? What usr/psw?, right now domoticzs credentials - doesnt make sense for me.
Pioneer has port 23 open. Havent made any changes to config.files more then changing "Nexus Player" to "Nvidia Shield"

The log gives me:
2016-11-02 21:01:14.295 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)

Sry for being a noob. Thanks for your effort.

Image
Image
Image
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 »

sweup wrote:This is a bit out of my league but really wants this work. I have follow the installation procedures but don't get any effect on the AVR. Hoping that someone could point me in the right direction.

The MQTT switch using my AVR IP-number. Right? What usr/psw?, right now domoticzs credentials - doesnt make sense for me.
Pioneer has port 23 open. Havent made any changes to config.files more then changing "Nexus Player" to "Nvidia Shield"

The log gives me:
2016-11-02 21:01:14.295 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)

Sry for being a noob. Thanks for your effort.

Image
Image
Image
Lucky for you got it installed... I am not even there Image
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:This is a bit out of my league but really wants this work. I have follow the installation procedures but don't get any effect on the AVR. Hoping that someone could point me in the right direction.

The MQTT switch using my AVR IP-number. Right? What usr/psw?, right now domoticzs credentials - doesnt make sense for me.
Pioneer has port 23 open. Havent made any changes to config.files more then changing "Nexus Player" to "Nvidia Shield"

The log gives me:
2016-11-02 21:01:14.295 Error: MQTT: Failed to start, return code: 14 (Check IP/Port)

Sry for being a noob. Thanks for your effort.

Image
Image
Image
Looking at my setup: Your mqtt port is set to 23 (telnet), mine is 1883(default MQTT port i believe).
The telnet port in the htc-settings is correct, thats the port it communicates with the Pioneer Reciever, btw are you sure its 23, min VSX920 has 8102.

Also need to set it up again, had a few maintenance moments last 3 months, with this as the last item on the todolist.

I'll try to make some time in the next couple of days.... Be patience please.

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: RE: Re: Home Theatre Controller (Pioneer AVR + USB PowerMate)

Post by sweup »

stlaha2007 wrote: Looking at my setup: Your mqtt port is set to 23 (telnet), mine is 1883(default MQTT port i believe).
The telnet port in the htc-settings is correct, thats the port it communicates with the Pioneer Reciever, btw are you sure its 23, min VSX920 has 8102.

Also need to set it up again, had a few maintenance moments last 3 months, with this as the last item on the todolist.

I'll try to make some time in the next couple of days.... Be patience please.

Sent from my K00C using Tapatalk
I changed the mqtt port to 1883, I no longer got any port error but the AVR dosent respond. Should the ip number for the mqtt be th ip number of the domoticz installation or the AVR?

The default port for my pioneer was 20-something but i changed it to 23.

thx

@justintime :)
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 »

@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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest