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 »

ah thats a clever work around..

you might try setting up syslogd, see the files i put in etc.. with it setup you should put the logs in /var/log/htc.log even while running in background.
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
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 »

Did setup the htc.log.

And now we wait :)
Bobob
Posts: 3
Joined: Wednesday 24 February 2016 20:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Bobob »

Hi,

First thank you for the job you made, it looks pretty cool.
I am getting an issue with mosquitto.

When I run the server.js script, here is what I got in mosquitto :

Code: Select all

pi@raspberrypi ~ $ mosquitto
1456341204: mosquitto version 0.15 (build date 2013-01-09 05:15:05+0000) starting
1456341204: Opening ipv4 listen socket on port 1883.
1456341204: Opening ipv6 listen socket on port 1883.
1456341204: Warning: Address family not supported by protocol
1456341211: New connection from 127.0.0.1.
1456341211: New client connected from 127.0.0.1 as mosq/>NS<[mN276`awtimgU.
1456341223: New connection from 127.0.0.1.
1456341223: Invalid protocol "MQTT" in CONNECT from 127.0.0.1.
1456341223: Socket read error on client (null), disconnecting.
1456341225: New connection from 127.0.0.1.
1456341225: Invalid protocol "MQTT" in CONNECT from 127.0.0.1.
1456341225: Socket read error on client (null), disconnecting.
The new client connecter is Domoticz, but the error message are from the server.js script.

Any idea of the origin of the issue ?

Running server.js with logs :

Code: Select all

pi@raspberrypi ~/htc $ ./server.js
AVR: got connection.
Pioneer: connected
AVR data: R
AVR: false
POWER: false
domoticz/in: {"command":"addlogmessage","message":"[HTC] Pioneer AVR is off"}
domoticz/in: {"command":"switchlight","idx":102,"switchcmd":"Off"}
domoticz/in: {"command":"switchlight","idx":103,"switchcmd":"Off"}
AVR data: PWR1
^CExiting...
domoticz/in: {"command":"addlogmessage","message":"[HTC] Process Ended"}
Thank you for your help.
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 »

oi thats not good, post up your config pls.
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
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 think the trick for me was in the config file to add :1883:

Code: Select all

        host            : 'localhost:1883',             // MQTT Broker Host (Domoticz)
And still working good :)
Bobob
Posts: 3
Joined: Wednesday 24 February 2016 20:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Bobob »

Hi, here is my config file :

Code: Select all

// DOMOTICZ-HTC Example Configuration
// rename to config.js after making your changes.
// All Configuration options are made here, wont be overwritten on update.

// BEGIN CONFIG
var options = {
        powermate       : false,                // Enable PowerMate Volume Knob
        sharptv         : false,                // Enable SharpTV Sync & OSD
        host            : 'localhost',             // MQTT Broker Host (Domoticz)
        avrPort         : 23,                   // Serial Port (String) or TCP Port (Int) of Pioneer
        avrHost         : "192.168.1.252",      // IP Address of Pioneer (if Int used for avrPort)
        maxvol          : 161,                  // 0dB, issue telnet: 3SUD for hard enforcment.
        defaultVolume   : 45,                   // Default Volume (%) on Input Change
        tvPort          : "/dev/ttyUSB-TV",     // 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             : true,         // Extra Debug Logging
};

// Domoticz Switches - NAME : IDX (false = Disabled)
var switches = {
        inputs          : 102,                  // Input Selector Switch (Required)
        modes           : 103,                  // Mode Selector Switch
        volume          : false,                // Volume Dimmer
        zone2           : false,                // Zone2 Input Selector
        z2volume        : false,                // Zone2 Volume Slider
        zone3           : false,                // Zone3 Input Selector
        z3volume        : false,                // Zone3 Volume Slider
        zone4           : false,                // Zone4 Input Selector
        tuner           : false,                // AM/FM Tune Selector
        displayText     : false,                // Front Display Text
        modeText        : false,                // Audio Mode Text
        lights          : false,                // Lights to dim w/PowerMate
};
I also tested to add the port after localhost but it gives me the same result.
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 »

maby your mosquitto is too old?
I am running: mosquitto version 1.3.4 (build date 2014-08-17 03:42:05+0000)
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
Bobob
Posts: 3
Joined: Wednesday 24 February 2016 20:17
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by Bobob »

Hi,

Yes I deinstalled and reinstalled mosquitto with the following commands and now it works.
The only difference with you I think is I am still using Wheezy.

So for info, here is what I did :

Code: Select all

wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
sudo apt-get update
sudo apt-cache search mosquitto
sudo apt-get install  mosquitto
sudo /etc/init.d/mosquitto stop
mosquitto
I got the info from http://mosquitto.org/2013/01/mosquitto- ... epository/

Thank you and have a good day !
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 »

Glad you got it working, you might consider upgrading soon.. Squeeze EOL's in a few days and tha'll put wheezy up next on the chopping block.. it's not an LTS release like Squeeze so dont expect as long of life.
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 »

Hi nayr,

Finally got the newest Stable running.
So also implemented your latest version of HTC...

First impression: Great, however connections over routed network is buggy.

Also Wheezy based Domoticz image has some issues. Need to upgrade soon or later.

Got it working an my base Jessie-image with Kodi an Ser2net in Livingroom now.
Npm install did mention some errors about serial... However worked almost instantly.

Missing 1 little item... Volume Zone2. Not displaying current volume or can be changed by moving slider.

Any ideas? As all seem to be configured correctly, and screenlogging from server.js looks correct (correct idx for slider) input IS read correctly...

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

do you have Speaker B or Zone 2 setup? I dont think you can do volume with Speaker B
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 »

Specific Zone 2, definitly No Speaker B setup.

Only Volume (dimmer/slider) Zone2 doesnt work.

Selector for input Z2 works...

Also noticed: Soundmode is marked as text-device, however code looks like it can also be a Selector, right?

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

i dont know if volume for z2 works, i'll do some more testing.. I havent got my Z2 hooked up yet.

Sound mode is both text and selector, you dont always get what you select depending on audio source.. so text shows you what processor is being used and the selector lets you try to override it.
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 »

Ok thanks. Gonna try implement the selector as a dropdownlist.

Had a quick look at the code of server.js and pioneeravr.js.

Code for volumes other then shortcode seem simular.
Only difference i have seen, but not sure of correctly interpreted, is that the handling of Z1/Master does some extra's which i cant find (remarked out) at the other zones.

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 »

Nyar, sorry to hear z2volumr doesnt work.

Any way, would love to debug, is there a way to trace what is going on (yes: running server.js) lot of mqtt messages...

As far as i can see for now it goes thru to checking power with will check z2input and "should" check z2volume.
However there its not displaying current z2volume.
In server.js seen global var declerations for power/input/volume and z2power/z2input. Missing and created myself Z2VOLUME without result.

Also duplicated volume to z2volume... But thats how far i can go right now.



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

try updating, I havent tested it but it should be enough.
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 »

Nayr,

[ edit:
got it updated with git reset --hard, git pull ]
damned git pull aborts because of my own modifications... Already made a complete copy with cp. Whats the git option to update without "saving" or "merging"?
A quick look with git help would think of git reset.

[ edit2: Working Now !!! ]

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 »

Last thing, about radio...
I believe you implemented to push the FM-frequency.
I programmed the most used in config.js and tryed. Display is correctly displaying the frequency, however steps back to FM 87.5Mhz.

I have lookup some documentation, but couldnt find that it would accept a directed frequency, only steps of .5Mhz up or down or direct presets..

Which documentation did you use, as i cant find my document anymore for the VSX920. (seen docs for the 922)

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

I used this: http://www.pioneerelectronics.com/Stati ... 5-8-12.xls

I think this is what your looking for:
Screen Shot 2016-03-10 at 10.39.01 AM.png
Screen Shot 2016-03-10 at 10.39.01 AM.png (10.67 KiB) Viewed 4694 times
can you tune in manually wit the knob?
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 »

Nayr, Thanks for the documentlink.

With *SUQ and ?SUQ you're refering to Tab Setup/ Head Setup 2. Nope not that part, a short look is how to remotely/commandline setup your receiver... Maybe later...

The part i'd like to refer to is Tuner: Tab Functions/Row 338 till row 358.
The frequency test with ?FR<CR> works perfectly. I have programmed a few frequencies and there names into config.js and in the selectorswitch in Domoticz. When the Tuner is set at one of those the correct frequency and name are correctly displayed in Domoticz SelectorSwitch.

The problem occurse when changing the selector switch to another frequency/preset so to say.
The Receiver Display lits up with the choosen frequency lets say FM 103.45 MHz. But then jumps from the already tuned frequency back to its default FM 87.5 MHz.

The way i read the document is that there's no command FRF10345<CR> to jump to that frequency.
One way is to step 0.5MHz Up/Down all the way to the frequency with the command(s) TFI<CR>/TFD<CR>

Or with TAC Direct Set: eg. TAC<CR>1TP<CR>0<CR>3TP<CR>4TP<CR>5TP<CR> to jump to 103.45MHz

This seems easier to implement as we already have the frequencies programmed in config.js and only need to split it into 5 digits, where the first zero can be omitted.


Also wife did some quick testing with Zone2 Volume, almost spilled my cup of Coffee :-D
Need to investigate, as changing Master Zone's Volume with the TV results in a momentary jump to a higher volume in Zone2. And after a while in Domoticz Zone 2 is displaying 58% volume while the receiver is still around -73dB... Like i said need to investigate further.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests