Page 7 of 11

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

Posted: Wednesday 10 February 2016 22:38
by HNBC84
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


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

Posted: Wednesday 10 February 2016 23:54
by nayr
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.

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

Posted: Thursday 11 February 2016 0:07
by steppi
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)

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

Posted: Thursday 11 February 2016 0:19
by nayr
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.

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

Posted: Thursday 11 February 2016 14:58
by HNBC84
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

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

Posted: Thursday 11 February 2016 14:58
by HNBC84
Btw how is the powermate working?

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

Posted: Thursday 11 February 2016 17:12
by nayr
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 :)

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

Posted: Friday 12 February 2016 15:29
by HNBC84
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

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

Posted: Friday 12 February 2016 15:34
by HNBC84
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.

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

Posted: Friday 12 February 2016 21:08
by nayr
implemented, plus it will power off all the switches when the connection is lost.

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

Posted: Friday 12 February 2016 21:59
by steppi
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 $ 

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

Posted: Friday 12 February 2016 22:20
by nayr
try: npm install serialport

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

Posted: Friday 12 February 2016 23:29
by steppi
No.. :(

Code: Select all

pi@raspberrypi:~/htc $ npm install serialport
/
> [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
  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'
[email protected] node_modules/serialport
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected])
└── [email protected]
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 $ 

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

Posted: Friday 12 February 2016 23:37
by nayr
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

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

Posted: Saturday 13 February 2016 20:36
by steppi

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 $ 
:(

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

Posted: Saturday 13 February 2016 20:54
by nayr
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

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

Posted: Tuesday 16 February 2016 0:03
by steppi
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!

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

Posted: Tuesday 16 February 2016 0:43
by nayr
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

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

Posted: Tuesday 16 February 2016 15:16
by HNBC84
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.

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

Posted: Thursday 18 February 2016 22:42
by HNBC84
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.