Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is 4.8?
#41
Dean Roddey Wrote:I assume you tried to open it in something besides a text editor and it tried to run it. You need to open it with Notepad or something like that. Then just make the required modifications at the top, then select all text and paste it into the Lambda function editor.

yes, the .js will mean you'll need to open it from notepad vs double clicking as with .txt file.
Reply
#42
Dean, on the Lambda Configuration tab we have:

Runtime: NodeJS
Handler:
Role: lambda_basic_execution

What are we using for Handler?
Reply
#43
I'm not sure if it matters, but set it to "index.handler", without the quotes. I'll update the document to indicate that.
Dean Roddey
Explorans limites defectum
Reply
#44
BTW, bring up the log monitor as well. If you get far enough that the web server got a valid Echo command, it will log the info it got. Eventually I'll make this logging verbose only, but for now it's always on. And, if it gets something it doesn't understand it should complain about that in the logs as well.

If you aren't seeing any of this, then you aren't getting far enough to get anything to the web server. The test screen on the skill setup also will go through all the motions, so you should see the web server log stuff if you are getting that far.
Dean Roddey
Explorans limites defectum
Reply
#45
[cqc]\CQCData\Server\Data\Echo\EchoCfg.Txt

In adding the last \EchoCfg.txt, is that the name of the last folder?
Reply
#46
Dean, can you briefly describe how to create a CQC config file to handle dimmable V2 lighting?
Reply
#47
Deane Johnson Wrote:[cqc]\CQCData\Server\Data\Echo\EchoCfg.Txt

In adding the last \EchoCfg.txt, is that the name of the last folder?

EchoCfg.Txt is the name of the file. \Echo\ is the last folder.
Dean Roddey
Explorans limites defectum
Reply
#48
pinballmark Wrote:Dean, can you briefly describe how to create a CQC config file to handle dimmable V2 lighting?

Setting a dimming level is very difficult, because we can't accept numbers. They come across as text, e.g. fifty five. I could provide some sort of mapping function for the hundreds of possible variations I guess to turn those into numbers, but that doesn't exist currently.

It would be easier to set a scene, or to use the Set intent to set a faux scene that your action interprets and does the appropriate light actions. The example I give in the PDF document, though it uses volume, would work equally well for some kind of scene setting thing.
Dean Roddey
Explorans limites defectum
Reply
#49
Dean Roddey Wrote:Setting a dimming level is very difficult, because we can't accept numbers. They come across as text, e.g. fifty five. I could provide some sort of mapping function for the hundreds of possible variations I guess to turn those into numbers, but that doesn't exist currently.

It would be easier to set a scene, or to use the Set intent to set a faux scene that your action interprets and does the appropriate light actions. The example I give in the PDF document, though it uses volume, would work equally well for some kind of scene setting thing.

ok, that makes sense. Config example for light on/off?
Reply
#50
Nothing different from what you've already set. Just set up an Action= block and point it at some global action you've created. For the values, you could list the lights you want the user to be able to target, so something like:

Code:
Action=
   Kitchen, Kitchen Light, Kitchen Lights
   Bedroom, Bedroom Light, Bedoom Lights
EndAction

in the SetMap section. So they'd say something like:

Alexa, tell CQC to turn the Bedroom Lights off (or on)

That translates to a SetOff or SetOn intent, which shows up to you something like:

Intent=CQCSetOffIntent
Target=Kitchen
Value=Off

So just use that to do the appropriate light off/on command. If you can set the first value of each of the lines to the actual name of the light, then you could do it pretty much in a handful of lines. Convert the Off/On value to a new Boolean state to set (False or True), then all you'd need is:

Code:
Devices::FieldWrite(MyLights.LGHT#Sw_%(LVar:CQCActParm_2), %(LVar:NewState), True)
Dean Roddey
Explorans limites defectum
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)