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.
Post Reply
HNBC84
Posts: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Wednesday 10 February 2016 23:38

Still no (good) luck.

Butt for now sleep well

Code: Select all

pi@domoticz ~/htc $ git pull
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 4 (delta 2), reused 4 (delta 2), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/nayrnet/domoticz-htc
   3752f25..ff0772b  master     -> origin/master
Updating 3752f25..ff0772b
Fast-forward
 hardware/pioneeravr.js |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
pi@domoticz ~/htc $ ./server.js
Pioneer: connected
AVR CONNECTION CLOSED! try reconnect every 30s
Domoticz MQTT: connected
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
^Z
[18]+  Stopped                 ./server.js

pi@domoticz ~/htc $ ./server.js
Domoticz MQTT: connected
Pioneer: connected
POWER: true
INPUT: 5
VOLUME: 13
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C4","idx":117,"name":"VSX Sound Modus","nvalue":1,"stype":"Selector Switch","svalue1":"0","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C3","idx":116,"name":"VSX Input","nvalue":2,"stype":"Selector Switch","svalue1":"20","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":2,"stype":"Switch","svalue1":"12","switchType":"Dimmer","unit":1}
VOLUME: 13
AVR CONNECTION CLOSED! try reconnect every 30s
AVR ERROR: Connection not avilable, dropping request
Pioneer: connected
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
AVR ERROR: Connection not avilable, dropping request
^Z
[19]+  Stopped                 ./server.js

pi@domoticz ~/htc $ ./server.js
Pioneer: connected
Domoticz MQTT: connected
POWER: true
INPUT: 5
VOLUME: 13
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C4","idx":117,"name":"VSX Sound Modus","nvalue":1,"stype":"Selector Switch","svalue1":"0","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C3","idx":116,"name":"VSX Input","nvalue":2,"stype":"Selector Switch","svalue1":"20","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":2,"stype":"Switch","svalue1":"12","switchType":"Dimmer","unit":1}
VOLUME: 13


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

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

Post by nayr » Thursday 11 February 2016 0:54

Thanks for the help, I am pretty sure I got it fixed now.. Ive tested it by unplugging my Pioneer, waiting a few moments and plugging it back in.. it eventually recovered on its own, I expect it to behave faster when the receiver cleanly closes the connection instead of just disappearing and waiting for a socket failure.
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 1:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by steppi » Thursday 11 February 2016 1:07

I just installed htc Raspberry on but does not work anymore :(

Code: Select all

pi@domoticz:~/htc $ ./server.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/pi/htc/node_modules/serialport/build/Release/node-v11-linux-arm/serialport.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/htc/node_modules/serialport/serialport.js:14:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

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

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

Post by nayr » Thursday 11 February 2016 1:19

run 'npm install', your missing required modules.. if you moved from an x86 to a ARM platform you'll have to reinstall the NodeJS modules as some code will be platform specific.
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: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Thursday 11 February 2016 15:58

nayr wrote:Thanks for the help, I am pretty sure I got it fixed now.. Ive tested it by unplugging my Pioneer, waiting a few moments and plugging it back in.. it eventually recovered on its own, I expect it to behave faster when the receiver cleanly closes the connection instead of just disappearing and waiting for a socket failure.
Yeah men! It is working! 8-)

Code: Select all

pi@domoticz ~/htc $ ./server.js
Pioneer: connected
Domoticz MQTT: connected
POWER: true
INPUT: 5
VOLUME: 53
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C4","idx":117,"name":"VSX Sound Modus","nvalue":1,"stype":"Selector Switch","svalue1":"0","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C3","idx":116,"name":"VSX Input","nvalue":2,"stype":"Selector Switch","svalue1":"20","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":2,"stype":"Switch","svalue1":"52","switchType":"Dimmer","unit":1}
VOLUME: 53
DOMO: Mute ON
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":0,"stype":"Switch","svalue1":"0","switchType":"Dimmer","unit":1}
MUTE: true
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":0,"stype":"Switch","svalue1":"0","switchType":"Dimmer","unit":1}
DOMO: Volume 44
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":2,"stype":"Switch","svalue1":"43","switchType":"Dimmer","unit":1}
MUTE: false
VOLUME: 44
DOMO: Power Off
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C3","idx":116,"name":"VSX Input","nvalue":0,"stype":"Selector Switch","svalue1":"0","switchType":"Selector","unit":1}

	AVR CONNECTION CLOSED! try reconnect every 30s
	UNKNOWN ERROR: ReferenceError: receiver is not defined
	Pioneer: connected
	POWER: true

INPUT: 5
VOLUME: 13
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C4","idx":117,"name":"VSX Sound Modus","nvalue":1,"stype":"Selector Switch","svalue1":"0","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140C3","idx":116,"name":"VSX Input","nvalue":2,"stype":"Selector Switch","svalue1":"20","switchType":"Selector","unit":1}
DOMO: {"Battery":255,"RSSI":12,"dtype":"Light/Switch","id":"000140CB","idx":124,"name":"VSX Volume","nvalue":2,"stype":"Switch","svalue1":"12","switchType":"Dimmer","unit":1}
VOLUME: 13

HNBC84
Posts: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Thursday 11 February 2016 15:58

Btw how is the powermate working?

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

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

Post by nayr » Thursday 11 February 2016 18:12

the power mate is pretty epic, wife and son both love it.. and show it off there friends.. my old lady told me last night I did a pretty good job on the volume knob, I am more likely to get a bug report out of her than a compliment, so that was really nice feedback. (better than you guys getting it working hehe)

