the logic makes total sense to me and I think I'm writing the right code.
Is there a better way to test than packaging and installing the plugin and running it?
neilk wrote:Let me know if you get stuck as trying to assist rather than interfering. My Octopus energy plugin takes a similar approach but at the device level not the plugin level.
As for testing i didn’t justify a paid pycharm license but use the free version to make edits in situ in the running plugin folder package and use plugin restarts to apply changes (and you can do the same with any editor). Probably not best practice but works for me.
I did request a developer license as well which makes the impact of tinkering more family friendly if you use a separate Mac to write the code.
ryanbuckner wrote:
A few things I need help with:
1) How do I set the device.address to a value from my JSON?
2) My config validation logic only works for field validation. It's allowing the UI to be closed even if the API call fails and I return False
jay (support) wrote:Has anyone figured out how to do interactive/integrated debugging of Indigo plugins with VS Code? With PyCharm you need the commercial version because it relies on the remote debugging feature (not remote, but since plugins must run in a separate process it works like a remote debug session).
VS Code Docs wrote:Remote debugging
VS Code does not itself support remote debugging: this is a feature of the debug extension you are using, and you should consult the extension's page in the Marketplace for support and details.
There is, however, one exception: the Node.js debugger included in VS Code supports remote debugging. See the Node.js Debugging topic to learn how to configure this.
neilk wrote:ryanbuckner wrote:
A few things I need help with:
1) How do I set the device.address to a value from my JSON?
2) My config validation logic only works for field validation. It's allowing the UI to be closed even if the API call fails and I return False
The first one is really easy, it is the device state “address” and you don’t need to define it. Took me ages to figure it out though.
On 2 - I will take a look.
Neil
Life360 Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "plugin.py", line 40, in __init__
KeyError: key authorizationtoken not found in dict
Is there a trick to changing the CFBundleIdentifier ?
DaveL17 wrote:The plugin identifier is also used in the Indigo database file. You'll need to change it there, too. Best make a backup of the file before editing it (especially if you're developing on the same database as your main Indigo install). As long as you make the change before rollout, you're the only one that suffers.Is there a trick to changing the CFBundleIdentifier ?
Yeah....don't do it.
Users browsing this forum: No registered users and 6 guests