Release WeMo Toggle
#31
changelog:
Quote:
  • bugfixes
  • refactored code base
  • new icon

Download: service.wemo.toggle.zip

Note: The lag should be less noticeable with the update. Please report bugs/issues.

Before:
Code:
11:21:23 - WeMo Toggle - Switch: Off
11:21:24 - WeMo Toggle - Secondary device
11:21:24 - WeMo Toggle - Trying: 192.168.12.19:49152
11:21:25 - WeMo Toggle - ERROR - 192.168.12.19:49152 - <urlopen error [Errno 10061] No connection could be made because the target machine actively refused it>
11:21:25 - WeMo Toggle - Trying: 192.168.12.19:49153
11:21:26 - WeMo Toggle - Found: 192.168.12.19:49153

After:
Code:
11:23:24 - WeMo Toggle - Switch: Off 192.168.12.18
11:23:25 - WeMo Toggle - Switch: Off 192.168.12.19
Reply
#32
Hi curti,

I just discovered your add-on today from the RSS news feed, and it's awesome. However, just like what happened to vegeto9092, my switch(es) won't turn back on when media stops/pauses. I'm using OpenELEC 5.95.5 (x86_64) (Isengard 15.1) with the latest Wemo Toggle version, and all my Wemo switches are updated to the latest firmware as of today 09/16. The only version that works for me is 1.0.3 beta, with all switches turn on/off properly. All other versions, including 1.0.2, 1.0.3, and 2.0.0 will turn my switch(es) off when media starts playing, but won't turn any switch back on at pause/stop. Is that a known issue? Thanks.
Reply
#33
(2015-09-16, 10:28)qphan Wrote: Hi curti,

I just discovered your add-on today from the RSS news feed, and it's awesome. However, just like what happened to vegeto9092, my switch(es) won't turn back on when media stops/pauses. I'm using OpenELEC 5.95.5 (x86_64) (Isengard 15.1) with the latest Wemo Toggle version, and all my Wemo switches are updated to the latest firmware as of today 09/16. The only version that works for me is 1.0.3 beta, with all switches turn on/off properly. All other versions, including 1.0.2, 1.0.3, and 2.0.0 will turn my switch(es) off when media starts playing, but won't turn any switch back on at pause/stop. Is that a known issue? Thanks.

I will attempt to resolve the issue this week(end). It is not one of the features I use for my setup so I was not aware it was still broken. Thank you for your thoroughness in testing the versions. I will review my commits to see what could have broken between revisions; and I will also test my setup at home.

Edit: It seems to be working fine for me using version 2.0 of the add-on on Windows 7 x64 (Isengard 15.1). Do you have [Movies] and/or [TV Shows] enabled for the add-on under General->Video Type? That is the only reason I could think of for the switches not turning on for media stops/pauses. The add-on does have the option under Misc to override the [Movies]/[TV Shows] toggle with [Always turn switch off when playback starts] regardless of media type playing which could explain why your switches always turn off if that option is enabled.
Reply
#34
I am using version 2.0 on openelec 5.9.5 latest beta with Isengard 15.1. The switch works properly with all TV shows now, however it doesn't work properly with videos / movies. I am not sure if I can explain it right - it almost seems as it does not understand all "video" type content as compared to "movie" and "tv episode" content.

For example - when I look at some trailers - it detects youtube playback pause and unpause properly but if the trailers don't use youtube - it doesn't
The lights consistently shut off with the "override the [Movies]/[TV Shows] toggle with [Always turn switch off when playback starts] regardless of media type" - so it must be detection of media that doesn't seem to work ?

Please explain what you meant by: "Do you have [Movies] and/or [TV Shows] enabled for the add-on under General->Video Type"

I am not sure what setting you refer to and where...

Thanks,
Reply
#35
(2015-10-05, 18:24)uninexus Wrote: I am using version 2.0 on openelec 5.9.5 latest beta with Isengard 15.1. The switch works properly with all TV shows now, however it doesn't work properly with videos / movies. I am not sure if I can explain it right - it almost seems as it does not understand all "video" type content as compared to "movie" and "tv episode" content.

For example - when I look at some trailers - it detects youtube playback pause and unpause properly but if the trailers don't use youtube - it doesn't
The lights consistently shut off with the "override the [Movies]/[TV Shows] toggle with [Always turn switch off when playback starts] regardless of media type" - so it must be detection of media that doesn't seem to work ?

Please explain what you meant by: "Do you have [Movies] and/or [TV Shows] enabled for the add-on under General->Video Type"

I am not sure what setting you refer to and where...

Thanks,

If [Movies] is enabled the add-on should only toggle the light(s) during movie playback. If [TV Shows] is enabled the add-on should only toggle the light(s) during episode playback. The settings are located in the add-on settings under the [General] tab. The add-on uses the JSON-RPC to determine what type of media is playing:
Code:
{'jsonrpc': '2.0', 'method': 'Player.GetItem', 'params': { 'properties': ['showtitle', 'season', 'episode', 'duration', 'streamdetails'], 'playerid': 1 }, 'id': 'VideoGetItem'}

The add-on will check if 'movie' or 'episode' is returned from this query to determine the type of media that is playing. However, if anything else is returned it should not do anything unless you have the override option enabled then it will turn the light(s) off.
Reply
#36
OK. I understand now. Thank you. I have both movies and tv shows enabled under General > Video Type.

It appears that the addon possibly does not identify the movie type correctly. Is there another way to determine playback of video-type content ? Is there a way to expand the playback types to other media ? What is youtube movies are playing ? What if I am using a trailer addon and playing that kind of media ? It makes sense to me that most people would want to turn the lights off automatically when playing any kind of "visual" media content. If you are listening to audio - probably not. Visual content, yes.

Does that make sense ?
Reply
#37
(2015-10-10, 08:29)uninexus Wrote: OK. I understand now. Thank you. I have both movies and tv shows enabled under General > Video Type.

It appears that the addon possibly does not identify the movie type correctly. Is there another way to determine playback of video-type content ? Is there a way to expand the playback types to other media ? What is youtube movies are playing ? What if I am using a trailer addon and playing that kind of media ? It makes sense to me that most people would want to turn the lights off automatically when playing any kind of "visual" media content. If you are listening to audio - probably not. Visual content, yes.

Does that make sense ?

I do not usually use Kodi for audio playback and if I did it was during the day so I did not have the light on. I did not know their was an issue with the light turning off during audio playback until I tested it right now, but it makes sense that it happens with the current implementation.

I read over this post a few times to attempt to make sure I understand the issue correctly. Just to confirm the issue is the light(s) also turn off when only audio plays? If that is the case I should be able to fix to only toggle the light(s) during video playback.
Reply
#38
(2015-10-11, 05:12)curti Wrote: I do not usually use Kodi for audio playback and if I did it was during the day so I did not have the light on. I did not know their was an issue with the light turning off during audio playback until I tested it right now, but it makes sense that it happens with the current implementation.

I read over this post a few times to attempt to make sure I understand the issue correctly. Just to confirm the issue is the light(s) also turn off when only audio plays? If that is the case I should be able to fix to only toggle the light(s) during video playback.

Actually my only issue is that the lights do not turn back on when I pause the playback. The wemo toggle off override turns the lights off reliably no matter what I play. The problem is that when I play video type of content for some reason the lights don't turn back on when I pause. Does that make sense ?
So only the override works for me. TV shows also work reliably during pausing and playback.
I guess the audio should probably exhibit the behavior you described. I don't really play audio in Kodi much but it makes sense that people would keep the lights on.

Thanks,
Reply
#39
(2015-10-11, 07:01)uninexus Wrote: Actually my only issue is that the lights do not turn back on when I pause the playback. The wemo toggle off override turns the lights off reliably no matter what I play. The problem is that when I play video type of content for some reason the lights don't turn back on when I pause. Does that make sense ?
So only the override works for me. TV shows also work reliably during pausing and playback.
I guess the audio should probably exhibit the behavior you described. I don't really play audio in Kodi much but it makes sense that people would keep the lights on.

Thanks,

I could add an option to toggle regardless of video type instead of just for movies/episodes which I think about is what you have been asking for. So the options for toggling could be: [Movies], [TV Shows], and [Unspecified]. Unspecified would cover anything not in the Kodi library.
Reply
#40
(2015-10-11, 07:43)curti Wrote: I could add an option to toggle regardless of video type instead of just for movies/episodes which I think about is what you have been asking for. So the options for toggling could be: [Movies], [TV Shows], and [Unspecified]. Unspecified would cover anything not in the Kodi library.

I think that's an excellent idea that would cover pretty much everything. Please let me know when I can test it.
Reply
#41
(2015-10-11, 22:44)uninexus Wrote:
(2015-10-11, 07:43)curti Wrote: I could add an option to toggle regardless of video type instead of just for movies/episodes which I think about is what you have been asking for. So the options for toggling could be: [Movies], [TV Shows], and [Unspecified]. Unspecified would cover anything not in the Kodi library.

I think that's an excellent idea that would cover pretty much everything. Please let me know when I can test it.

Please let me know if this version works for you. I can put in a request to have it updated in the official repository if it is working as expected.

changelog:
Quote:
  • bugfixes
  • added Unspecified option to toggle if content is not in Kodi library
Download: service.wemo.toggle_beta.zip
Reply
#42
so I was trying this out today and I just want to be able to toggle 2 wemo switches from a keyboard shortcut, I was only able to get one to toggle. I enabled the option under Misc and added the second wemo IP address but it wouldn't toggle with the first wemo.

However it works with play/pause etc just not with a keyboard shortcuts.
Reply
#43
(2015-11-29, 00:51)jebise Wrote: so I was trying this out today and I just want to be able to toggle 2 wemo switches from a keyboard shortcut, I was only able to get one to toggle. I enabled the option under Misc and added the second wemo IP address but it wouldn't toggle with the first wemo.

However it works with play/pause etc just not with a keyboard shortcuts.

Please let me know if this version works for you. This also incorporates the changes from the previous beta link above. I can put in a request to have it updated in the official repository if it is working as expected.

changelog:
Quote:
  • added option to toggle multiple devices using keyboard shortcut.
Download: service.wemo.toggle_beta.zip
Reply
#44
(2015-11-29, 02:36)curti Wrote:
(2015-11-29, 00:51)jebise Wrote: so I was trying this out today and I just want to be able to toggle 2 wemo switches from a keyboard shortcut, I was only able to get one to toggle. I enabled the option under Misc and added the second wemo IP address but it wouldn't toggle with the first wemo.

However it works with play/pause etc just not with a keyboard shortcuts.

Please let me know if this version works for you. This also incorporates the changes from the previous beta link above. I can put in a request to have it updated in the official repository if it is working as expected.

changelog:
Quote:
  • added option to toggle multiple devices using keyboard shortcut.
Download: service.wemo.toggle_beta.zip

No it's not working, still only the main one toggles. The wemo under Misc still still doesn't respond.
Reply
#45
(2015-11-29, 07:35)jebise Wrote: No it's not working, still only the main one toggles. The wemo under Misc still still doesn't respond.

Did you enable the option to toggle additional switches with the keyboard under [Misc]?

I made a few small changes noted below. The bugfix is to only toggle the additional switches if both options are enabled under [Misc]->[Additional WeMo switches].

changelog:
Quote:
  • bugfix for toggle
  • updated strings in addon settings
Download: service.wemo.toggle.zip
Reply

Logout Mark Read Team Forum Stats Members Help
WeMo Toggle0