<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill]]></title><description><![CDATA[<p dir="auto">Thanks to <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/tuicemen" aria-label="Profile: tuicemen">@<bdi>tuicemen</bdi></a>'s <a href="https://www.triggercmd.com/forum/topic/1955/feature-request-add-ability-to-dim-with-alexa-google/13">suggestion</a>, now you can use commands that accept brightness or color as a parameter via the TRIGGERcmd Smart Home Alexa skill.</p>
<ul>
<li>Brightness will be a number from 1 to 100.</li>
<li>Color will be red, blue, brown, green, pink, purple etc.</li>
</ul>
<p dir="auto">To test it, you could enable parameters on your notepad command like this:</p>
<p dir="auto"><img src="/forum/assets/uploads/files/1644175526285-874113e6-7786-4b22-a2e4-857fc0bfa44a-image.png" alt="874113e6-7786-4b22-a2e4-857fc0bfa44a-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Then say something like:  <strong>"Alexa, turn notepad red"</strong></p>
<p dir="auto">I'll look into adding on Google Assistant too, but so far this only works with the TRIGGERcmd Smart Home Alexa skill.</p>
<p dir="auto">Alexa devices for existing commands (created before 2/6/2022) will need to be deleted and re-discovered, or you can change the command's name and change it back so it will be re-created with the new color and brightness properties.</p>
]]></description><link>https://www.triggercmd.com/forum/topic/2029/pass-color-and-brightness-parameters-using-triggercmd-smart-home-alexa-skill</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 20:56:36 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2029.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 06 Feb 2022 19:31:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Mon, 11 Apr 2022 12:12:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moacir-vilela-s%C3%AAga" aria-label="Profile: moacir-vilela-sêga">@<bdi>moacir-vilela-sêga</bdi></a> , strange.  I don't know what fixed it either.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5709</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5709</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Mon, 11 Apr 2022 12:12:50 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Sun, 10 Apr 2022 17:01:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: russ">@<bdi>russ</bdi></a> I dont know what to tell you now. It is just working normally now. I didn't change neither my script nor tried to re-add the device.<br />
I decided to test it before changing to your script and it worked.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5708</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5708</guid><dc:creator><![CDATA[Moacir Vilela Sêga]]></dc:creator><pubDate>Sun, 10 Apr 2022 17:01:59 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Sat, 09 Apr 2022 02:06:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moacir-vilela-s%C3%AAga" aria-label="Profile: moacir-vilela-sêga">@<bdi>moacir-vilela-sêga</bdi></a> , will you please try this simpler script that just prints and logs the first parameter?</p>
<pre><code>import os, sys

f = open(os.path.dirname(os.path.realpath(__file__)) + "\log.txt", "a")
msg = "first arg is " + sys.argv[1] + "\n"
print(msg)
f.write(msg)
f.close()
</code></pre>
<p dir="auto">Also, please try running your script from a cmd prompt with red or 80 as the parameter to see if it's erroring.   I wonder if it's erroring and you're just not seeing the output so you don't see the error.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5700</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5700</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Sat, 09 Apr 2022 02:06:24 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Thu, 07 Apr 2022 22:30:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: russ">@<bdi>russ</bdi></a> I am using Alexa. I did a simple python script</p>
<pre><code>import pyttsx3
import threading
import sys
from pycaw.pycaw import AudioUtilities, IAudioEndpointVolume, IAudioEndpointVolumeCallback
from comtypes import CLSCTX_ALL, COMObject

from ctypes import POINTER, cast

class fala:
    def __init__(self,msg,voice=0):
        threading.Thread(target=self.thread,args=(msg,voice,)).start()
    def thread(self,msg,voice):
        tts = _TTS(voice)
        tts.start(msg)
        del(tts)
    
class _TTS:
    engine = None
    rate = None
    def __init__(self,voice):
        self.engine = pyttsx3.init()
        self.engine.setProperty('volume',1.0)
        voices = self.engine.getProperty('voices')
        self.engine.setProperty('voice', voices[voice].id)
    def start(self,text_):
        self.engine.say(text_)
        try:
            self.engine.runAndWait()
        except:
            fala(text_)


class AudioEndpointVolumeCallback(COMObject):
    _com_interfaces_ = [IAudioEndpointVolumeCallback]

    def OnNotify(self, pNotify):
        print('OnNotify callback')

list2 = sys.argv[1:]
devices = AudioUtilities.GetSpeakers()
interface = devices.Activate(IAudioEndpointVolume._iid_, CLSCTX_ALL, None)
volume = cast(interface, POINTER(IAudioEndpointVolume))
callback = AudioEndpointVolumeCallback()
volume.RegisterControlChangeNotify(callback)



try:
    if isinstance(int(sys.argv[1]),int):
        fala('volume definido para ' + str(int(sys.argv[1])))
        volume.SetMasterVolumeLevelScalar(int(sys.argv[1])/100,None)
except:
    fala(' '.join(list2))


</code></pre>
<p dir="auto">So if I say a number it changes the volume, but if I say a color or "Turn on/off" it says On, Off or the Color. (Basically it tries to say it out loud if the parameter is not a number)</p>
<p dir="auto">Now, it only works during On and Off. All the colors or the numbers are not working as valid parameters.</p>
<p dir="auto">This is how it is coded in TriggerCMD currently:</p>
<pre><code> {
  "trigger": "Protocolo",
  "command": "python \"D:\\Programming\\Python\\teste vozes.py\"",
  "offCommand": "",
  "ground": "foreground",
  "voice": "Protocolo",
  "voiceReply": "",
  "allowParams": "true"
 }
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/5697</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5697</guid><dc:creator><![CDATA[Moacir Vilela Sêga]]></dc:creator><pubDate>Thu, 07 Apr 2022 22:30:00 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Thu, 07 Apr 2022 20:51:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/moacir-vilela-s%C3%AAga" aria-label="Profile: moacir-vilela-sêga">@<bdi>moacir-vilela-sêga</bdi></a> , not that I know of.  Are you using the Google Assistant or Alexa?</p>
<p dir="auto">Are you using a script? If so can you paste it here?</p>
<p dir="auto">Do you have parameters enabled on the command?</p>
<p dir="auto">Is your script logging the parameter?  If you run the script manually with a number parameter does it work?</p>
]]></description><link>https://www.triggercmd.com/forum/post/5695</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5695</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Thu, 07 Apr 2022 20:51:12 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Wed, 06 Apr 2022 19:25:56 GMT]]></title><description><![CDATA[<p dir="auto">Did it stop working? I used this to control my computer volume, and I think since yesterday it isnt working anymore, even after deleting the devices</p>
]]></description><link>https://www.triggercmd.com/forum/post/5694</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5694</guid><dc:creator><![CDATA[Moacir Vilela Sêga]]></dc:creator><pubDate>Wed, 06 Apr 2022 19:25:56 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Mon, 04 Apr 2022 21:12:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/javier-rilova-0" aria-label="Profile: javier-rilova-0">@<bdi>javier-rilova-0</bdi></a>, this works on Google Home now too.  Please try it.</p>
]]></description><link>https://www.triggercmd.com/forum/post/5680</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5680</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Mon, 04 Apr 2022 21:12:08 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Mon, 04 Apr 2022 20:46:12 GMT]]></title><description><![CDATA[<p dir="auto">Awesome, looking forward to this to be implemented for Google Home too, can't wait!</p>
]]></description><link>https://www.triggercmd.com/forum/post/5679</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5679</guid><dc:creator><![CDATA[Javier Rilova 0]]></dc:creator><pubDate>Mon, 04 Apr 2022 20:46:12 GMT</pubDate></item><item><title><![CDATA[Reply to Pass color and brightness parameters using TRIGGERcmd Smart Home Alexa skill on Sun, 06 Feb 2022 21:29:38 GMT]]></title><description><![CDATA[<p dir="auto">Just awesome!<br />
For the Dim commands you can say something like "Alexa, office light 50%" or "Alexa set office light to 50"<br />
This should allow control of other things that rely on a number value as well.<br />
You can say Dim in a Alexa call but brighten doesn't seem to work Alexa says OK but nothing happens. (at least not in my tests)</p>
]]></description><link>https://www.triggercmd.com/forum/post/5505</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/5505</guid><dc:creator><![CDATA[tuicemen]]></dc:creator><pubDate>Sun, 06 Feb 2022 21:29:38 GMT</pubDate></item></channel></rss>