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

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 am a bit stuck, i'm running domoticz from a raspberry.
And the install part does not match for me...

Allready found out the NPM part, but still can't find it how to install. Ps. im a bit of a n00b on the linux part ;)

Still love this project so i wont give up, only need to find some time for it
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 »

what are you getting stuck on? being a bit of a noob is okay, tha'll keep me on my toes :)

I got my version of NodeJSv4 from here: https://nodejs.org/en/download/package-manager/
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'm not home at the moment so i need to try it a bit later this week.

For shure thats not what i had. ;)
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 »

let me tweak the npm requirements, since the powermate is optional and its kinda hard to build... next time you try do a fresh pull.

Ordered stuff today to put a nice FM antenna in the attic, I get nothing in the server room so I am looking forward to having the FM Tuner at my disposal.. have never used until now simply because it was unusable with the remote install.. Also ordered a cable to run to the garage, going to finally hookup Zone3 so I have something to test with.
Last edited by nayr on Monday 01 February 2016 10:58, edited 2 times in total.
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 will start freshly ;) Big thx!
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 i got it.

For (my) raspberry i need to mkdir service.


pi@domoticz ~/htc $ sudo cp systemd/htc.service /etc/systemd/system/
pi@domoticz ~/htc $ nano systemd/htc.service
pi@domoticz ~/htc $ sudo mkdir /etc/systemd/service
pi@domoticz ~/htc $ sudo cp systemd/htc.service /etc/systemd/service/
pi@domoticz ~/htc $ ls


pi@domoticz ~/htc $ ./server.js
FATAL AVR ERROR: Error: connect EHOSTUNREACH :)

Now need to do the config parts.


./server.js is working, me happy

but now:


pi@domoticz ~ $ sudo systemctl enable htc
sudo: systemctl: command not found

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

sweet, let me do some googling on your Pi.. thats just the startup script so you can leave it dangling for now and start it up by hand.. ./daemon.js start will launch the server.js into the background... and ./daemon.js stop will of course stop the server.

It looks like you dont use SystemD, so Im going to have to write startup scripts specific for the Pi.. I bet Rasbian is based off Wheesy and I am working off Jessie. (Old Stable Debian and New Stable Debian)

I went ahead and ordered me another usb to RS232 adapter as I decided I want serial control over my AVR.. it should not make much difference but be more stable for my setup, as a result HTC will support both serial and IP connections soon.. I loose HDMI DRM handshake every few days so I have a hard timer on my AVR to reset every night, this causes the HTC to crash and have to be restarted.. wont have that problem with serial as the connection will remain open always, regardless if I hard cycle the Pioneer.

a big reason for my init script was to restart the htc server automatically if it crashed, in some cases it is designed to crash.. like if the network goes away or the receiver is unreachable.. this way it can cleanly exit and keep retrying until everything comes back online.. I dont know if that same recovery method will work without SystemD.. I guess I can have you load a crontab to make sure its still running from time to time.

try this:

Code: Select all

crontab -l > ~/crontab
echo '*/5 * * * * ~/htc/daemon.js start' >> ~/crontab
crontab ~/crontab
that will try to start it every 5 mins, if its already running it will do nothing.. so it should recover from network issues.
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 »

Hello everyone! Congratulations on this project, is a long time that I try to work with my AVR Pioneer SC-2024 ..
I would like to install this handout (Pioneer) also Homebridge .. Some of you would be able to help me?

thank you! Hello!
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 »

looking at homebridge for the first time right now it seems it would be better if you got that to interface with Domoticz, then it would have access to all the Domoticz devices.. including your Pioneer with the help of this app.

as for getting your Pioneer setup in Domoticz, read through this thread.. its got alot of information to get you started.. let me know if you have problems and I'll get you a solution. Your Pioneer looks very much like mine, just with an extra HDMI out port and built in Bluetooth.. I dont have any support for multiple outputs right now so if you need that working we'll have to come up with something.. perhaps one input selector for each output.
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 »

Ok I checked in code today that should finish up support for Zone2 Input Selector. have not really tested it so let me know how it works.. once everyone is happy with Zone2 I can reuse the code for the other zones.

*edit* tested zone 2 a bit and its not quite there, dont enable zone2 selector in your config its bugged out.

Also fixed a bunch of bugs and did alot of testing, added SysLog support so I can leave debug on while running in the background.. my poor family is involuntary beta testers :P

I am going to let anything not Zone2 related simmer for a while and just fix any issues that come up.. see how the family copes with it, wife is asking for a usermanual... sigh.
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 update all, raspberry,Domoticz beta HTcontroller and now i get this error:


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

/home/pi/htc/config.js:18
log : false // Extra Debug Logging
^^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
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)
at require (module.js:380:17)
at Object.<anonymous> (/home/pi/htc/server.js:6:16)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
pi@domoticz ~/htc $


