I've thought about this for years and had some free time over Christmas and New Year, so decided to give it a try and make my first indigo plugin, however i'm finding it really hard going so asking for some help. (BTW I have no programming experience, so mainly copying bits from the Plugin SDK's and from other plugins (mainly FlyingDivers ConnectedDrive, i hope that's ok FD?)) I used the ConnectedDrive plugin as it's very similar to what i'm trying to do, only it's for BMW's and mine is for Toyota.
What i've been trying to do is make a plugin (for my own use only) that will capture my Toyota RAV4's battery and fuel data, so i can show this detail on a control page.
I've been following the development of some Toyota code on GitHub (https://github.com/DurgNomis-drol/mytoyota) which can call my car and provide the data required along with lots of other stuff. And i can get this to work as shown below using terminal.
So, my thought was to see if i can integrate this into Indigo, and after several days of playing around, I now have a basic plugin, but no data.
In order to move forward, my question is, how do i get the data that's being produced by the Toyota GitHub script to show up in Indigo via the plugin?
So far i've managed to create a plugin folder and get a device window into indigo, but now i'm stuck! how do you get the created Device to call for the data in the plugin.py script?
For further information I've copied the Github code to my indigo computer and in terminal I call
- Code: Select all
python3 simple_client_test.py
I've then taken the simple_client_test.py code and renamed it
- Code: Select all
plugin.py
Not sure if i'm going down the right route or if there is an easier way of doing this. I'm also aware that i should probably ask DurgNomis if i can use his code in this way, should i do that first??
Hopefully someone can point me in the right direction,
Thanks in advance,
Martin