Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

bmercier

Employees
  • Joined

  • Last visited

Everything posted by bmercier

  1. Yes it does. If the program is constantly restarted every 5 minutes, the 6 minute wait will never complete. The program does not have to be stopped. Restarting it using runThen is enough.
  2. There is no need for an external computer. All that is required is an ISY, and ISY Portal. Benoit
  3. Yes, that's possible. First of all, create a program that you will call via ISY Portal every 5 minutes or so: Heartbeat timer If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then $PI_Heartbeat_active = 1 Wait 6 minutes $PI_Heartbeat_active = 0 Else - No Actions - (To add one, press 'Action') And: Heartbeat notification If $PI_Heartbeat_active is not 0 Then Send Notification to 'myself@gmail.com' content 'PI Heartbeat restarted' Else Send Notification to 'myself@gmail.com' content 'PI Heartbeat stopped' Then, you need to create a network resource to trigger that program via ISY Portal. First of all, find the ID of the heartbeat program (The first one above). In the admin console, when you have your list of programs, that will be the rightmost column. It's a 4 hexadecimal digits. To get the correct URL to call this program, go to ISY Portal, on your ISY, use Select tools | ISY information. The "URL to ISY" is the base URL to call rest commands. It will look like this: https://my.isy.io/isy/969f220dfc964cdb9c4cf4ef40275a580f7f8836ed3b7dc12047aa73f7e6f999 To that URL, add /rest/programs/<Program ID>/runThen Replace <Program ID> with your program ID. You can try this URL in a browser to make sure you are getting it right. Now to create the network resource, in the admin console, go to Configuration | Network resources. Click Add. Choose https, GET, host: my.isy.io, Port: 443, Path: Everything after my.isy.io (from the above URL), encode URL: no, use SNI: No In the HTTP headers, click Add, choose Authorization, and enter your portal user ID and password. Calling this network resource should trigger your heartbeat program Now, it's a matter of creating a program that will call this network resource every 5 minutes. If the network connectivity is lost, the heartbeat program will not be fired, and your variable will become 0, which will allow the second program to send a notification, or do whatever you want to do when there is no connectivity. This program would work. If ISY is restarted, the program would start looping at 6AM next day. test If Time is 6:00:00AM Then Resource 'test' Wait 5 minutes Run Program 'test' (Then Path) Else - No Actions - (To add one, press 'Action') Benoit
  4. If you have scenes that you want to brighten/dim, set the Alexa category to light.
  5. Those are responses from the ISY. The calls are getting throught. Now it's a question of having the correct URL to achieve the result that you want. If you try the same URLs with GET and POST directly to the ISY, without portal, you should be getting the exact same result. In the first case, you are getting a 404. I believe the URL is not valid. Try it in a browser. In the second case, I assume it's a post to /service. If I recall correctly, the 715 is an error code related to subscriptions. Benoit
  6. Then I don't know what it is. It may not reach the request at all either. Adding console.log just before would help to find where the issue is. Benoit
  7. Try the URL in a browser. Those are GET requests, so that's an easy way of test them. Benoit
  8. 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
  9. I need to see the code to help. Sent from my iPhone using Tapatalk
  10. 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
  11. Is the lambda function triggered at all? I would suggest to add console.log() at a few places to see where it fails. Benoit
  12. 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
  13. 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)
  14. A fix has been done. It should work better now. Benoit
  15. 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
  16. 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.
  17. 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
  18. 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
  19. The network resources are on ISY. The ISY is therefore required. Sent from my iPhone using Tapatalk
  20. 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
  21. The maintenance is now completed.
  22. 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
  23. I made a fix to ISY Web Access. Can someone try it to make sure it indeed fixes the problem?
  24. 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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.