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 crap I had 21 as the default, thats wrong.. must of had a brain fart, port 21 is FTP.. 23 is Telnet.. if your using avrPort: 21 I bet you'll have better luck with avrPort: 23 instead :lol:
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
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 »

oah and great news, looks like @gizmocuz is way ahead of me, he committed this today:
https://github.com/domoticz/domoticz/is ... -180472788

if we got a new dummy switch with 100 steps then expect volume sliders to be working very soon, perhaps as soon as the next beta release... building it now.
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 »

nayr wrote: that 50000 is the port I use and only an example, I believe the example config uses port 23 as its typically the default.
Or 8102 ;) like me ;)
nayr wrote:oah and great news, looks like @gizmocuz is way ahead of me, he committed this today:
https://github.com/domoticz/domoticz/is ... -180472788

if we got a new dummy switch with 100 steps then expect volume sliders to be working very soon, perhaps as soon as the next beta release... building it now.
Great!
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 »

ok just checked in code, once your running Version: 2.4384 or later you can safely enable the Volume Slider with domoticz (with mute working).. you may need to delete your existing switch and create a new one if its not listed as: Light/Switch (good) vs Lighting 2 (bad)... you Pi guys should get a new beta build soon.

okay this is going to simmer for a while, consider it the first release candidate.. if you guys find success with the existing feature set I'll release the first stable version next week then start working on the memory preset selector switch and then finish up ZoneN support for testing.. right now only Zone Support is Zone2 Input Selection.. I'll add Z2/Z3 Volume and Z3/Z4 Input selectors on the next release.
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 do a fast test, and works very good and exactly!! domoticz v2.4389

Just a side not, when you add the dummy switch you need to select the 'keuzeschakelaar' 'choiseswitch' and edit it later to a dimmer. Do not select the normal switch. ;) i first made this mistake.
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 yeah I hit that too, you cant convert a normal switch to a selector switch like you can others.. gotta start with the dummy selector.

at some point I'd like to expand MQTT's capabilities to creating dummy switches and making publishes with selector level names, then it would be pretty trivial for all the devices to be created automagically the first time you start it up based upon that initial config.

im glad you got it up and going, those whom follow you should have much less trouble.. thanks for putting up with all the crap.. when I started this it was impossible for anyone else to get this running without alot of code hacking, now thats far from the case.. as a result the quality of the code has gone up alot.
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
steppi
Posts: 41
Joined: Saturday 30 January 2016 0:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by steppi »

My server.js works well ! Thank you! Now I can not here:
I create the Dummy - Create virtual sensors - but I can not find the item "select " need some plugins ?

Screenshot:
htc.jpg
htc.jpg (113.54 KiB) Viewed 2079 times
Thanks! bye
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 »

steppi wrote:My server.js works well ! Thank you! Now I can not here:
I create the Dummy - Create virtual sensors - but I can not find the item "select " need some plugins ?

Screenshot:

Thanks! bye
No plugin just update to beta release

SSH
cd domoticz
./updatebeta

And just wait a couple of minuts
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 »

nayr wrote:ok just checked in code, once your running Version: 2.4384 or later you can safely enable the Volume Slider with domoticz (with mute working).. you may need to delete your existing switch and create a new one if its not listed as: Light/Switch (good) vs Lighting 2 (bad)... you Pi guys should get a new beta build soon.
Mute function is not working for me. It goes on and off in a sec. my slider is at 100% but my vsx stays on the last sound level.

And i must put the daemon.js in cronjobs ;) this morning i had no connection.

Somehow when i switch between sources the volume slider goes to 44% and the vsx goes with it...

Try and error ;)
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 have a routine that resets volume to a "default" level every time you change inputs, regardless how you change said inputs..

I'll put that into an option so the level can be configured, and perhaps disabled all together..

I find its really important for the game consoles, if someone was watching a pretty quiet TV show and my son later goes and shoves LEGO Avengers into the playstation it'll change inputs automatically and land on this intro screen that blasts the house with the theme song and sends my son running and crying.

