New Plugin - XBMCState - Xbmc addon

Yup, I rebooted luup and xbmc many times, and changed to ‘night’. I can post logs from either if you like.

[quote=“cw-kid, post:40, topic:174337”]Anyone else seeing this?

If I manually stop video playback my lights brighten up.
However if I leave a video to finish playback itself and it stops at the end, my lights stay dimmed.

Thanks[/quote]
video stopped and video ended are two different events you need to use both to trigger the same scene or set up two different scenes for each trigger

Hi all,

I have a slight issue - more XBMC’s fault then XBMCstate’s.
I turn my amp on/off dependant on whether audio is playing. The problem is XBMC is sending an ‘audio off’ followed by ‘audio on’ between tracks when playing an album. This of course causes the amp to make that lovely audible ‘click’ between tracks. :frowning:
I posted this question also as a separate thread incase there’s anyway to ‘remove’ verde commands if they are in quick succession. I guess a possible solution is that XBMCstate has a ‘hold’ on a command. i.e. it receives a command and waits for a period of time before execution - but if another command comes in before that time is up it ignores the original command.

i.e. so the amp on,amp off,amp on scenario would become just amp on .

thanks

[quote=“baxy_AU, post:42, topic:174337”][quote=“cw-kid, post:40, topic:174337”]Anyone else seeing this?

If I manually stop video playback my lights brighten up.
However if I leave a video to finish playback itself and it stops at the end, my lights stay dimmed.

Thanks[/quote]
video stopped and video ended are two different events you need to use both to trigger the same scene or set up two different scenes for each trigger[/quote]

So it is, sorry I over looked that fact ::slight_smile:

[quote=“pocster, post:43, topic:174337”]Hi all,

I have a slight issue - more XBMC’s fault then XBMCstate’s.
I turn my amp on/off dependant on whether audio is playing. The problem is XBMC is sending an ‘audio off’ followed by ‘audio on’ between tracks when playing an album. This of course causes the amp to make that lovely audible ‘click’ between tracks. :frowning:
I posted this question also as a separate thread incase there’s anyway to ‘remove’ verde commands if they are in quick succession. I guess a possible solution is that XBMCstate has a ‘hold’ on a command. i.e. it receives a command and waits for a period of time before execution - but if another command comes in before that time is up it ignores the original command.

i.e. so the amp on,amp off,amp on scenario would become just amp on .

thanks[/quote]

Playing music videos gives a similar problem, where my lights will brighten and dim between each music video stopping and the next starting etc.

Yes, i use the player class to check what player state is in use. For sure when file finish it will stop. I will check if i’m able to use some debouncing. Could you tell me how much time it take for the player (ended and comeback played). i could maybe debouce the ended time so if played time come back 1 second later, ended will not be trigger. Will let you know. the only thing is that the end time will have a delay before send the event, the delay will have the time of the stop and play problem.

@conchordian
My mistake, it thing i found the problem, i reupload the file with the modification, there was only one download, so probably you. The thing is that if you had (close xbmc to yes or night, it will always been trigger. So now with the one that i reupload it, i tested it on mac and windows 7 64 bit and it working like a charm. One thing that i observe is that when you reinstall an addon with some change in the setting xml file it give you that kind of error. So it good to erease the addon setting in the user data . The addon will create a new and fresh setting file . Maybe that the reason. Sorry to give you some trouble but it help me alot when someone else try the addon.

Yes will let you know when I can test the timings later

thanks

Hey Mic,

Can the ‘delay’ for debounce perhaps be configurable within XBMCstate?
The reason I ask is the delay with my laptop and on my raspberry vary quite a lot; so there’s no one value that suits all.

Cheers!

Could you check in the vera ui when it do the problem. I’m not close to xbmc now, Check if stopped is triggered or ended.
Thanks

[quote=“Mic, post:49, topic:174337”]Could you check in the vera ui when it do the problem. I’m not close to xbmc now, Check if stopped is triggered or ended.
Thanks[/quote]

Video_End

When I play music videos on my Linux Ubuntu XBMC PC, Intel i3 with 4GB RAM and SSD drive, wired giga… Its a split second in between one music video ending and the next one starting to play.

Thanks will take a look tonight

Hi thing the easiest method will be that when video ended, i will put a variable delay from xbmc addon and after the delay, it will check if video or music is playing. If it’s not playing then it will send the event. With that trick, no millis is required and it should do the job.

Hi all,
Just installed the v1.1 from the MCV store.
I changed IP address and also moved from Ubutnu plateform to Windows system (don’t ask me why) and everything still working fine.
Didn’t have the time to test the day/night function as I even don’t have the day/night plugin.

thanks Mic for your work.

OK, it’s under “C:\Users\USERNAME\AppData\Roaming\XBMC\userdata\addon_data\micasaverde.addon\settings.xml” if anyone else needs to find and delete it.

Sorry to give you some trouble but it help me alot when someone else try the addon.

Not at all, thank you for writing the plugin. It’s working well for me now.

Nice to see that the day and night work for other then me. Didn’t post it in my first post cause it not finish yet, I want to put the debouncing time for the ended. If i’m able to do it (probably for sure). I will put the adjustable value in the addon setting like pocster say. I passed a little time on it tonight but not yet finish. When this will be stable, I will try the other side, control thing on vera from xbmc.

Ok i’ve manage to debounce the ended problem, could you try the version bellow, you should erase manually the addon and the addon setting to be sure. Also remember to restart your xbmc after setting change. Now in the addon setting, there a debounce for video and audio so you could adjust the second. Please let me know if that resolve the problem that you have.

For windows: “C:\Users\USERNAME\AppData\Roaming\XBMC\userdata\addon_data\micasaverde.addon\settings.xml”

Yup, the debounce thing works fine with me at 1 second for videos. One thing I noticed was that until I entered my day/night plugin ID I got a script error, so if someone doesn’t care about the night setting, they might get an error each time.

Thanks again, I’ve been using it successfully. I can’t wait to see what you can do on the xbmc side to control Vera!

Mic,
Are you planning to post this on the XBMC repo? Pretty please :slight_smile:

@Aeron
Will take a look how to do it, for sure it could be nice.

I check a little for the inverse, controlling the vera within Xbmc. There a plugin for it. but it seems not up to date with the frodo version. 2 option come in my head, the easily one (not my idea) will be to create a program add-on with around 6 buttons, all button will be configurable through the addon setting. In the older xbmcstate topic a user post a folder that contain this option(thanks). So 6 device will be able to be control, and maybe some scene also. The other option but with a lot more work, will be to create a list of the device and scene from vera json, and retrieval the state of each device. I’ve been able to retrieval information with a python script for the device name. id and status. Now i need to figure it out how to put them in a list that xbmc menu will recognize.

I would pay money for a Xbmc addon that can control devices and scenes that are in Vera!

If my lights are already dimmed to 25% and Im listening to music, if I then start a video the lights brighten to 100% then dim back down to 25% not sure how to stop this ?

Thanks