- Code: Select all
simpleSerialId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.simpleserial")
if simpleSerialId.isEnabled():
message = "%s\n" % (indigo.variables["direct_Vaux_Send"].value)
simpleSerialId.executeAction("textToSerial", deviceId=775789076, props={"newCommand":message})
but it is now returning this error:
- Code: Select all
Script Error trigger "direct Vaux Send TEST" embedded script error:
Script Error unable to convert python exception
Script Error Exception Traceback (most recent call shown last):
embedded script, line 4, at top level
RuntimeError: unable to convert python exception
Joe @FlyingDiver kindly recommended the .encode addition to this line:
- Code: Select all
message = ("%s\n" % (indigo.variables["direct_Vaux_Send"].value)).encode("utf-8")
and in reading this forum and looking at the other documentation I added ("utf-8"), but it still failing.
- Code: Select all
simpleSerialId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.simpleserial")
if simpleSerialId.isEnabled():
message = ("%s\n" % (indigo.variables["direct_Vaux_Send"].value)).encode("utf-8")
simpleSerialId.executeAction("textToSerial", deviceId=775789076, props={"newCommand": message})
I tried running it through ChatGPT with no success. Any thoughts would be much appreciated.