This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Official SDK2

[APP] Kodi [2.2.0]

12021232526

Comments

  • B3rtB3rt Member
    EvertorN said:
    Guys version 1.9 has just been published to the app store, so you should all receive the update shortly.

    @B3rt this should solve your issues with movies/series triggers.
    Helaas werkt nog steeds niet, bij films wel maar bij tv series doet ie nog steeds niets.
  • @B3rt Could you try to play a movie and post the log output? You can find it under kodi settings 
  • Hi,

    I have a problem with this app. It works, actions are triggered and all is well.
    But after each new start of my PC with kodi ( a day later for instance) each action is triggered multiple times.
    I have homey say "Enjoy !" when kodi starts playing, but it is telling me this a lot of times after a few days.
    First day 1 trigger
    2nd day 2 triggers
    3rd day 4 triggers
    4th day 8 triggers
    then 16, 32, 64, 128 triggers.
    (Imagine, Enjoy, Enjoy, Enjoy, Enjoy, Enjoy, Enjoy.......... when a movie begins :) )

    When I reboot Homey,  all starts from the beginning again.
    It also means my hue lights get triggered soooooo many times after a few days, I think that that in itself causes other problems as well.

    Thanks!
  • I have seen this same issue for a while now, but never noticed it was increasing. Most of the times, Homey stops telling me to enjoy the movie. It looks like the Kodi-flows only work for a short while.
    That is, for the Kodi-machine in the living room. The one in my home theater room is working fine every time!
  • Here is the log for today. It's clear it does stuff twice today. Tomorrow 4 times :)

    2017-09-11T18:37:15.025Z"Trying to reconnect"
    2017-09-11T18:37:15.027Z"Trying to reconnect"
    2017-09-11T18:37:18.025Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:18.026Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:28.033Z"Trying to reconnect"
    2017-09-11T18:37:28.037Z"Trying to reconnect"
    2017-09-11T18:37:31.032Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:31.036Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:41.073Z"Trying to reconnect"
    2017-09-11T18:37:41.075Z"Trying to reconnect"
    2017-09-11T18:37:44.072Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:44.074Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:54.097Z"Trying to reconnect"
    2017-09-11T18:37:54.099Z"Trying to reconnect"
    2017-09-11T18:37:57.102Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:37:57.105Z"Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:38:07.153Z"Trying to reconnect"
    2017-09-11T18:38:07.155Z"Trying to reconnect"
    2017-09-11T18:40:14.511Z"Stil cannot reconnect: " {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:40:14.513Z"Stil cannot reconnect: " {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:40:24.529Z"Trying to reconnect"
    2017-09-11T18:40:24.531Z"Trying to reconnect"
    2017-09-11T18:42:31.791Z"Stil cannot reconnect: " {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:42:31.793Z"Stil cannot reconnect: " {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"192.168.0.112","port":9090}
    2017-09-11T18:42:41.842Z"Trying to reconnect"
    2017-09-11T18:42:41.845Z"Trying to reconnect"
    2017-09-11T18:42:42.232Z"startListeningForEvents(192.168.0.112)"
    2017-09-11T18:42:42.233Z"Triggering kodi_reconnect"
    2017-09-11T18:42:42.324Z"startListeningForEvents(192.168.0.112)"
    2017-09-11T18:42:42.325Z"Triggering kodi_reconnect"
    2017-09-11T18:47:59.100Z"onKodiPlay(192.168.0.112)"
    2017-09-11T18:47:59.101Z"Triggering flow kodi_playing_something"
    2017-09-11T18:47:59.109Z"onKodiPlay(192.168.0.112)"
    2017-09-11T18:47:59.109Z"Triggering flow kodi_playing_something"
    2017-09-11T18:47:59.243Z{"response":{"code":-32602,"data":{"method":"VideoLibrary.GetEpisodeDetails","stack":{"message":"Value between 1 (inclusive) and 2147483647 (inclusive) expected but -1 received","name":"episodeid","type":"integer"}},"message":"Invalid params."}}
    2017-09-11T18:47:59.279Z{"response":{"code":-32602,"data":{"method":"VideoLibrary.GetEpisodeDetails","stack":{"message":"Value between 1 (inclusive) and 2147483647 (inclusive) expected but -1 received","name":"episodeid","type":"integer"}},"message":"Invalid params."}}
    2017-09-11T19:16:25.674Z"onKodiGenericEvent() " "kodi_pause"
    2017-09-11T19:16:25.675Z"Triggering flow " "kodi_pause" " for(192.168.0.112)"
    2017-09-11T19:16:25.846Z"onKodiGenericEvent() " "kodi_pause"
    2017-09-11T19:16:25.849Z"Triggering flow " "kodi_pause" " for(192.168.0.112)"
    2017-09-11T19:16:43.113Z"onKodiPlay(192.168.0.112)"
    2017-09-11T19:16:43.115Z"Triggering flow kodi_playing_something"
    2017-09-11T19:16:43.121Z"onKodiPlay(192.168.0.112)"
    2017-09-11T19:16:43.121Z"Triggering flow kodi_playing_something"
    2017-09-11T19:16:43.127Z"Triggering flow kodi_resume"
    2017-09-11T19:16:43.301Z"Triggering flow kodi_resume"
    2017-09-11T19:39:10.604Z"onKodiStop(192.168.0.112)"
    2017-09-11T19:39:10.605Z"Triggering flow " "kodi_stop"
    2017-09-11T19:39:10.609Z"onKodiStop(192.168.0.112)"
    2017-09-11T19:39:10.629Z"Triggering flow " "kodi_stop"
  • @Tiyrell Just checking, so you have Kodi installed on a desktop computer that you shutdown / sleep? Then, after a restart, you get duplicate events for every subsequent restart?
  • Hi!
    Thats correct. I never restart on the same day though. So I do not know if I restart on the same day that it would trigger the same issue. However, I would not be surprised if it did.
  • AmelsfortAmelsfort Member
    edited September 2017
    I also noticed the connection to Kodi is lost without reconnecting very often. When I reboot Homey, I do get the 'Enjoy your movie' messages again, but not after I shut down Kodi and restart it later.
    Even stranger is that it does seem to work fine on my other Kodi system. I have a flow which turns off a light when Kodi starts and back on when I pause the movie or it ends. That flow seems to be working fine all the time!

    I just checked the logs and noticed different messages:
    2017-09-22T10:46:06.183Z "Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.1.126","port":9090}
    2017-09-22T10:46:16.229Z "Trying to reconnect"
    2017-09-22T10:46:19.253Z "Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.1.126","port":9090}
    2017-09-22T10:46:29.269Z "Trying to reconnect"
    2017-09-22T10:46:32.282Z "Stil cannot reconnect: " {"code":"EHOSTUNREACH","errno":"EHOSTUNREACH","syscall":"connect","address":"192.168.1.126","port":9090}
    2017-09-22T10:46:42.331Z "Trying to reconnect"

    This is for the Kodi that keeps working fine. The other one has logs like:
    2017-09-22T10:48:13.262Z "Stil cannot reconnect: " {"code":"ETIMEDOUT","errno":"ETIMEDOUT","syscall":"connect","address":"192.168.1.8","port":9090}
    2017-09-22T10:48:13.527Z "Trying to reconnect"

    Those logs appear just once in a while. The other lines more often.
    Ping also shows a 'destination unreachable' for one machine and a timeout for the other. No problem, but I looks like the retries behave differently for both responses.
  • Hello,
    I cant even get my kodi flows to tell my anything. Iam running kodi on a amazon FireTV box.
    Homey says its connected
  • Here is the log, funny thing is i started a TVShow and i have a flow for TVShows and movies but it doesnt seem to get activated on start of it in kodi

    "Triggering flow kodi_playing_something"
    2017-09-23T10:54:50.211Z{"response":{"code":-32602,"data":{"method":"VideoLibrary.GetEpisodeDetails","stack":{"message":"Value between 1 (inclusive) and 2147483647 (inclusive) expected but -1 received","name":"episodeid","type":"integer"}},"message":"Invalid params."}}
  • EvertorN said:
    Richy said:
    Richy said:
    I keep getting "unexpected server response (401)" when trying to connect.
    Is there a user/passwd problem in this case? I use standard logins, same as for Kodi remote app. This app connects without a problem. I use port 80.
    Wake on lan works on the same IP.
    Shutting down the remote app makes no difference.
    Tried network, modem, router, Homey, Kodi reboots/restarts.
    I'm using OpenELEC 5. This is an older version which cannot be updated due to specific configurated and adjusted for the hardware. Do not have the time to build a new dedicated OpenELEC version soon.

    The very first time installing there has been a connection if I remember right.
    I tried other versions from git as well. Sometimes getting error 200.

    Don't know where to look anymore. Any hints?
    Thanks in advance.

    Still can't connect to Kodi on OpenELEC ... :-(
    "Error: unexpected server response (200)"
    Really don't know how to get it to connect.
    Please refer to the FAQ in the main post of this thread.
    I'm getting the same issue.

    "Could not connect to your Kodi! Please verify your details. Error: unexpected server response (404)"

    Running Kodi 17.4 on Ubuntu.
    I'm able to remotely connect to Kodi with the Kodi remote app via port 8080. Also able to access the Kodi server via a browser over port 8080.

    But just not with Homey over port 8080. FAQ only states not to use 9090.
  • limkopi78 said:
    EvertorN said:
    Richy said:
    Richy said:
    I keep getting "unexpected server response (401)" when trying to connect.
    Is there a user/passwd problem in this case? I use standard logins, same as for Kodi remote app. This app connects without a problem. I use port 80.
    Wake on lan works on the same IP.
    Shutting down the remote app makes no difference.
    Tried network, modem, router, Homey, Kodi reboots/restarts.
    I'm using OpenELEC 5. This is an older version which cannot be updated due to specific configurated and adjusted for the hardware. Do not have the time to build a new dedicated OpenELEC version soon.

    The very first time installing there has been a connection if I remember right.
    I tried other versions from git as well. Sometimes getting error 200.

    Don't know where to look anymore. Any hints?
    Thanks in advance.

    Still can't connect to Kodi on OpenELEC ... :-(
    "Error: unexpected server response (200)"
    Really don't know how to get it to connect.
    Please refer to the FAQ in the main post of this thread.
    I'm getting the same issue.

    "Could not connect to your Kodi! Please verify your details. Error: unexpected server response (404)"

    Running Kodi 17.4 on Ubuntu.
    I'm able to remotely connect to Kodi with the Kodi remote app via port 8080. Also able to access the Kodi server via a browser over port 8080.

    But just not with Homey over port 8080. FAQ only states not to use 9090.
    The webbrowser you are using uses HTTP (over port 8080) to access Kodi. The Kodi app for Homey uses TCP over port 9090. This is why you cannot configure your HTTP port to be 9090, because it is required for TCP. When configuring your connection details in the Homey app, make sure to put in 9090, not 8080.
  • EvertorN said:
    limkopi78 said:
    EvertorN said:
    Richy said:
    Richy said:
    I keep getting "unexpected server response (401)" when trying to connect.
    Is there a user/passwd problem in this case? I use standard logins, same as for Kodi remote app. This app connects without a problem. I use port 80.
    Wake on lan works on the same IP.
    Shutting down the remote app makes no difference.
    Tried network, modem, router, Homey, Kodi reboots/restarts.
    I'm using OpenELEC 5. This is an older version which cannot be updated due to specific configurated and adjusted for the hardware. Do not have the time to build a new dedicated OpenELEC version soon.

    The very first time installing there has been a connection if I remember right.
    I tried other versions from git as well. Sometimes getting error 200.

    Don't know where to look anymore. Any hints?
    Thanks in advance.

    Still can't connect to Kodi on OpenELEC ... :-(
    "Error: unexpected server response (200)"
    Really don't know how to get it to connect.
    Please refer to the FAQ in the main post of this thread.
    I'm getting the same issue.

    "Could not connect to your Kodi! Please verify your details. Error: unexpected server response (404)"

    Running Kodi 17.4 on Ubuntu.
    I'm able to remotely connect to Kodi with the Kodi remote app via port 8080. Also able to access the Kodi server via a browser over port 8080.

    But just not with Homey over port 8080. FAQ only states not to use 9090.
    The webbrowser you are using uses HTTP (over port 8080) to access Kodi. The Kodi app for Homey uses TCP over port 9090. This is why you cannot configure your HTTP port to be 9090, because it is required for TCP. When configuring your connection details in the Homey app, make sure to put in 9090, not 8080.
    I see, so the FAQ meant: To configure 8080 in Kodi but in the Homey Kodi app to specify 9090. 
    Sorry I had a different interpretation of what the FAQ meant.


  • WRosWRos Member
    edited September 2017
    I would like to know which kind of media is playing. It would be create to have a card in the "AND" column.

    So you know KODI is playing audio, video, movie, .etc.
    http://{KODI IP}/jsonrpc?request={"jsonrpc": "2.0", "method": "Player.GetActivePlayers", "id": 1}
    Results
    {"id":1,"jsonrpc":"2.0","result":[]}
    {"id":1,"jsonrpc":"2.0","result":[{"playerid":0,"type":"audio"}]}
    {"id":1,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}
    
    @EvertorN I couldn't find any json request in your code. I'm tried to fix this by my own. Could you give a tip?
    
    Another thing I wanna try to create: The Playlist Action Card:
    http://{KODI IP}/jsonrpc?request={"jsonrpc": "2.0", "method": "Playlist.Add","params":{"playlistid":0,"item":{"directory": "special://profile/playlists/music/Party.xsp", "media": "music"}},"id":1}
    
  • Can somebody explain why i cannot play my music from my teevee.io box , movie side wordks fine but i cannot play music with te app, "speel muziek van artiest......." does not work , hope somebody has a awnser 

    Jack 

  • @tyrrell6w when you look in tho log file, you could find some helpful information.
    Log file: settings - kodi
  • There is nothing in The log file concerning playing music at all ? only the working movie voice commands
  • Could you post your flows? Or are you tying to give voice commands?

    For me the voice commands are working. Same for the flows.
  • Its voice only untill now , today i will make some flows en give thet a try 
    The standard voice command "speel muziek van artiest......." is not working 
    Homey says there are no music apps installed.
    i think the music system build  in homey is mixing thing up 
  • Exile82Exile82 Member
    edited October 2017
    Hi guys.
    Got my Homey this week, one of the deciders was this brilliant app that I now try to configure. 
    Embarrassingly, I get the famous  "Error: unexpected server response (200)"

    I am a bit confused though, so I would really appreciate some assistans from you. The FAQ says that I should configure my HTTP port to be different from the TCP port. Done! But in the app I should enter my TCP port, is that the HTTP port, or the static TCP port which is 9090 (since it is static I do not see any point in having that choice though) 

    When I enter all the settings in the app, I get the "Error: unexpected server response (200)"

    I am convinced that I have done something wrong, but I need some help to figure it out. The IP number of the device is 192.168.1.34, of that I am sure. I also tried to use port 8080 but with the same result.

    FYI, just tried to use another port in the app. This port is not selected in kodi, then I get another error message: Could not connect to your Kodi! Please verify your details. Error: connect ECONNREFUSED 192.168.1.34:4532
  • No ideas?
  • Could you open the web interface with a browser on the configured port number?
  • Hi (first post)

    I'm getting my hub next week. Would this work with Kodi that's installed on Qnap Nas, and is on the same network?

    Thank you

  • WRosWRos Member
    edited October 2017
    Hi @terry welcome

    When it is possible to connect to the web interface, it works.
    You could test it to connect with a browser to homey.

  • WRos said:
    Hi @terry welcome

    When it is possible to connect to the web interface, it works.
    You could test it to connect with a browser to homey.


    Thank you.

    I will report back when it's all setup.

  • If I use voice command "I want to watch a movie" it works perfect, but if I use commande like "Stop" or "Pause" Homey give me "-Stopping music playback".

    Any idea to why this is happening? (I want the movie on kodi to stop or pause instead)
  • The voice commands aren't useful when you using it for media related thing. 
    Hopefully the default voice commands will make configurable by Athom.
  • EvertorNEvertorN Member
    edited October 2017
    @Exile82: When configuring the app on your Homey, make sure to put in port 9090 as the TCP port. Don't put 9090 as the HTTP port on your Kodi, as this will conflict with the default TCP port of Homey (resulting in the infamous 200 OK error). To summarize, leave the HTTP port on Kodi on 8080 (or disable HTTP altogether) and use 9090 when you are connecting from Homey > Kodi.

    Also to clarify. Accessing Kodi over the web has nothing to do with how Homey connects to Kodi. Kodi has two ways of receiving connections, HTTP and TCP. HTTP is a one-way communication method and is also the protocol that is used to communicate through the web. TCP allows for two-way communication and is required to 'listen' to events from Kodi (e.g. movie start). This is the reason the Homey app uses TCP to communicate with kodi.

    @Stefan_8182: Unfortunately I cannot do anything about this because Athom thinks its internal speaker command is more important than the kodi command. I am not sure if and when Athom will make their speech recognition smarter, but for now the internal commands conflict :(
  • RichyRichy Member
    edited November 2017
    Any idea what goes wrong in using voice recognition looking at this log? First time starting the app gave no problem.  (Radio addon was starting). After that Kodi doesn't switch to the app anymore. According to the log the tekst to start the app is recognised ("Start programma radio").
    Is it possible that after first starting the addon Kodi is not switching to the addon with this command because the addon is already started?

    2017-11-01T09:27:17.526Z"searchAddon()" null " radio"
    2017-11-01T09:27:17.526Z"getKodiInstance" null
    2017-11-01T09:27:31.030Z{"locations":[],"transcript":"start programma radio","confidence":0.51,"duration":7194,"engine":0,"words":[{"universal_tag":"ADJ","chunks":[{"endWord":2,"type":"NP","transcript":"start programma radio","startWord":0}],"pos":"adj","word":"start"},{"pos":"noun","word":"programma","universal_tag":"NOUN"},{"pos":"noun","word":"radio","universal_tag":"NOUN"}],"language":"nl","chunks":[{"endWord":2,"type":"NP","transcript":"start programma radio","startWord":0}],"session":"mobile5299","synthesize":true,"devices":[],"qualifiedAgents":{"homey:manager:speech-output":{},"homey:manager:ledring":{},"homey:manager:updates":{},"homey:manager:alarms":{},"homey:manager:system":{},"homey:manager:presence":{},"homey:manager:cloud":{},"homey:manager:speech-input":{},"homey:manager:devices":{},"homey:deviceclass:amplifier":{},"homey:deviceclass:light":{},"homey:deviceclass:lock":{},"homey:deviceclass:sensor":{},"homey:deviceclass:socket":{},"homey:deviceclass:thermostat":{},"homey:deviceclass:tv":{},"homey:deviceclass:vacuumcleaner":{},"homey:deviceclass:windowcoverings":{},"homey:manager:speaker":{},"homey:manager:media":{}},"triggers":[{"id":"kodi_start_addon","position":0,"text":"start programma"}],"time":false,"agent":"homey:app:nl.marvinschenkel.kodi"}
    2017-11-01T09:27:31.038Z"searchAddon()" null " radio"
    2017-11-01T09:27:31.040Z"getKodiInstance" null
    2017-11-01T09:28:01.162Z{"locations":[],"transcript":"start programma radio","confidence":0.51,"duration":7529,"engine":0,"words":[{"universal_tag":"ADJ","chunks":[{"endWord":2,"type":"NP","transcript":"start programma radio","startWord":0}],"pos":"adj","word":"start"},{"pos":"noun","word":"programma","universal_tag":"NOUN"},{"pos":"noun","word":"radio","universal_tag":"NOUN"}],"language":"nl","chunks":[{"endWord":2,"type":"NP","transcript":"start programma radio","startWord":0}],"session":"mobile36854","synthesize":true,"devices":[],"qualifiedAgents":{"homey:manager:speech-output":{},"homey:manager:ledring":{},"homey:manager:updates":{},"homey:manager:alarms":{},"homey:manager:system":{},"homey:manager:presence":{},"homey:manager:cloud":{},"homey:manager:speech-input":{},"homey:manager:devices":{},"homey:deviceclass:amplifier":{},"homey:deviceclass:light":{},"homey:deviceclass:lock":{},"homey:deviceclass:sensor":{},"homey:deviceclass:socket":{},"homey:deviceclass:thermostat":{},"homey:deviceclass:tv":{},"homey:deviceclass:vacuumcleaner":{},"homey:deviceclass:windowcoverings":{},"homey:manager:speaker":{},"homey:manager:media":{}},"triggers":[{"id":"kodi_start_addon","position":0,"text":"start programma"}],"time":false,"agent":"homey:app:nl.marvinschenkel.kodi"}
    2017-11-01T09:28:01.209Z"searchAddon()" null " radio"
    2017-11-01T09:28:01.210Z"getKodiInstance" null
  • bvdbosbvdbos Member
    edited November 2017
    @Richy: Could you post in English so everybody understands what you're saying/asking?
    Thanks...
Sign In or Register to comment.