I'll look into the mute issue, right now I am finishing up the FM Radio Tuner.
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 do a git pull
and a Beta update for domoticz

The Mute functing is working good right now.

For the cronjob you can do:
SHH
crontab -e
Pit this line in it: 5 * * * * ~/htc/daemon.js start
Write out and exit

I have one problem: When i turn the 920 off it losses its connection (No WOL)
The deamon seems to stop but the cronjob starts it again with no connection and it does not try to reconnect.

Can you build it in or is this too hard to do?

I now TRYING a little workAround with a very basicscript

Ping VSX
If off:
#!/bin/sh
cd
cd htc
./daemon.js stop

If on:
#!/bin/sh
cd
cd htc
./daemon.js start

Beacause ping is read only this is not working

Ps. Would love to learn some coding somewhere in the future
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 »

oh I see, your VSX920 dont stay on the network when its shut off? I had not accounted for that possibility.. I think I can catch that and just die cleanly.

my pioneer stays on the network even when powered off, you might not be able to turn it on via domoticz with your behavior.

Do you have a standby mode we can go into instead of powering off completely by any chance?
Screen Shot 2016-02-07 at 11.06.37 AM.png
Screen Shot 2016-02-07 at 11.06.37 AM.png (11.5 KiB) Viewed 2029 times
shut down htc, telnet to your VSX directly and try 1STJ, if it comes back with STJ1 your golden, if you get an ERROR im going to have to account for this behavior..

If you do have it I might just add a startup routine to double check that network standby is enabled, and if not enable 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
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 »

nayr wrote:oh I see, your VSX920 dont stay on the network when its shut off? I had not accounted for that possibility.. I think I can catch that and just die cleanly.

my pioneer stays on the network even when powered off, you might not be able to turn it on via domoticz with your behavior.

Do you have a standby mode we can go into instead of powering off completely by any chance?
Screen Shot 2016-02-07 at 11.06.37 AM.png
shut down htc, telnet to your VSX directly and try 1STJ, if it comes back with STJ1 your golden, if you get an ERROR im going to have to account for this behavior..

If you do have it I might just add a startup routine to double check that network standby is enabled, and if not enable it.
Does not work... No (network) standby.

I really need to talk to my wife haha, but i think over a year i want a Atmos receiver ;)

Btw the error from Domoticz about the little start/stop script same error is on the ping button and a dummy button. But the script itself works good.

Code: Select all

2016-02-07 19:23:27.224 Executing script: /home/pi/domoticz/scripts/vsx/htcdaemonstart.sh
2016-02-07 19:23:27.242 Error: Error executing script command (/home/pi/domoticz/scripts/vsx/htcdaemonstart.sh). returned: 32512
steppi
Posts: 41
Joined: Saturday 30 January 2016 0:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by steppi »

Ok now my server.js is running!

Code: Select all

pi@domoticz:~/htc $ ./server.js
Pioneer: connected
Domoticz MQTT: connected
POWER: false
INPUT: 25
VOLUME: 55
I did not understand how the installation of various "switches" on Domoticz ..
I created this:
domoticzHardware.jpg
domoticzHardware.jpg (174.81 KiB) Viewed 2013 times
And this:
Domoticz.Switch.jpg
Domoticz.Switch.jpg (159.66 KiB) Viewed 2013 times
I did not understand how can you enter the data of my Pioneer, where I enter the correct command? I would like to have control of:
- Imput AVR (select TV - Bluray - Kodi - Spotify - Internet radio)
- Volume and Mute
- Power On - Power Off

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

Thats all done in the config.js, example:
// Domoticz Input Selector - LEVEL : [INPUT, NAME]
var inputs = {
0 : [ 0, 'Power Off' ],
10 : [ 15, 'Nexus Player' ],
20 : [ 04, 'PlayStation 3' ],
30 : [ 22, 'PlayStation 4' ],
40 : [ 24, 'Security Cameras' ],
50 : [ 02, 'FM Tuner' ],
};
First set of numbers is the LEVEL from your Selector Switch, second set of numbers is Pioneers internal INPUT ID, and the 3rd field is the Level Name.

That all matches up with my config in domoticz:
Image
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
steppi
Posts: 41
Joined: Saturday 30 January 2016 0:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by steppi »

Thank you so much for your support!
I have a Pioneer SC-2024, where I find the "Pioneers internal INPUT ID" of my avr?

edit: I just checked on this Excel file:

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

But unfortunately I have not found my 2024..c'è model SC-SC-2022 :(
Some idea??
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 »

Pioneer usses this for (almost) any receiver. Depents on the model if it has the function then you can use a function.
Attachments
pio.png
pio.png (55.58 KiB) Viewed 1991 times
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 the ones in the PDF you linked, they should work.. most of the pioneer ones Ive seen are identical to previous versions, merely expanded to account for new features/ports.
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
steppi
Posts: 41
Joined: Saturday 30 January 2016 0:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by steppi »

Ok thank you all!
But something is not going well, why not work the link between Domoticz and Pioneer ...
Below some screen and some code:

Code: Select all

 File: config.js                                                                                                      

// 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,                   // Dedicated Telnet port on Pioneer
        avrHost         : "192.168.6.161",      // IP Address of Pioneer
        maxvol          : 161,                  // 0dB, issue telnet: 3SUD for hard enforcment.
        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             : false,                // Extra Debug Logging
};

// Domoticz Switches - NAME : IDX (false = Disabled)
var switches = {
        inputs          : 145,                  // Input Selector Switch (Required)
        modes           : 168,                  // 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        : 167,                  // Audio Mode Text
        lights          : 180,                  // Lights to dim w/PowerMate
};

// See your Pioneer IP & RS-232 Control Commands doc for Input and Audio Mode Numbers.

// Domoticz Input Selector - LEVEL : [INPUT, NAME]
var inputs = {
        0               : [ 0, 'Power Off' ],
        10              : [ 25, 'XBMC' ],
        20              : [ 38, 'Internet Radio' ],
        30              : [ 41, 'Pandora' ],
        40              : [ 24, 'Security Cameras' ],
        50              : [ 02, 'FM Tuner' ],
};

// 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'],
};

// Domoticz Zone2/3/4 Input Selector - LEVEL : [INPUT, NAME]
var zoneInputs = {
        0               : [ 0, 'Power Off' ],
        10              : [ 25, 'XBMC' ],
        20              : [ 41, 'Pandora' ],
        30              : [ 06, 'SAT' ],
        40              : [ 44, 'AirPlay' ],
};

// Domoticz Radio Tuner Selector - LEVEL : [FREQ, NAME]
var radio = {
        0               : [ 0, 'Power Off' ],
        10              : [ '09010', '90.1 NPR' ],
        20              : [ '09410', '94.1 KOA' ],
        30              : [ '09330', '93.3 KCTL' ],
        40              : [ '10150', '101.5 Jammin' ],
        50              : [ '10670', '106.7 KBPI' ],
        60              : [ '10550', '105.5 Jack' ],
}
// END CONFIG

exports.options = options
exports.switches = switches
exports.inputs = inputs
exports.modes = modes
exports.zoneInputs = zoneInputs
exports.radio = radio        
        
photo3.jpg
photo3.jpg (111.27 KiB) Viewed 1976 times
photo2.jpg
photo2.jpg (111.71 KiB) Viewed 1976 times
photo1.jpg
photo1.jpg (69.62 KiB) Viewed 1976 times
Last edited by steppi on Monday 08 February 2016 22:24, edited 3 times in total.
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 »

were missing a large part of your configuration... namely the options and switches section.

but you should have:

Code: Select all

// Domoticz Switches - NAME : IDX ( false = Disabled)
var switches = {
	inputs		: 5,			// Input Selector Switch (Required)
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest