Page 3 of 3

Re: Indigo 7.3

PostPosted: Thu May 23, 2019 9:37 am
by jay (support)
durosity wrote:
It would be nice to have a defined format for units of measurement in the indigo preferences that all plugins would follow.. ability to set °C or °F, how that unit is displayed in the device list, and alternate options for it that’d automatically show when doing things like control pages. And then just having two values to work with in indigo, a float and integer version. Everything else done by indigos preferences on the fly!


Yep, standard units of measure as a general preference is definitely on the list. It's actually quite a pervasive change though (Mac client, server, Indigo touch for iOS, Indigo touch for Web, plugin API framework, each individual plugin), so has never made it to the top of the priority list.

Re: Indigo 7.3

PostPosted: Tue Jun 04, 2019 7:22 am
by Different Computers
Perhaps this is a naive question, but was it necessary to rename the web server folder when changing versions? I can imagine it was some sort of safety thing to make certain nothing custom got overwritten.

But when it came to upgrading from the previous version, literally every single thing that broke for me was related to the path to the web server folder.

Re: Indigo 7.3

PostPosted: Tue Jun 04, 2019 10:06 am
by jay (support)
Different Computers wrote:
Perhaps this is a naive question, but was it necessary to rename the web server folder when changing versions? I can imagine it was some sort of safety thing to make certain nothing custom got overwritten.

But when it came to upgrading from the previous version, literally every single thing that broke for me was related to the path to the web server folder.


Yes, it was, because the web server folder (IWS) is within the Indigo installation folder, which we rename in order to make it possible to revert if necessary.

We attempt to move over all custom images and public items that are in the IWS folder - I'm curious as to what broke exactly? Specifics are needed in order for us to evaluate what happened and if we can make that experience better.

Re: Indigo 7.3

PostPosted: Tue Jun 04, 2019 4:46 pm
by Different Computers
jay (support) wrote:
I'm curious as to what broke exactly? Specifics are needed in order for us to evaluate what happened and if we can make that experience better.


It was almost entirely scripts that manage images in folders inside the web folder. Once I realized the problem, fixing it was just adding "7.3" to the path.

Re: Indigo 7.3

PostPosted: Tue Jun 04, 2019 5:58 pm
by jay (support)
Different Computers wrote:
jay (support) wrote:
I'm curious as to what broke exactly? Specifics are needed in order for us to evaluate what happened and if we can make that experience better.


It was almost entirely scripts that manage images in folders inside the web folder. Once I realized the problem, fixing it was just adding "7.3" to the path.


If it's a Python script that does it, then you can get the base path of the install (indigo.server.getInstallFolderPath()) and just add the IWS specific parts to that - then you won't have that issue moving forward.

Re: Indigo 7.3

PostPosted: Mon Dec 09, 2019 2:33 pm
by Different Computers
Thanks Jay.

Resurrecting this thread because I'm about to upgrade to 7.4.

Every use of the path I can think if is in fact in a python script, but it's just setting a variable for the camera image to show. So the thing I need is an example of how to turn
Code: Select all
pic_destination = "/Library/hardcoded path/to/Indigo 7.3/IndigoWebServer/public/foo/targetimage.jpg"

into
Code: Select all
pic_destination = "magic-variable-based-on-serverName+version/IndigoWebServer/public/foo/targetimage.jpg


I probably could have figured this out 6 months ago when I was a lot more hands on with Python, but I haven't really touched it since then.

Re: Indigo 7.3

PostPosted: Mon Dec 09, 2019 2:46 pm
by jay (support)
Code: Select all
pic_destination = "{}/IndigoWebServer/public/foo/targetimage.jpg".format(indigo.server.getInstallFolderPath())

Re: Indigo 7.3

PostPosted: Mon Dec 09, 2019 3:26 pm
by Different Computers
That's all there is to it? Awesome. Thanks Jay!