[ANSWERED]New User -How Speak Brightness of an Insteon Bulb?

Posted on
Wed Oct 29, 2014 10:37 pm
russg offline
Posts: 46
Joined: Oct 02, 2014

[ANSWERED]New User -How Speak Brightness of an Insteon Bulb?

Hi All - I just purchased an insteon enabled LED bulb to play with. Control is very straight forward. I'm stuck trying to figure out how to set the 'Edit Actions' Screen to have it speak the 'brightness level'.

The desired result is a button that raises the brightness 20%, another that reduces it 20% and a display that shows the actual brightness level (all working) and that then speaks the current brightness level (not working)

The brightness level shows up fine, and the Speak option works fine, I just can't figure out how to place device status information into the 'Speak' text box.

Any suggestions or samples appreciated!

-russg

Posted on
Thu Oct 30, 2014 5:47 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: New User -How Speak Brightness Intensity of an Insteon B

Welcome.

The best way in my opinion is to use an embedded Python script. Try this:

Code: Select all
speakValue = str(indigo.devices[123].brightness)
indigo.server.speak("The brightness is set to" + speakValue)
Where '123' is the device ID number.

If you need more help with this, please feel free to ask.
Last edited by DaveL17 on Thu Oct 30, 2014 10:15 am, edited 1 time in total.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Oct 30, 2014 10:10 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

New User -How Speak Brightness Intensity of an Insteon Bulb?

A little bit fancier.

Code: Select all
speakName = str(indigo.devices[123].name)
speakValue = str(indigo.devices[123].brightness)
indigo.server.speak("The %s brightness is set to %s" % (speakName, speakValue))

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Oct 30, 2014 8:23 pm
russg offline
Posts: 46
Joined: Oct 02, 2014

Re: [ANSWERED]New User -How Speak Brightness of an Insteon B

Thank you!
That is just too cool. Thank you for the examples.

First time I've seen a '%' used as a delimiter (in the multi-variable substitute), which makes it a good time to order my first python book. Time to learn a new syntax :)

My next project is a pretty extensive use of the OWServer Plugin (EDS 1-Wire Server ), so you will probably see me post again shortly.

-russg

Posted on
Thu Oct 30, 2014 8:57 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: [ANSWERED]New User -How Speak Brightness of an Insteon B

You are most welcome. Glad to hear that you might be able to use the OWServer plugin, too. Let me know if you have any questions or see any gremlins.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests