Jump to content

bmercier

Employees
  • Posts

    101
  • Joined

  • Last visited

Everything posted by bmercier

  1. Try the URL in a browser. Those are GET requests, so that's an easy way of test them. Benoit
  2. This code is not triggering the request to ISY because the request is not actually called. At line 118, where you have: exports.handler = function (event, context) { You are reassigning a new function to exports.handler (The lambda starting point). You can't do that. It's already assigned at line 183, which is your main lambda function. And since you are just assigning a function to a variable, you are not calling the function at all. So, just remove the line "exports.handler = function (event, context) {", including the closing bracket, and try it again. Benoit
  3. I need to see the code to help. Sent from my iPhone using Tapatalk
  4. I have not seen the code. But if you simply added code at the "end" to return some Alexa voice, then the call to portal probably does not go through at all. If so, your code at the end probably does a context.succeed() which basically ends the lambda function, before the call to portal has a chance to go through. Benoit
  5. Is the lambda function triggered at all? I would suggest to add console.log() at a few places to see where it fails. Benoit
  6. Uncomment this line and check the log: // console.log('DATA:', res.body) You may be getting an error message from ISY. Also, what's the URL? Are you using runif or runthen? If you use IFTTT, you don't need to pass a username or password. The key is what identifies you. Benoit
  7. For sure, this is possible. Here's untested code that could get you started. There are easier ways to make an http calls, using the request module for example, but this one below has the advantage that you can do inline editing of your lambda function, as opposed to always having to update your code via an upload. "use strict" const https = require('https'); const username = 'portal user' const password = 'portal password' https.globalAgent = new https.Agent({ keepAlive: true }); exports.handler = function (event, context) { // console.log('Input:', event); var options = { protocol: 'https:', hostname: 'my.isy.io', port: 443, path: '/set/your/path/here', method: 'GET', rejectUnauthorized: true, auth: username + ':' + password } var req = https.request(options); // when the response comes back req.on('response', function(res){ res.body = ''; res.setEncoding('utf-8'); res.on('data', function(chunk) { res.body += chunk; }); // when the response has finished res.on('end', function() { // console.log('DATA:', res.body) context.succeed(res.body); }); res.on('error', function (err) { console.log('ERROR:', err); context.fail(JSON.stringify({ error: 'error' })); }); }); // write data to request body //req.write(body); req.end(); // Can't recall if you need this for a GET } If your lambda function only has to trigger a program, there's an easier and more secure way too. In ISY Portal, go to Connectivity | IFTTT / Webhooks. Click "Set Key" to set an API key Create an entry for your program Click on the small blue icon, which will give you a URL Use this URL to trigger the program. Please note that you need to use POST (Not GET)
  8. A fix has been done. It should work better now. Benoit
  9. If both HTTP/HTTPS ports were changed, you could use telnet to get command line access. The command CWP would allow you to change back your HTTP or HTTS ports. Benoit
  10. Yes, precisely The echo elk feature allows to expose zones as motion or contact sensors. GH does not have the concept of motion or contact sensors yet.
  11. Try this: In ISY Portal: Remove the device from your GH list, and re-add it. Sync your device with GH (With button in the UI, or vocally) The thermostat uom is detected by ISY Portal when it is added to your GH list of devices. Benoit
  12. Almost. The ‘vocal library’ is created by Amazon. All that ISY Portal is doing is creating an Echo A/V device and maps some or all of the functions to ISY resources (network resources, state variables or programs) Sent from my iPhone using Tapatalk
  13. The network resources are on ISY. The ISY is therefore required. Sent from my iPhone using Tapatalk
  14. There's no real docs on this topic, but it's fairly easy once you grasp the concept. When you add an 'A/V device', this creates an Alexa A/V device. Of course, ISY is not an A/V device, but you can have network resources which controls A/V devices. So when you create an Alexa A/V device, you can wire the relevant Alexa functionnality to your network resources (Or State variables, or programs, if this simplifies things for you). So, let's say you want to control a TV, and you have network resources for On, Off, Volume Up, Volume down, you just have to map those to the A/V device you created. Once the device is created and discovered by Alexa, you can use your A/V device. To help you know how you can control, go back to your A/V device on ISY Portal, and hover the fields label. This will tell you what to say. Alternatively, you can refer to this: https://wiki.universal-devices.com/index.php?title=ISY_Portal_Amazon_Echo_Integration_V3#A.2FV_Devices Benoit
  15. The maintenance is now completed.
  16. Hello everyone, We will have a maintenance this Sunday 02-10-2019 at 5:00 AM PDT which will last for up to 1 hour. During this period, your ISY will disconnect for a few brief moments. New feature: There will be no new features. Maintenance: Update SSL Certificates Install OS patches Benoit
  17. I made a fix to ISY Web Access. Can someone try it to make sure it indeed fixes the problem?
  18. Just to be precise, the fix for ISY Portal is done, but this only fixes Echo and GH. The ISY Web Access currently is not fixed. Benoit
  19. @MWareman, this change is now in production. You can use the same spoken as long as they are in a different room. Can you test it and see if this works well for you? Benoit
  20. Well, you can leave it as an Alexa scene, and control the scene in the routine. The Alexa app however only allow to turn on the scene. It does not support turning off the scene at this time. If you need to be able to turn off a scene, the work-around is to expose it as a device. Benoit
  21. Thanks for reporting this. This is now fixed. An ISY scene exposed as an Alexa light | switch | outlet can now be used in a routine. Please note that if it is exposed as a light, this will give you the option to set the Alexa device to an absolute percentage. Of course, ISY scenes do not support this, so if the percentage is >= 50%, it will be turned on, otherwise it will be turned off. Also, an ISY scene exposed as an Alexa scene can also be used in a routine. However, it can only be activated (turned on). It can't be deactivated (turned off). Whenever Amazon adds the capability to deactivate/turn off the scene , this will work with ISY Portal. The scene is already marked as supporting deactivation. In order to support scenes in routines, I had to do a breaking change and remove the capability to brighten/dim an Alexa scene. I think this is better in the long run. Ref: Benoit
  22. Hello everyone, From now on, Alexa scenes can no longer be brightened/dimmed. If you used to brighten/dim your scene, edit your scene in ISY Portal, and change the Alexa category to "Light". This will make your ISY scene behave like a light to Alexa, and thus allow you to brighten/dim. Please note that ISY scenes can be brightened/dimmed, but not be set to an absolute level. If you ask Alexa to turn on your device to x%, the scene will be either turned on or off. If the percentage >= 50%, the scene will be turned on. If the percentage is <50%, the scene will be turned off. Benoit
  23. John, Just tried it and I see what you mean. I don't know why the Alexa App behaves this way. It may not like scenes with a brightnessController. A quick fix would be to expose your ISY Scene as an Alexa device. In ISY Portal, edit your device and change the Alexa category to "light". It will appear to Alexa as a device. Benoit
  24. ISY Scenes can be brightened and dimmed, but can't be set to an absolute brightness level. In the V2 skill, we could give a scene the capability to be brightened and dimmed, without the capability to be set to an absolute level. In the V3 skill, which uses the Smart Home V3 API, the brightness capabilities are combined. To retain the ability to brighten/dim a scene, we had to give it the "brightnessController" capability, which allows to brighten/dim a scene, but also set it to an absolute level. Of course, ISY scenes don't support absolute levels, so whenever we receive a request to set a scene to an absolute level, the scene will be turned on or off if the brightness level >=50% (on) or <50% (off). With V3, the side effect in routines is that a scene looks like a dimmer which can be set to ab absolute level. Long story short, to turn on the scene in a routine, set the percentage >=50% to turn it on, and <50% to turn it off. Benoit
×
×
  • Create New...