Release Kodi/XBMC Callback Daemon
#31
(2015-08-21, 01:50)siam28 Wrote: Happy to say I've found the issue. Had to add "background": true to the shell backends. Updated the script for posterity.
I love this tool so thank you very much pdffs. Please keep developing!
Been out of town for a few days, glad to hear you worked out the issue, that would have been my first guess - I've made all actions synchronous by default so that they're executed in the right order, but I may look at adding async/background for the other backends too, to improve responsiveness when ordering is not important. Glad this little tool could help you out.
Reply
#32
Hi,

This project is great!

It is better than service.xbmc.callbacks in that you can filter events based on the type of media (movie, episode, music).

However after testing and looking into the code this filter only works with OnPlay. I would love it to work also with OnStop and OnPause. The reason being that I could dim/bright the lights only when watching films/episodes, not when listening to music (which I do both to sleep, lights off, and to have dinner, lights on). Currently lights go bright when the music playlist finishes, so I can't keep sleeping on the sofa hehe

I checked the Kodi API ( http://kodi.wiki/view/JSON-RPC_API/v6 ) and it looks like this is possible.

Could this feature be added please? Smile

Thanks and keeo up this great work!
Reply
#33
I have tried to use the XBMC timeout option but I can not get it to work. Is there something I need to change for it to work? Screensaver on and off work fine.
Reply
#34
(2015-08-26, 13:44)jacobo221 Wrote: However after testing and looking into the code this filter only works with OnPlay. I would love it to work also with OnStop and OnPause. The reason being that I could dim/bright the lights only when watching films/episodes, not when listening to music (which I do both to sleep, lights off, and to have dinner, lights on). Currently lights go bright when the music playlist finishes, so I can't keep sleeping on the sofa hehe

I checked the Kodi API ( http://kodi.wiki/view/JSON-RPC_API/v6 ) and it looks like this is possible.

Could this feature be added please? Smile
I don't know if you saw the update to your Github issue, but support for this was pushed out soon after you posted the request. Hope it is working for you.

(2015-09-06, 21:35)jknight2014 Wrote: I have tried to use the XBMC timeout option but I can not get it to work. Is there something I need to change for it to work? Screensaver on and off work fine.
Could you tell me what it is you're trying to do? Which timeout option are you referring to?
Reply
#35
(2015-09-12, 13:45)jknight2014 Wrote: There is an option "XBMC is idle" with a "Idle Time (Minuets)" below it. I would like to have my screen saver come on in its normal 5 minuets and then run my TVOff script after 10 minuets. That way I get a sort of warning that its about to shut off before it does.

I really struggling understand what you're saying here. Where is this idle thing you're looking at?

This daemon can only react to Kodi notifications or events, as documented in the wiki for JSON-RPC. There is a notification for GUI.OnScreenSaverActivated and GUI.OnScreenSaverDeactivated that you can use to run your scripts. There's no way built into the daemon to delay execution of a script by some arbitrary time, but if you're running your own scripts, you could enable the 'background' flag so that your script doesn't block other callbacks from executing, and you can add whatever delays you want inside your scripts.

So, your OnScreenSaverActivated script would just sleep for 10 minutes, before doing whatever, and store it's pid somewhere. Then you could run a second script for OnScreenSaverDeactivated, read the pid file if it exists and and kill the original process, avoiding its action being executed.
Reply
#36
(2015-09-13, 00:56)jknight2014 Wrote: Your plugin has an option listed as XBMC is idle.

Nope, that's a completely different piece of software - this has no user interface, and is instead configured via a JSON file. That's probably pilluli's service.xbmc.callbacks add-on, which I mention in the first post here, and the README on github.
Reply
#37
I apologize, I did not realize there was more than one and I was subscribed to this one.
Check out all my How-To's at http://KnightCinema.com
Maine, USA.
Using XBMC since Dharma 2010
Reply
#38
This look like exactly what I am looking for. I am trying to run it on Windows, using kodi-callback-daemon_1.3.5_windows_amd64. I repeatedly get the following: "level=error msg="Decoding response from Kodi" error="invalid character '%' looking for beginning value". This error keeps repeating. I am on windows 8.1 (have tried both windows versions with the same results) and am running Kodi 15.2. I have tried many different JSON configurations, but still this error on repeat. Any help would be greatly appreciated. Smile
Reply
#39
(2015-11-15, 20:45)sdtucker10 Wrote: This look like exactly what I am looking for. I am trying to run it on Windows, using kodi-callback-daemon_1.3.5_windows_amd64. I repeatedly get the following: "level=error msg="Decoding response from Kodi" error="invalid character '%' looking for beginning value". This error keeps repeating. I am on windows 8.1 (have tried both windows versions with the same results) and am running Kodi 15.2. I have tried many different JSON configurations, but still this error on repeat. Any help would be greatly appreciated. Smile

I must admit I've never tried it on Windows, though I expect it to work fine. Can you post your config to pastebin or something? And if you turn on debug, you may get some more details.
Reply
#40
I am using the example from github for my config file. I've tried it trimming it down to just connect t Kodi with a dummy callback, but that gives me the same error. It doesn't seem to get past the Kodi portion of the connection. Debug is turned on in the config file. This is the error I am receiving. I've tried it on the 127.0.0.1 and on the internal ip explicit (192.x.x.x). I tried removing the login info for the http control but that made no difference either.

I appreciate the help. Please let me know what else I can try to help troubleshoot this.

Thanks!
Reply
#41
(2015-11-16, 07:49)sdtucker10 Wrote: I am using the example from github for my config file. I've tried it trimming it down to just connect t Kodi with a dummy callback, but that gives me the same error. It doesn't seem to get past the Kodi portion of the connection. Debug is turned on in the config file. This is the error I am receiving. I've tried it on the 127.0.0.1 and on the internal ip explicit (192.x.x.x). I tried removing the login info for the http control but that made no difference either.
The daemon doesn't use the HTTP interface at all - it uses the JSON-RPC interface. The JSON-RPC service is available on port 9090 by default. The reason I asked for the config to be posted is so that I could confirm (amongst other things) that the correct port is being used - the error message says that the daemon is seeing data that is not JSON, so it's likely to me that either something else is listening on port 9090, or it's set to use the wrong port.
Reply
#42
That was it. I had another server running on port 9090. Everything seems to be working now. Thank you for your help!!!
Reply
#43
I have been trying to get the Kodi Callback Daemon working with Boblight and a single lifx lightbulb. I have been through the wiki several times, but I am still a little unclear on what I need to do to get it all working.

I installed the callback daemon deb and have a basic json config similar to the boblight lifx example. I also compiled boblight with the instructions on the forum thread, and from what I gather, I point the kodi client to the callback daemon which acts as a proxy to boblight?

I am a little confused into what my boblight config should look like, sorry if this would be a more appropriate question in the boblight thread, but I was curious if there was an example boblight config to match the example on the boblight lifx config on the github page?

Sorry if I have overlooked some documentation that explains all of this.
Reply
#44
(2015-12-06, 02:03)multivacac Wrote: I have been trying to get the Kodi Callback Daemon working with Boblight and a single lifx lightbulb. I have been through the wiki several times, but I am still a little unclear on what I need to do to get it all working.
I should note upfront that the LIFX boblight proxy code is pretty new, so it's possible the documentation could be better, and there may be a bug or two hiding away, but it does work as expected for me.

(2015-12-06, 02:03)multivacac Wrote: I installed the callback daemon deb and have a basic json config similar to the boblight lifx example. I also compiled boblight with the instructions on the forum thread, and from what I gather, I point the kodi client to the callback daemon which acts as a proxy to boblight?
That's correct. However, I'd first suggest that you get your boblight setup working independently from the kodi callback daemon (KCD). Once you have that working, you just need to change the input and output ports on your boblight server and client, so it will eventually go something like:

boblight client (output port 19333) -> KCD (input port 19333, output port 19332) -> boblight daemon (input port 19332)

(2015-12-06, 02:03)multivacac Wrote: I am a little confused into what my boblight config should look like, sorry if this would be a more appropriate question in the boblight thread, but I was curious if there was an example boblight config to match the example on the boblight lifx config on the github page?

Can I ask if you're trying to set up a backlight device (ie - an ambilight clone), or whether you only want to drive your LIFX bulbs? If you're wanting to do the former, I highly recommend using Hyperion instead of boblightd, which has a nice configuration generator you can use to create the initial configuration for your backlight and integrates with other functionality of KCD. If you're wanting to do the latter, unfortunately that's not likely to work at this stage because the boblightd/hyperion daemon will expect to be able to find a backlight device to control.

I have considered adding code to allow KCD to act as a full boblight-compatible server, so that you can control LIFX without needing a separate boblight server, but there's a bit of work involved there: working out the protocol; how to best represent a configuration in KCD; and writing the actual implementation.
Reply
#45
Thank you, that really clarifies how all these separate components fit together.

I just have a LIFX bulb so I will look more into Hyperion, from reading more of the boblight documentation it seems like you said that it really is expecting a usb backlight device.

Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi/XBMC Callback Daemon1