Author Topic: How to control Kodi on a Qnap nas?  (Read 6851 times)

0 Members and 1 Guest are viewing this topic.

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
How to control Kodi on a Qnap nas?
« on: September 14, 2016, 07:12:47 PM »
I am trying to control Kodi on my nas from main computer running Vox. It will listen to TCP client commands, but I don't know how to get it to accept Kodi commands. I changed the port and IP address in the plugin, but know exactly how to get the commands over. I get a error trying to get the plugin to communicate with the nas.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #1 on: September 14, 2016, 08:36:29 PM »
Hi. It's not clear what plugin you're talking about or what commands.

Have you followed all the instructions for using VoxCommando with Kodi on the wiki?

http://voxcommando.com/mediawiki/index.php?title=Installation_Kodi

If you're not starting with one of VC's standard Kodi configurations, you'll have to enable the Kodi (XBMC) plugins individually and go from there, but most of the installation instructions still apply. (However, since you're very new to VC, I'd recommend starting with a Kodi configuration.)
« Last Edit: September 15, 2016, 08:42:11 AM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #2 on: September 15, 2016, 11:50:45 AM »
I used the TCP plugin to verify that I could talk to the Qnap nas, then switched to the xmbc plugin. I enabled the Kodi on the nas and set the xbmc plugin Ip address and port, but the commands don't go. I get a fail when "testing communication" in the xmbc plugin before I even start to try commands. I can use an app on my iPad "Qremote" to control the Qnap nas. It searches for, finds and connects to the nas and allows full control. I am unable to see the settings in this app!
I have IP control of my JVC projector, Denon receiver, Gefen matrix switcher, Vera 3 for lights and IR control of the DirectTV receiver via an iTach IP2IR unit. I only need to get the nas under control. I have Irule on my iPad to control everything now except the nas, which requires the Qremore app. I am trying to get all under one app/software.
I have created a scene in Vox that will set the lighting, turn on the JVC projector, Denon receiver, switch the Gefen input and wake up the DirectTV receiver. I am now trying to set it to the nas because I have over 900 movies on it. It has Kodi installed. As I said I can control this with my iPad, it just takes several apps.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #3 on: September 15, 2016, 12:03:03 PM »
I'm sorry, I can't tell from your response whether you have followed all the instructions that I linked to above.

There are 3 'xbmc plugins' so I don't know what you're referring to.

For VC to communicate with Kodi over your network requires configuring specific settings in both VC and Kodi, and of course making sure that VC has permission to talk to all devices on your local private network.

If you follow the instructions step by step at the link provided above it should work.

TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #4 on: September 15, 2016, 12:20:43 PM »
I get a fail when "testing communication" in the xmbc plugin

In the xJson plugin there is a button with the text "Test HTTP Connection".

If this is the button that you are talking about then what is the exact message that appears when it "fails"?

Try to be more precise and use the actual names of the things you are referring to and it will make it a lot easier for us to help you.

Typically if this test fails it is because the instructions were not followed completely.  Or there is some sort of network problem such as a firewall blocking communication between VC and Kodi running on the QNap.
« Last Edit: September 15, 2016, 04:19:36 PM by jitterjames »

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #5 on: September 15, 2016, 02:00:17 PM »
I viewed the tutorials before I began to ask for help. I also researched Qnap info on the web as well. I am a retired Product Engineer. I designed hardware and modified code as needed. I don't write code, but I can read several languages and able to modify as I need. I did use the "HTTP Test connection" button and that is where it fails. I setup the network to "ON" in Kodi on the nas as shown in the tutorial! I have the port set the same! I used the TCP plugin "Client connect" to verify that the nas will respond to VC. It responds listening! I started the Kodi on the nas to check it as well. It's bound to be a small miss somewhere!

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #6 on: September 15, 2016, 03:16:01 PM »
Just went to nas via Qnap software Qfinder. Here are some of the HTML addresses.

http://192.168.1.10:8080/cgi-bin/login.html?1473960352   "brings up login screen"

http://192.168.1.10:8080/cgi-bin/main.html?4.2.2.20160901.18014822  "brings up main system screen(t Kodi not listed)"

http://192.168.1.10:8080/photostation/  "info says this will bring up Photo Station directly"

Kodi listed as app under HybridDesk Station

If I enter either of the following:
http://192.168.1.10:8080/HybridDesk Station/
http://192.168.1.10:8080/HD Station/
http://192.168.1.10:8080/HD Station/Kodi/

I get this:
 http://192.168.1.10:8080/HD%20Station/ "did not like spaces??"

http://192.168.1.10:8080/Kodi.exe/ "also tried this, failed"

Along with an error message from nas
 "Page not found or the web server is currently unavailable. Please contact the website administrator for help."

http://192.168.1.10:8080/photostation/  "this directly brings up the photo station"

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 1999
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #7 on: September 15, 2016, 03:30:52 PM »
Is it possible that the web server and remote control settings have not been fully or properly configured within your Kodi installation?

Re-check all the Kodi configuration steps described here:
http://voxcommando.com/mediawiki/index.php?title=Installation_Kodi#Kodi.2FXBMC_Network_Settings
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #8 on: September 15, 2016, 03:34:01 PM »
Just verified that the connect command will fail for local machine even though the launch kodi command works and I have full control of local machine???

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #9 on: September 15, 2016, 03:37:46 PM »
I don't have this loaded on my "repository.vc.zip" Qnap nas yet!!!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #10 on: September 15, 2016, 04:07:43 PM »
You did not answer the question I asked.  If you would answer it, that would give us a small clue as where to look.

What is the exact message that appears when it "fails"?

All the rest of your description of URLs etc. is not relevant as far as I know.
The fact that you can connect to your QNAP using the TCP plugin is not relevant since TCP and HTTP are not the same.

Talking to Kodi is not the same thing as talking to your QNAP NAS.

I don't think the fact that Kodi is running on your QNAP is really important.  If Kodi is running and configured correctly then you should be able to communicate with it regardless of what platform it is running on.  For example, I can control Kodi running on my Android tablet and the setup is the same as for a PC.

The best thing you can do to find your mistake is to go through the installation instructions again, step by step and try not to make any assumptions.  Watch the video AND read the wiki page completely.  A little bit of knowledge can be a dangerous thing.  It seems you skipped the part about installing the VoxTools addon for Kodi, for example.

One thing that I have noticed is that your QNAP appears to be serving its own web pages using port 8080.  That could be the problem if you set Kodi up to use the same port.  When you set up the webserver in Kodi, you should choose a different port to avoid a conflict since two web servers running on the same machine cannot use the same port.

See: http://voxcommando.com/mediawiki/index.php?title=Installation_Kodi#Web_server_tab

You will need to choose a free port in the Kodi config (8083 is probably OK) and then update the settings in the VC xJson plugin to use the same port.
Note that I am talking about the HTTP port.  Do not worry about the port in "Other settings" for now.

In case it is not obvious, Kodi must already be running on your NAS in order to talk to it from VC.
« Last Edit: September 15, 2016, 04:21:24 PM by jitterjames »

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #11 on: September 15, 2016, 04:10:36 PM »
Just verified that the connect command will fail for local machine even though the launch kodi command works and I have full control of local machine???

This is not possible if you are saying what I think you are saying but "I have full control of local machine" could mean a number of different things.

Launching Kodi on the local machine is not really anything like controlling Kodi.

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #12 on: September 15, 2016, 05:16:17 PM »
Got it!!! Had to change port # to 8189! I now have control! Thanks!!!!! Now to get a mic that I can run 85ft from Theater to office! Also I was thinking of getting a motion detector to trigger a pause in play when motion is detected so that new commands can be given.

NetZero

  • Jr. Member
  • **
  • Posts: 13
  • Karma: 0
    • View Profile
Re: How to control Kodi on a Qnap nas?
« Reply #13 on: September 15, 2016, 05:42:36 PM »
Of note: I had to remove the .vc from the file "repository.vc.zip" before the Kodi version on the Qnap file system would recognize it. It took an hour to figure it out. It worked on my Windows 10 machine without changing it??

I would still like to be able to remote login to the Qnap nas and launch Kodi. Qnap reccommends not letting apps run because it is bad for the harddrives.

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How to control Kodi on a Qnap nas?
« Reply #14 on: September 16, 2016, 09:49:37 AM »
Of note: I had to remove the .vc from the file "repository.vc.zip" before the Kodi version on the Qnap file system would recognize it. It took an hour to figure it out. It worked on my Windows 10 machine without changing it??
This must be an idiosyncrasy (flaw really) in the QNAP file system / OS.  Of course it works in Windows and on other systems or we would not have included the extra '.' in the filename.


I would still like to be able to remote login to the QNAP NAS and launch Kodi.

The most elegant way to do this would be through some kind of QNAP web (HTTP) API.  There is a restful API for File Station but this seems to be limited to dealing with files and doesn't let you do much more.  You could ask around on QNAP forums if there is a way to do it.

Since that probably won't work you can instead use our RoboB (RoboBrowser) plugin to automate the login and launch process.

Qnap reccommends not letting apps run because it is bad for the harddrives.
This is probably a generalization that may not apply to all apps and so may not apply to Kodi.  However Kodi certainly uses a significant amount of system resources which would probably slow down your NAS or at the very least increase the heat and power consumption so I agree that it does not make sense to leave it running all the time if you don't have to.
« Last Edit: September 16, 2016, 01:00:12 PM by jitterjames »