I noted that the newest release of the helper functions don’t work with Python 2.7, so I downloaded the source files for a previous version that did support 2.7. I copied them into the /usr/local/bin/ignition/user-lib/pylib folder, and then tested it out in ignition’s script console. I did it this way because I figured issuing the install command “pip install ambient_api” would write to the computer’s local installation, not ignition’s installation. Each time I tried to import the library, I got a dependency error, so I found the library files for that dependency and copied them into the pylib folder. I did this about 6 times and decided this can’t be the right way to go about this.
I’m new to the concept of APIs and python libraries and I’m not sure I’m doing any of this right. Any help in this area would be appreciated.
Am I on the right path for getting weather station data into ignition?
You can also skip the SDK approach entirely, and just build your own using system.net.httpClient(). You can even wrap that up in your own mini-SDK (it doesn’t look like the Ambient Weather REST API is very complex) to make it a bit easier to use. I went into the (very broad strokes) here: