-
Notifications
You must be signed in to change notification settings - Fork 314
[service.projcontrol] 1.2.0 #868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Travis BuddyHey Fredrik Eriksson, 1st BuildExpand here
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. Sorry for the time taken.
service.projcontrol/Makefile
Outdated
@@ -0,0 +1,26 @@ | |||
ADDON_NAME := $(shell grep '<addon id="' addon.xml |cut -d\" -f2) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
</requires> | ||
<extension point="xbmc.service" library="service.py" start="login" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<platform>all</platform> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/addon.xml
Outdated
version="1.2.0" | ||
provider-name="Fredrik Eriksson"> | ||
<requires> | ||
<import addon="xbmc.python" version="2.19.0"/> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/addon.xml
Outdated
<extension point="xbmc.service" library="service.py" start="login" /> | ||
<extension point="xbmc.addon.metadata"> | ||
<platform>all</platform> | ||
<summary lang="en">Control your projector from Kodi</summary> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/addon.xml
Outdated
<extension point="xbmc.addon.metadata"> | ||
<platform>all</platform> | ||
<summary lang="en">Control your projector from Kodi</summary> | ||
<summary lang="sv">Hantera din projektor med Kodi</summary> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
<import addon="script.module.pyserial" version="3.4.0"/> | ||
</requires> | ||
<extension point="xbmc.service" library="service.py" start="login" /> | ||
<extension point="xbmc.addon.metadata"> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/lib/infocus.py
Outdated
|
||
""" | ||
res = self._send_command("(LMP?)") | ||
if res is not None: |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/service.py
Outdated
time_since_stop = datetime.datetime.now() - self._last_power_command_ | ||
if time_since_stop.days == 0 and time_since_stop.seconds < min_turnaround: | ||
log("Screensaver deactivated too soon, will sleep a while before starting projector") | ||
xbmc.sleep((min_turnaround-time_since_stop.seconds)*1000) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
req = urllib2.Request(url, data, headers) | ||
res = urllib2.urlopen(req) | ||
|
||
print(res.read()) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
service.projcontrol/lib/server.py
Outdated
|
||
import logging | ||
|
||
import flask |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Nice, thanks for the feedback. I had hoped to get this included by making the flask requirement optional, but I can understand why that won't work :) Regarding platforms I figured this would work on any platform where python (and the dependencies) worked, as long as you know what device name to configure in pyserial. As far as I know I do not use anything that is platform specific. That said, I've only a Linux-machine to test with I'll guess I'll have to restrict it to Linux. The people who connect projectors by serial cables are probably Linux-users anyway :) As Travis gave a warning about complex entry point I've also done some restructuring. Not sure if it became better or not, but I'll probably need some time to test and make sure everything still works before updating this pull request. |
Its fine to keep it for |
[Rechi]
This doesn't restrict anything. If <language>_<country> doesn't match
your Kodi setting it then tries to match only <language> and then if
that doesn't match too, it uses `en_GB` or `en`.
Right, so Kodi is not working as described in RFC 3066, where
translations tagged with 'se_NO' would be ignored on systems with locale
set to se_SE? Or translations tagged with pt_BR would be ignored on
systems with the locale set to pt_PT?
For systems behaving according to RFC 3066, I would tag translations
only with the 'se' language code to make sure systems with locale set to
both se_NO and se_SE would use the translation.
…--
Happy hacking
Petter Reinholdtsen
|
Travis BuddyHey Fredrik Eriksson, 1st BuildExpand here
|
Travis BuddyHey Fredrik Eriksson, 1st BuildExpand here
|
Sorry for the time taken, I think all requested changes has been honored now, and the bottle module seems to work just fine for this plugin. Travis seems happy except for the (obviously) missing pyserial plugin, so I hope this is good enough :) |
Travis BuddyHey Fredrik Eriksson, 1st BuildExpand here
|
Glad to know bottle worked fine for you. Unfortunately I can't merge with travis failing in this repository, we'll have to wait for pyserial to hit our repos (once the repository generator runs again) or someone with higher privileges than myself need to handle it. Pinging @Rechi |
Description
An addon for controling projectors connected via serial port. A more detailed description can be found on the project github page: https://github.com/fredrik-eriksson/kodi_projcontrol
It requires the pyserial module to work, and I've submitted that module in a separate PR. This addon can also optionally use flask to create a REST service to control the projector, however flask is not in the kodi repositories, and I have no will to submit and maintain it. As this addon is still usable (and hopefully even useful) even without the REST service I hope it's OK to include it anyway.
Checklist:
Additional information :