The USB Extension cable I ran up behind the Sofa has two ports on it, so I said screw it and got some USB Powered speakers that act as a USB Sound card and I am setting up voice announcements right now.. I could even do some sound effects when powering up or down the home theatre or have it turn the volume down a bit for the announcment. :D

I got my powermate new old stock off ebay for under $30 shipped, great lil Gizmo and I want moar of em :lol:

I ordered some outdoor speakers for zone 2, I swear they are half the price now in the winter then when I priced them out last summer.. figured better not wait for the back yard weather to come.. $50 shipped for a factory refurbished pair of White Polk Atrium 5's, just enough for the back patio, I do have neighbors.. the subwoofer inside is still audible if I want it to be :)
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: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Friday 12 February 2016 16:29

Sound good! With some good plans!

The wife is the best bug reporter that there is haha, build it wife-proof and everybody can use it

HNBC84
Posts: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Friday 12 February 2016 16:34

Just a suggestion,

Mayb you can build in for the tekst sensors when there is no connection or the pioneer is of that its says someting like "Pioneer is off" or just a custom field in the config.js.

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

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

Post by nayr » Friday 12 February 2016 22:08

implemented, plus it will power off all the switches when the connection is lost.
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 1:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by steppi » Friday 12 February 2016 22:59

Hello everyone .. I have just installed the Raspberry.
I reinstalled both Domoticz that HTC ..
But now I get back an error:

Code: Select all

pi@raspberrypi:~/htc $ ./server.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/pi/htc/node_modules/serialport/build/Release/node-v11-linux-arm/serialport.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/htc/node_modules/serialport/serialport.js:14:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
pi@raspberrypi:~/htc $ 

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

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

Post by nayr » Friday 12 February 2016 23:20

try: npm install serialport
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 1:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by steppi » Saturday 13 February 2016 0:29

No.. :(

Code: Select all

pi@raspberrypi:~/htc $ npm install serialport
/
> serialport@2.0.6 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
  COPY /home/pi/htc/node_modules/serialport/build/Release/node-v46-linux-arm/serialport.node
  TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/htc/node_modules/serialport/build'
serialport@2.0.6 node_modules/serialport
├── bindings@1.2.1
├── sf@0.1.7
├── async@0.9.0
├── debug@2.2.0 (ms@0.7.1)
├── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)
└── nan@2.0.9
pi@raspberrypi:~/htc $ ./server.js

module.js:340
    throw err;
          ^
Error: Cannot find module '/home/pi/htc/node_modules/serialport/build/Release/node-v11-linux-arm/serialport.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/htc/node_modules/serialport/serialport.js:14:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
pi@raspberrypi:~/htc $ 

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

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

Post by nayr » Saturday 13 February 2016 0:37

ok thats messed up, hrmm try:

Code: Select all

cd /home/pi/htc/node_modules/serialport/build/Release/
ln -s node-v46-linux-arm node-v11-linux-arm
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 1:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by steppi » Saturday 13 February 2016 21:36

Code: Select all

pi@raspberrypi:~ $ cd /home/pi/htc/node_modules/serialport/build/Release/
pi@raspberrypi:~/htc/node_modules/serialport/build/Release $ ln -s node-v46-linux-arm node-v11-linux-arm
pi@raspberrypi:~/htc/node_modules/serialport/build/Release $ 

Code: Select all

pi@raspberrypi:~/htc $ ./server.js

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: /home/pi/htc/node_modules/serialport/build/Release/node-v46-linux-arm/serialport.node: undefined symbol: node_module_register
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/htc/node_modules/serialport/serialport.js:14:25)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
pi@raspberrypi:~/htc $ 
:(

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

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

Post by nayr » Saturday 13 February 2016 21:54

dunno whats unique to your setup HNBC84 got it going on a Pi,

try:

Code: Select all

rm -Rf ~/htc/node_modules
cd ~/htc
git pull
npm install
also whats your:
nodejs --version
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 1:33
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by steppi » Tuesday 16 February 2016 1:03

OK perfect! Now it works great!
One thing that I still can not do is Blockly .. I created many many Blockly of Domoticz, as the security system ....
I can not create an event so Blockly:
If switch "I'm home"
- I turn on the lights (ok works well ..)
- I turn on Pioneer "Internet Radio" (the problem is set up Internet Radio on Blockly there is the possibility to choose from ..)

Thanks bye!

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

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

Post by nayr » Tuesday 16 February 2016 1:43

its a Selector State device, here is an example from the Original thread talking about it.. I dont use Blocky so you might go there for guidance.

Image
to change the switch you have to use: Set Level XX change the switch state

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

HNBC84
Posts: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Tuesday 16 February 2016 16:16

Not been very much online.
Don't have logging at the moment...

But somehow the reconnect in the morning seems not to work. Don't know why not been looking for it.

Looks like the daemon stops somewhere and the cronjob fails to start. Comming back on it :)

But for shore it work great! Still need to teach myself to put the remote away.

HNBC84
Posts: 59
Joined: Tuesday 01 December 2015 11:53
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by HNBC84 » Thursday 18 February 2016 23:42

Somehow the cronjob fails?! Don't know why did try every possible situation. First think i saw, i forgot was /pi/ 8-)

But for now the vsx ping switch starts the daemon back on when not in use.
Attachments
scrstar.png
scrstar.png (30.77 KiB) Viewed 2551 times

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests