Page 2 of 4

Re: A day in the life...

PostPosted: Thu Aug 20, 2015 6:53 am
by john polasek
" At the end of the charging session, Indigo alerts me to how many kWh were consumed via an interface with SiteSage." What kind of interface do you have with Sitesage? They demanded a huge payout and NDA if I wanted to do something similar...

Re: A day in the life...

PostPosted: Thu Aug 20, 2015 6:56 am
by Bollar
john polasek wrote:
" At the end of the charging session, Indigo alerts me to how many kWh were consumed via an interface with SiteSage." What kind of interface do you have with Sitesage? They demanded a huge payout and NDA if I wanted to do something similar...


I did sign an NDA, but did not have to pay a fee. I wrote a simple Python script to pull data via the API.

It's a shame they're so tight with access.


Sent from my iPhone using Tapatalk

Re: A day in the life...

PostPosted: Sun Apr 03, 2016 8:51 pm
by dz1rfj
howartp wrote:
At 6.30am, my bedroom motion sensor starts watching me, and Airfoil starts announcing the time every 5 minutes until I go to work - once I wake up, the sensor turns on my bedside lamp.

At 6.45 and 7am Airfoil announces today's weather. At 8.30, if I haven't already pressed a manual keypad button to do this earlier, Airfoil and all bedroom lights/devices turn off.

Entering the kitchen, the down lighters come on dim unless it's bright enough.

Throughout the day, the heating comes on/off depending on schedule and the temps reported by sensors around house. Any lights left on in unattended rooms go off after 5-10 mins depending on room, and TV goes off after 15 minutes.

When alarm is set, all devices and lights go off.

Tea time, mum turns on the Chip Pan - Airfoil warns us to put on a pair of goggles to avoid the toxic fumes when she leaves it cooking unattended, reminds her it's still on every minute, and turns it off after 10 minutes.

Sunset, the house lamps (and Christmas lights) come on.

On entering bedroom, lamp comes on - unless TV is on, because that's bright enough.

Bedtime, setting the alarm knocks off all lights/devices and heating and the day starts again tomorrow.


HI,

Migrating form Vera, and I was wondering how you have Airfoil announce the time every five minutes, are you using a separate plug in ?

Thanks

Re: A day in the life...

PostPosted: Sun Apr 03, 2016 11:57 pm
by canalrun
I have a simple set up up where I mainly use Indigo as an alerter.

When someone presses the doorbell button, the Aeon doorbell generates an "On" event which I use to flash Z-Wave bulbs (Python script) that I have located in each room of the house.

If my Z-Smoke smoke detector goes off, it generates an event which I use to flash light bulbs in my bedroom and also cycle On/Off a plug-in outlet to which I have a 9V "wall wart" DC supply that powers a bed shaker.

I also have a few motion detectors and plug-in wall outlets to turn on/off lights.

Barry.

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 12:42 am
by howartp
dz1rfj wrote:
howartp wrote:
At 6.30am, my bedroom motion sensor starts watching me, and Airfoil starts announcing the time every 5 minutes until I go to work - once I wake up, the sensor turns on my bedside lamp.


HI,

Migrating form Vera, and I was wondering how you have Airfoil announce the time every five minutes, are you using a separate plug in ?

Thanks

You just need the Airfoil plugin and a schedule.

In the schedule, I think I have a two-line script (action > server > execute python) that says something along the lines of:

indigo.speak("the time is " . timedate.getTime)

I'll check it tonight.

Oeter

A day in the life...

PostPosted: Mon Apr 04, 2016 12:52 am
by howartp
Actually, just checked.

I changed it at some point - the schedule just starts a 5 minute timer IF variable holDontWake is false.

Then there's a trigger on the timer expiring that restarts the timer and executes the following.

Image

The code could be shrunk - I copied it from a larger script I have where I speak lots of things 'if debug()' which is why there's a separate function calling speak().

I have various routines that know when I've left/got up/gone to work, so one of those will stop the timer.

Peter


Sent from my iPhone using Tapatalk

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 11:50 am
by dz1rfj
Peter, thanks for the reply. I tried this, but must be missing something.

##Speak Time

def speak(inText):
indigo.server.speak(inText)

thetime = datetime.strftime(datetime.now(),"%H %M")

speak("The time is " + thetime)



Does python require a start and an end like a vba function ? and what is the strftime in that line, is formatting the time string ?

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 12:09 pm
by DaveL17
Hello dz1rfj, I just replied to your other thread with a possible solution.
Dave

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 12:35 pm
by howartp
You missed a line: from datetime import datetime

strftime is String-format-time. It formats the time so Indigo says 'zero seven fifty five' for example.

I think %h instead of %H is without the leading zero from memory.


Sent from my iPhone using Tapatalk

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 12:38 pm
by dz1rfj
howartp wrote:
You missed a line: from datetime import datetime

strftime is String-format-time. It formats the time so Indigo says 'zero seven fifty five' for example.

I think %h instead of %H is without the leading zero from memory.

Sent from my iPhone using Tapatalk


Yes! Thank you.. It now works, and I was able to locate the python reference about the difference in the capitalizations, thanks for pointing that out. This is getting really interesting now, great tools, and a great community.

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 12:42 pm
by howartp
My mum loves it (not!) when Indigo reminds her to take her tablets three times during breakfast; but it does usually work because she has them more than she used to.

"Have you eaten your tablets yet? You never eat your tablets on time, you naughty girl" three times winds her up :-)


Sent from my iPhone using Tapatalk

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 1:14 pm
by dz1rfj
That is AWESOME! I might set that up for me now, before I totally lose my mind, although , my wife ways I am already there :?

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 1:40 pm
by durosity
howartp wrote:
My mum loves it (not!) when Indigo reminds her to take her tablets three times during breakfast; but it does usually work because she has them more than she used to.

"Have you eaten your tablets yet? You never eat your tablets on time, you naughty girl" three times winds her up :-)


I love that! I need to do something like that to wind up the wife!

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 1:47 pm
by howartp
"Darling, could you pass Durosity the <...> please?"


Sent from my iPhone using Tapatalk

Re: A day in the life...

PostPosted: Mon Apr 04, 2016 1:56 pm
by durosity
Bacon. It's always bacon.


Sent from my iPad using Tapatalk