Anyone want to help a newbie please ?

Posted on
Fri Nov 09, 2018 8:05 am
abplus offline
Posts: 50
Joined: May 29, 2018
Location: Westerham, Kent

Anyone want to help a newbie please ?

Hi y'all,
I'm keen to learn but don't know how to get started. I taught myself basic a hundred years ago so I have some understanding but I really haven't kept up. I want to understand variables in Indigo. What I want to try to do is:

Take an average of the days atmospheric pressure using data from Cynical Weather. Store the result and be able to display it on a control page so I can see the current and previous days pressure readings. This is because my wife is very prone to migraines when the pressure drops and we want to keep an eye on it.

I'm sure this can't be too hard but I don't know how to start.

Thanks in advance to anyone who wants to help !

Kindest regards,

Andrew.

Posted on
Fri Nov 09, 2018 10:13 am
Asconasny offline
Posts: 161
Joined: Jan 16, 2015

Re: Anyone want to help a newbie please ?

Karl made a nice min/max/average plugin.
Maybe that will help you.

https://forums.indigodomo.com/viewtopic.php?f=188&t=15241

Posted on
Fri Nov 09, 2018 10:23 am
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Anyone want to help a newbie please ?

Definitely look for plugins before reverting to scripts - you may very well find a plugin that will handle your specific scenario.

However, given that you posted the question in the Python Scripting forum, I'll address what seems to be your first question about where to get started (assuming you're talking more broadly about scripting Indigo).

First, find a good beginning Python tutorial out on the net. There are a ton (specifically find one that's either Python 2.x or that will work with both Python 2 and 3 since Indigo uses Python 2.7).

Once you're familiar with the basics (Python is really easy to learn particularly if you have any experience with other proper programming languages), go through the Scripting Tutorial. That will show you how to access Indigo objects (like variables and devices) in a Python script.

To roughly outline your specific scenario (I don't know the details): you'll need to access the appropriate states from the Cynical Weather device. You would then do your calculations and update an Indigo Variable with the result. Can't be more specific than that without a lot more detail.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests