Keith (and others),
First, apologies for not seeing this on the forum, as I hadn’t seen any traffic on this plugin page for quite some time.
So, to send a command so that the plugin will respond, you need to embed the python code in an Action Item directed at the plugin, similar to the example on the main plugin page:
- Code: Select all
simpleSerialId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.simpleserial")
if simpleSerialId.isEnabled():
simpleSerialId.executeAction("hexToSerial", deviceId=577450175, props={"newCommand":"23, 50, 55, 4D, 50, 3F”})
Also, you have to translate the hex command into Ascii as above. For the hex code example you sent me in a PM (\x52\x45\x51\x38\x38\x43\x00\x00\x33\x0F\x00\x20\x20\xFF), the right command would be “52, 45, 51, 38, 38, 43, 00, 00, 33, 0F, 00, 20, 20” - and unfortunately,
if the “\xFF” is required at the end, the plugin as currently implemented will not work, as it uses extensive Ascii character manipulations and anything higher than 7F cannot be handled (per the help page entry for revision 0.9.4).
Because this has come up with several folks who have tried the plugin, I'm going to have a look at implementing a version that does not require Ascii-only commands.
Jim