And for the NodeJS i get this back is this a problem?:

pi@domoticz ~/htc $ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
nodejs : Depends: libc6 (>= 2.16) but 2.13-38+rpi2+deb7u8 is to be installed
Depends: libstdc++6 (>= 5.2) but 4.8.2-21~rpi3rpi1 is to be installed
E: Unable to correct problems, you have held broken packages.

pi@domoticz ~/htc $
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 »

oops I ommited a comma in the example.config, its missing after the syslog line.. checked in a fixed example.

crap it looks like wheezy/rasbian cant run the latest NodeJS on arm platform.. wtf, sigh.. okay I guess you'll have to use whatever comes with it and hope it works.
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 »

thanks nair
My only goal is to manage my Pioneer SC-2024, I do not care the TV Android, and more ..
I tried to install your package, but I can not go .. I block bonfire here:

Code: Select all

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

/home/pi/htc/config.js:18
	log		: false			// Extra Debug Logging
	^^^
SyntaxError: Unexpected identifier
    at Module._compile (module.js:439:25)
    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)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/htc/server.js:6:16)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
pi@domoticz:~/htc $ 
Would you be able to help me please? Thank you very much!
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 left out a comma in the config example, in your config simply add the missing comma on the syslog line above.. ie

Code: Select all

	syslog	: false,		// Log to Syslog
	log		: false,		// Extra Debug Logging
};
see: https://github.com/nayrnet/domoticz-htc ... 3ea2daca0f

Ive corrected the example upstream if you update and review.. this is one of those projects I have no other option but to work on it late at night when everyone is asleep, else I catch flack for breaking the TV.
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 »

ok I had time to play around a bit with it today, and do alot of Zone2 testing and I believe Zone2 Input selector is fully working as of now.. I dont have speakers hooked up but as far as watching the console all the right things are happening that if I did they would be playing.. I'll do some more testing then start expanding the code for Zone3 & Zone4.

Just create another dummy selector switch, set it up to match the zoneInputs configuration object for HTC.. then get that switch IDX from the Devices window and put it in the zone2 config under switches.. zone2/3/4 will all have to share the same input list, I see no reason why they need to be unique.

my external antenna for the Radio tuner should be here this week, I'll get it hooked up then I should be able to finish up the FM tuner.. it too is a little hard to verify with no audio output.

now to get you guys running it and see if any new issues spring up, almost got volume sliders working.. getting close to that Version 1.0 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 »

Love the fast and good support :) That i did't see the , error.


New problem and i cant see where its link from:

Code: Select all

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

module.js:340
    throw err;
          ^
Error: Cannot find module 'request'
    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/hardware/pioneeravr.js:6:17)
    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@domoticz ~/htc $ ls
config.example  daemon.js  LICENSE       README.md  screenshots  systemd
config.js       hardware   package.json  rsyslog.d  server.js

pi@domoticz ~/htc $ ./daemon.js

module.js:340
    throw err;
          ^
Error: Cannot find module 'daemonize2'
    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/daemon.js:4:14)
    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 Function.Module.runMain (module.js:497:10)
    
pi@domoticz ~/htc $ ./daemon.js start

module.js:340
    throw err;
          ^
Error: Cannot find module 'daemonize2'
    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/daemon.js:4:14)
    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 Function.Module.runMain (module.js:497:10)
pi@domoticz ~/htc $
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 »

run 'npm install' from the base of the htc folder.. your missing the required modules.
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 »

npm was the missing link, i deleted the HTC folder.
Today i start over and give it a new try...

Yesterday i had the same issue

Code: Select all

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

/home/pi/htc/server.js:481
        console.log("ERROR: " + err)
                ^
TypeError: Cannot call method 'log' of undefined
    at process.<anonymous> (/home/pi/htc/server.js:481:10)
    at process.emit (events.js:95:17)
    at process._fatalException (node.js:301:26)
pi@domoticz ~/htc $
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 »

Nayr Hello! Unfortunately, I have also had the same problem! :(

Code: Select all

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

/home/pi/htc/server.js:481
	console.log("ERROR: " + err)
	        ^
TypeError: Cannot call method 'log' of undefined
    at process.<anonymous> (/home/pi/htc/server.js:481:10)
    at process.emit (events.js:95:17)
    at process._fatalException (node.js:272:26)
How come I can not let go of this? Where am I wrong?
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 »

ouch that was unexpected, okay that was a bug introduced when I added syslog support.. pushed a fix upstream.. do a 'git pull' and try again.

fix: https://github.com/nayrnet/domoticz-htc ... a22cfa415a

other than that hope you guys find success, its been running over a week now for me without any crashes or waking up to a house mad that the TV wont turn on :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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest