Trying to call Sonos action from within a script
Posted: Fri Jan 22, 2021 10:38 am
Not sure what I am doing wrong here. I am trying to call the action "SonosFavorites" from within a script of a different plugin I am writing. I can see that within the Sonos plugin, the call is made to:
So I am trying from my script:
I defined the class PA as the Sonos plugin did:
My script "sonosPlugin.executeAction " generates the error message:
TypeError: No registered converter was able to produce a C++ rvalue of type CCString from this Python object of type instance
I am not sure what I am doing wrong.
The script within the plugin runs without problem
I believe my statement should be equivalent?
- Code: Select all
def actionZP_SonosFavorites(self, pluginAction):
return self.Sonos.actionDirect(pluginAction, "ZP_SonosFavorites")
So I am trying from my script:
- Code: Select all
c=PA({'mode':"",'setting':setting})
sonosPlugin.executeAction("actionDirect", props={'pluginAction':c, 'action':"ZP_SiriusXM"})
I defined the class PA as the Sonos plugin did:
- Code: Select all
class PA():
def __init__(self, deviceId=None, props=None):
self.deviceId = deviceId
self.props = props
My script "sonosPlugin.executeAction " generates the error message:
TypeError: No registered converter was able to produce a C++ rvalue of type CCString from this Python object of type instance
I am not sure what I am doing wrong.
The script within the plugin runs without problem
- Code: Select all
self.actionDirect (PA(dev.id, {"setting":setting}), "ZP_SiriusXM")
I believe my statement should be equivalent?