Is it possible to insert into wake.py script any commands that after wake up vero close the standby menu, switch to TV and starts play TV channel number XY? I am using tvheadend and I would be grateful for any example where this or similar topic is solved.
it ends with an error (with quotes it ends with different error)
SyntaxError: invalid syntax
I tried it like
m = Startme()
m.switchChannel(4e6ca943f08e86168d9c8ee3c17e0b9f)
and no luck (even channel is in quotes). I do not even know if the channe UID is right but first I would like to solve errors about calling and defining and after that a channel.
I fixed your formatting for you. If the way it looks now matches the actual file, then you have not properly indented the code. It should look like this:
Class Startme:
def switchChannel(self, channel_uid):
all_channels_loc = xbmc.getLocalizedString(19287).encode('utf-8')
Did you read the error that you it gave you when you used quotes? The error clearly points to the line and what the issue is. You are supplying a dict to executeJSONRPC when it’s expecting a string.
But now kodi find my file, no error at kodi.log but nothing happen like:
NOTICE: CApplication::ToggleStandby – checking for existence of /home/osmc/.kodi/userdata/wake.py
NOTICE: CApplication::ToggleStandby – script /home/osmc/.kodi/userdata/wake.py found
WARNING: CPythonInvoker(31): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
I think that it gets to that part of code with logging and return None so nothing happen