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.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Official SDK2
Comments
Play, pause, resume work fine but when stop is pressed nothing happens.
- Are you sure you have configured your flow correctly?
- Can you send me your log details when you press stop (Apps > Kodi)?
- Are you using the trigger card 'Kodi has been stopped / Kodi is gestopt'?
When I check my log, I can see something like this when I press stop:
only play, resume, pause etc:
[code]
I made a versy simple test flow, on start, pause, resume and stop homey should say a numer 1,2,3 or 4
When stop is pressed it should say '4'...
All commands work exept stop, here nothing happens, no speach and no log entry.
I tried to delete the flow, create an other one etc, on all commands it works exept on stop.
just logged in my homey to perform an update (1.1.4) and say that your app was updated to 1.7.0 but it had a red cross next to it. So i looked at that error message and captured it for you. (this is/was on 1.1.2 firmware, i'm gonna upgrade in a couple of seconds.)
It's a great app but missing one option (request) for me and thats set a delay before it's gonna search for a movie. My intel nuc needs some time to boot from PXE and the kodi app already want's to perform the search action after "welke film wil je kijken" and gives a error " kan het apparaat niet vinden". I don't know if it's possible to build this in the flow cards (because when mediaserver is already running it shouldn't wait for x seconds)
As for your delay, I need to know a bit more about your setup. How are you waking your device?
I think you'd be able to handle this in flows. v1.7.0 contains a new trigger card 'when homey connects to Kodi'. This is an event that indicates the Kodi app is ready to take commands. So what you could do is:
- Configure a flow that triggers on 'When homey connects to Kodi', then set a variable 'Kodi is ready'
- Use that variable to introduce a delay in your commands
I'm not a 100% sure if this will work. If not, give me some more information of your setup and we'll find a way to make it work
You first have to create a little python kodi addon to install on kodi which pushes info to homey.
The if you do something on kodi, for example press play, kodi gives then a api call to homey to trigger a flow of your app, homey does the rest.
This way micasaverde (vera) worked, it was a simple small addon install in kodi where you had to set the IP of your vera unit (in this case homey) and some setting where you could set what to trigger, for example only trigger on movies or playing music, trigger only if it is night etc(this kind of settings, but this can also be done in homey app)..
Using kodi to trigger a flow you loose the whole (re)connection and polling problem.
The flow card system stay as it is, the only change would be the way homey gets its info from kodi.
Hope this info helps and is usable!
I think this is a great idea from @B3rt, is this possible?
Only problem here will be creating the kodi addon and that you have to install somthing on kodi aswell.
How this kodi addon exactly works i don't know but maybe someone could use (take a look) at how they did it and change the api call to you controller.
I have the addon here which vera uses on kodi if someone want to try it..
With the latest update 1.7.0 i have a problem, when homey connect to kodi or shutdown and homey says something, it says 14-15 times again again and again, can you look into this? And can you make a trigger when kodi ends.
Thanks and Cheers
Got a flow that makes Homey say 'Enjoy the movie' when it starts, and it's always said twice now
For now, I think the easiest resolution would be to remove your device and re-add it. Or open up the edit device screen and press ok (without making changes) to edit your device.
@olive Thanks for the donation, will definitely use it to buy me a beer
@Reemster Could you provide me with the log details just before it stops working?
- This would not fix the connection problem, but only reverse it. Homey can reboot / lose connection too and this would mean I have to poll for the Homey connection rather than the Kodi connection. Same problem, just reversed. The whole connection setup is sort of a chicken-egg problem, so polling is required. FYI, events like 'pause', 'stop' etc are already pushed from Kodi to Homey using TCP notifications.
- I would still have to write a fairly big Homey app to deal with flow actions (e.g. 'Play this movie'). This would cause the app to be split into two parts in two programming language, thus hard to maintain.
- It would mean the end users have to install two things and configure them twice: A Kodi addon and a Homey app. Some (non techy) end users are already struggling with the current setup, so this doesn't seem like a good idea to me..
Just a simple kodi trigger app for play, pause etc to turn on other flows etc which is pushed from kodi.
I believe that the most used functions are only play, pause etc just to turn of light when you watch a movie.
The extra functions such as which movie title etc doesn't matter (in my case), i manage and see my movie collection in kodi, couchpotato, sickbeard etc, not in Homey. I don't see the extra value to need to know which movie is playing in Homey.
If i want to watch a movie, homey only should respond to tune on/of the correct lighting etc. I does not have to manage kodi by starting, stopping a movie etc. Voice control does not work that good, when i have to use a remote there are better solutions like a logitech harmony to control it.
I even prefer controlling stuff by button instead of voice.....
Offtopic:
The whole media idea of homey is not neccesarry is my opiniun, homey is a home/light controller not a mediaplayer, other devices do this much much better, these devices are desgined to do this.
It is nice that homey respond on these devices but it should not take it over or try to replace it.
I am actually truly interested what people do with the info that Homey knows the title of the movie it is playing....
I cannot image what to do with this kind of information with Homey what Kodi not allready does...
The whole point of this app is to support a wide variety of functionality in order to respond to everyone's needs.
For example, I personally use voice a lot. I have linked my Google Pixel's voice assistant to Homey and it works like a charm. Things like:
'Play the latest episode of Shameless'
'Play movie whatever'
'Turn off the subtitles'
'Pause'
'Resume'
As for the second app. I won't be building this. This would require 2 new apps (a new homey app and a new Kodi addon) and there won't be any benefit. Like I said, you'd still be facing the polling issue from Kodi to Homey when Homey reboots. I'd rather spend my time on extending and stabilising this app.
I just added some http get flows and let my synology nas cal them if kodi player changed state.
I was allready monitoring kodi on my NAS using bash scripts and saving some info in a database (all on my NAS), i expanded the script, when a player state occurs (play, pause, resume and stop) it does a http call to Homey and so trigger a flow 'on play' do this on stop do that etc etc.
- Setup a HTTP connection to Homey
- Trigger the flow
My app uses the TCP protocol to establish a persistent connection that allows for two-way communication (e.g. kodi>homey on 'pause' and homey>kodi on 'start movie'). So whenever one of the devices reboots, the connection is lost and needs to be re-established by polling. This is done by the Homey app and as of 1.7, I have had no problems of connection loss.
Again, the reason your solution works well is because you set up a connection at the time of the event (HTTP call). This allows one-way communication only and is therefore not a wanted solution for this app since the Kodi app for Homey requires two-way communication.
Hope this clears things up for you.
Also, if everyone has connection problems on 1.7 (or higher) please let me know so we can figure out what's wrong.
Only looking for someone who could create a kodi addon to do the http call to homey.
Is does not have to do more when i want to contol the lighting if i start a movie, within the flows i can do the filtering if or when i want to swicth on or off lights when i want to watch a movie.
Currently my NAS does this, it filters if it is a movie, musi or a tv show i am wathing.
It only triggers when i watching a movie, so not when playing music or watching a TV show.
Hope it helps.
The problem is still there with the latest update
I tried to reproduce the problem but I couldn't. Could you send me the log and tell me the steps to reproduce this issue? Does disabling and re-enabling the app solve it?