MWareman Posted November 13, 2021 Posted November 13, 2021 16 minutes ago, MrBill said: The # sign already works with EMAIL notifications only on the ISY-994, it has never worked with NR's however. In fact there is a note on this wiki page that states: An example usage: AllRecessedDoorSW - [ID 0044][Parent 0037] If 'Door Switches / Barn Walk-thru Door / Barn Walk-thru Low Batt' is switched On Or 'Door Switches / Barn OHD Button / Barn OHD Button.3 - Low Batte' is switched Off Or 'Door Switches / Costco Rm NEW - Door / Costco Rm NEW Low Battery' is switched On Or 'Door Switches / Front Door / Front Door- Low Bat' is switched On Or 'Door Switches / Garage to House Door 2 / Garage to House Low Battery' is switched On Or 'Door Switches / Green Rm Closet Door / Green Rm Closet Low Battery' is switched On Or 'Door Switches / Laundry Rm Door / Laundry Rm Door - Low Battery' is switched On Or 'Door Switches / MBR Closet 2 Door / MBR Closet 2 Low Battery' is switched On Or 'Door Switches / Playroom Door / Playroom Door Low Battery' is switched On Or 'Door Switches / Pool Closet - Door Sensor / Pool Closet Door - Low Batter' is switched On Or 'Door Switches / RachioButtonLower / RachioButtonLower - Low Batt' is switched On Or 'Door Switches / RachioButtonUpper / RachioButtonUpper - Low Batte' is switched On Then Send Notification to 'Bill' content 'DoorName' Else - No Actions - (To add one, press 'Action') which uses this email template: (the words Low Battery are part of the node name). This is honestly the only place I've been able to use the # due to the email limitation. I prefer Pushover notifications, especially now that the Notification Nodeserver will retry on failed connections and some http errors. This is a new feature for ISY running on Polisy. Please see this post from @Michel Kohanim on the announcement thread: I've been able to get it to work yet though - here is my thread where @Chris Jahn is looking into why it's not yet working as intended: https://forum.universal-devices.com/topic/34061-trigger-device-substitution-on-network-rules
sjenkins Posted November 13, 2021 Posted November 13, 2021 Omg this is a wonderful feature. As stated previous it will reduce my NR significantly as I mastery use them with prowl for notifications. I’ll be watching the thread on getting it to work. Also building up my fortitude to start from scratch on the Polisy. SeJ 1
MrBill Posted November 13, 2021 Posted November 13, 2021 25 minutes ago, MWareman said: This is a new feature for ISY running on Polisy. It's not a new feature, its new to working with NR's on ISY on Polisy. the # with email notifications has always been around, I linked a wiki page, check the edit history, information on the # sign was included in the original page creation. There was quite a long thread last summer over the scalability of NR's due to lack of that feature. I finally realized that Michel didn't know that it didn't work and so stated the history as I knew it. I believe that it's because of that thread specifically that the functionality was fixed in NR's in ISY on Polisy. It has not been back-ported to the ISY-994, but as shown the # sign has always been a feature of EMAIL notifications on the ISY-994
AlexE Posted November 13, 2021 Posted November 13, 2021 I am stuck when upgrading my polisy to V13 [admin@polisy ~]$ sudo pkg update && sudo pkg upgrade Updating FreeBSD-base repository catalogue... FreeBSD-base repository is up to date. Updating udi repository catalogue... udi repository is up to date. All repositories are up to date. Updating FreeBSD-base repository catalogue... FreeBSD-base repository is up to date. Updating udi repository catalogue... udi repository is up to date. All repositories are up to date. Checking for upgrades (0 candidates): 100% Processing candidates (0 candidates): 100% Checking integrity... done (0 conflicting) Your packages are up to date. [admin@polisy ~]$ uname -a FreeBSD polisy 12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 r369564 POLISY amd64 [admin@polisy ~]$ I am pretty sure I am missing something Thanks is advance
AlexE Posted November 13, 2021 Posted November 13, 2021 Never mind found it sudo pkg update && sudo pkg upgradecat /usr/local/etc/udx.d/static/update13.sh | sudo bashsudo shutdown -r now
MrBill Posted November 13, 2021 Posted November 13, 2021 7 minutes ago, Poporo said: Never mind found it sudo pkg update && sudo pkg upgradecat /usr/local/etc/udx.d/static/update13.sh | sudo bashsudo shutdown -r now and after that you'll need to again sudo pkg upgrade udx sudo pkg upgrade isy sudo service udx restart sudo service isy restart 1
MrBill Posted November 13, 2021 Posted November 13, 2021 3 hours ago, MWareman said: This is a new feature for ISY running on Polisy. I was finally able to track down the Wiki edit where the words "(Does not work in network resources)" were added to the email substitutions wiki page. Those words were actually added December 12th 2015, by none other than MWareman ?? 1
MWareman Posted November 13, 2021 Posted November 13, 2021 1 hour ago, MrBill said: I was finally able to track down the Wiki edit where the words "(Does not work in network resources)" were added to the email substitutions wiki page. Those words were actually added December 12th 2015, by none other than MWareman ?? Indeed they were - I believe I may have been one of the early heavy users of NRs at the time - and discovered that substitutions did not work with # for NRs like they did with email. I confirmed with @Michel Kohanim and got hooked up with a Wiki account to add the note to the documentation. I'm quite looking forward to modifying my prior words when # is confirmed to work within NRs on ISY/Polisy after 6 years of waiting for it.. 1
MrBill Posted November 13, 2021 Posted November 13, 2021 29 minutes ago, MWareman said: I'm quite looking forward to modifying my prior words when # is confirmed to work within NRs on ISY/Polisy after 6 years of waiting for it.. Me too, I don't have nearly as many NR's as you do, but I have a lot. I finally realized that Excel was amazing for creating concatenated strings to make many very similar but different NR's. 1
Michel Kohanim Posted November 14, 2021 Author Posted November 14, 2021 @randyth, -1 means that it cannot even connect. If the issue was TLS related, you would get -256 error code. Something is not right. Perhaps something blocking Polisy from getting to that url? With kind regards, Michel
randyth Posted November 15, 2021 Posted November 15, 2021 On 11/13/2021 at 8:40 PM, Michel Kohanim said: @randyth, -1 means that it cannot even connect. If the issue was TLS related, you would get -256 error code. Something is not right. Perhaps something blocking Polisy from getting to that url? With kind regards, Michel Interesting. My Polisy is connected to the same router (ethernet, not Wi-Fi) as my ISY994i and other equipment. Additionally, I can ping the URL successfully from Polisy using SSH: Another test I just did was to use the www.alphavantage.co API instead of api.notifymyecho.com. Again, the Network Resource calling www.alphavantage.co works on my ISY994i but not ISY on Polisy: This alphavantage NR results in another -1 error when called by my ISY on Polisy. Time User Code Message Mon 1900/01/01 12:00:00 AM System -170001 <s:Envelope><s:Body><u:TestNetResource xmlns:u="urn:udi-com:service:X_Polisy_Service:1"><id>1</id><flag>1</flag></u:TestNetResource></s:Body></s:Envelope> Mon 2021/11/15 09:38:53 AM 0 -170001 [TCP-Conn] -1/-140002, Net Module Rule: 1 Mon 2021/11/15 09:38:53 AM 0 -170001 <s:Envelope><s:Body><u:GetLastError xmlns:u="urn:udi-com:service:X_Polisy_Service:1"></u:GetLastError></s:Body></s:Envelope> Mon 2021/11/15 09:38:53 AM 0 -170001 <s:Envelope><s:Body><u:ClearLastError xmlns:u="urn:udi-com:service:X_Polisy_Service:1"></u:ClearLastError></s:Body></s:Envelope> -Randy
MWareman Posted November 15, 2021 Posted November 15, 2021 4 hours ago, randyth said: Interesting. My Polisy is connected to the same router (ethernet, not Wi-Fi) as my ISY994i and other equipment. Additionally, I can ping the URL successfully from Polisy using SSH: Another test I just did was to use the www.alphavantage.co API instead of api.notifymyecho.com. Again, the Network Resource calling www.alphavantage.co works on my ISY994i but not ISY on Polisy: This alphavantage NR results in another -1 error when called by my ISY on Polisy. Time User Code Message Mon 1900/01/01 12:00:00 AM System -170001 <s:Envelope><s:Body><u:TestNetResource xmlns:u="urn:udi-com:service:X_Polisy_Service:1"><id>1</id><flag>1</flag></u:TestNetResource></s:Body></s:Envelope> Mon 2021/11/15 09:38:53 AM 0 -170001 [TCP-Conn] -1/-140002, Net Module Rule: 1 Mon 2021/11/15 09:38:53 AM 0 -170001 <s:Envelope><s:Body><u:GetLastError xmlns:u="urn:udi-com:service:X_Polisy_Service:1"></u:GetLastError></s:Body></s:Envelope> Mon 2021/11/15 09:38:53 AM 0 -170001 <s:Envelope><s:Body><u:ClearLastError xmlns:u="urn:udi-com:service:X_Polisy_Service:1"></u:ClearLastError></s:Body></s:Envelope> -Randy 140002 indicates 'HTTP_CLIENT_CONNECTION_TIMED_OUT'. See https://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Errors_And_Error_Messages for most of the error definitions. Could POLISY be trying to use the IPv6 IP address where ISY never does that - causing the timeout? What are you using for DNS? 2
randyth Posted November 15, 2021 Posted November 15, 2021 11 minutes ago, MWareman said: 140002 indicates 'HTTP_CLIENT_CONNECTION_TIMED_OUT'. See https://wiki.universal-devices.com/index.php?title=ISY-99i/ISY-26_INSTEON:Errors_And_Error_Messages for most of the error definitions. I did see that but find it hard to believe it's a timeout issue. Even if I increase the Timeout setting from 2 to 20 seconds (20,000 ms, the maximum setting), the "Request Failed" box appears immediately. I think Michel's interpretation of the error log is likely more indicative of the problem... On 11/13/2021 at 8:40 PM, Michel Kohanim said: @randyth, -1 means that it cannot even connect.... ...and suspect a "cannot connect" is always accompanied by a "client timed out". 25 minutes ago, MWareman said: What are you using for DNS? My ISP's default servers (Comcast 69.252.228.129/69.252.228.133). Note that Polisy can ping these public API endpoints without issue -- it's just the ISY on Polisy Network Resources system that is struggling with them. @MWareman, Are you able to access www.alphavantage.co from a Polisy NR (er, assuming you've installed ISY on Polisy and are willing to take the time to play guinea pig)? You can check out the screenshot in my previous post for how to set it up if you have the time.
MWareman Posted November 15, 2021 Posted November 15, 2021 (edited) 26 minutes ago, randyth said: @MWareman, Are you able to access www.alphavantage.co from a Polisy NR (er, assuming you've installed ISY on Polisy and are willing to take the time to play guinea pig)? You can check out the screenshot in my previous post for how to set it up if you have the time. From a browser (Chrome) - the URL works fine and returns JSON From 'curl' on Polisy - I get "Error Message": "the parameter apikey is invalid or missing. Please claim your free API key on (https://www.alphavantage.co/support/#api-key). It should take less than 20 seconds." With WGET on a regular Ubuntu host, I am seeing the process 'hang' and keep waiting for content. I see this in the log when I kill the process: --2021-11-15 17:11:21-- https://www.alphavantage.co/query?function=SYMBOL_SEARCH Resolving www.alphavantage.co (www.alphavantage.co)... 104.22.70.209, 172.67.23.2, 104.22.71.209 Connecting to www.alphavantage.co (www.alphavantage.co)|104.22.70.209|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/json] (it times out waiting here) Seems the 'unspecified' length being returned from the API may be messing with the test. Can I ask - what are you trying to do with this? ISY cannot process the JSON response. NRs are normally used to trigger external events to occur and cannot be used to receive data. To pull data into ISY - you have to run a script on an external host that will pull the data, parse it then send it to ISY variables via it's REST API (or write a poly to do this work for you). To answer your question - I am getting the same error when running your rule on my ISY/Polisy. I have a lot of other NRs configured - all without this issue. Perhaps @Michel Kohanim knows more than I about any issues with responses with an 'unspecified' length? The other possibility - I note that the site is behind Cloudflare's WAF. I run this at work - and I tested a NR against my own API that is protected by Cloudflares WAF - and hit the exact same issue. In my test case - the API did return a length. So - in all likelihood there is an issue connecting to APIs that are behind Cloudflare. Maybe Polisy is hitting it's bot detection protection and getting blocked by them? Edited November 15, 2021 by MWareman 1
randyth Posted November 15, 2021 Posted November 15, 2021 39 minutes ago, MWareman said: From 'curl' on Polisy - I get "Error Message": "the parameter apikey is invalid or missing. Please claim your free API key on (https://www.alphavantage.co/support/#api-key). It should take less than 20 seconds." You probably forgot to put quotes around the URL when using curl and wget. You might try this, for example: curl 'https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords =tesco&apikey=demo' That works find for me, at least -- even when called from Polisy's SSH shell. 39 minutes ago, MWareman said: Can I ask - what are you trying to do with this? ISY cannot process the JSON response. NRs are normally used to trigger external events to occur and cannot be used to receive data. I am simply using alphavantage as a test of Polisy's ability to access public APIs. I discovered this issue with Polisy's NR system when importing the NRs from my ISY994i. Network Resources on ISY/Polisy could not access api.notifymyecho.com or api.virtualbuttons.com, even though these exact APIs work flawlessly on my ISY994i. You can read more about the origin of this issue here. 39 minutes ago, MWareman said: To answer your question - I am getting the same error when running your rule on my ISY/Polisy. I have a lot of other NRs configured - all without this issue. I am in the same boat. I have a lot of other NRs configured that work without issue in ISY/Polisy, just not any that access an API outside my local network. Do any of your functioning ISY/Polisy Network Resources access APIs outside your local network?
MWareman Posted November 16, 2021 Posted November 16, 2021 29 minutes ago, randyth said: Do any of your functioning ISY/Polisy Network Resources access APIs outside your local network? Yes - without issue. Here is an example. Also - you were correct on the quotes - adding them allows the curl to work well.
MWareman Posted November 16, 2021 Posted November 16, 2021 Tested another external API - this time the Google Chat API. It also worked fine from ISY/Polisy.
randyth Posted November 16, 2021 Posted November 16, 2021 1 hour ago, MWareman said: ... The other possibility - I note that the site is behind Cloudflare's WAF. I run this at work - and I tested a NR against my own API that is protected by Cloudflares WAF - and hit the exact same issue. In my test case - the API did return a length. So - in all likelihood there is an issue connecting to APIs that are behind Cloudflare. Maybe Polisy is hitting it's bot detection protection and getting blocked by them? 29 minutes ago, MWareman said: Tested another external API - this time the Google Chat API. It also worked fine from ISY/Polisy. ... Thanks so much for taking the time to help test and think this through, @MWareman. From what I see, the results support your Cloudflare idea. @Michel Kohanim, could the fact that my "failed" ISY/Polisy NRs rely on APIs running behind Cloudflare or Cloudfront (api.notifymyecho.com uses Cloudfront) be the issue? Cheers, -Randy
Michel Kohanim Posted November 16, 2021 Author Posted November 16, 2021 @randyth, 17 hours ago, randyth said: could the fact that my "failed" ISY/Polisy NRs rely on APIs running behind Cloudflare or Cloudfront (api.notifymyecho.com uses Cloudfront) be the issue? Very possible! @MWareman, thank you SO MUCH! Now that I think about it, we literally wrote the whole https library ourselves. And, added SNI specifically to the client. Now that we use OpenSSL in Polisy, probably we forgot to enable that option. We'll look into it but, at the moment, this explains everything since CF needs SNI (that's why we added support for it in the first place). With kind regards, Michel 1
DennisC Posted November 20, 2021 Posted November 20, 2021 I completed upgrading Polisy, restarted, connected a USB Insteon PLM, enabled Insteon service, and completed the Portal licensing and approval process. I can access ISY on Polisy, but I don't see how to access Polyglot. What step did I miss?
Michel Kohanim Posted November 21, 2021 Author Posted November 21, 2021 @DennisC, Polyglot is on https://ip ... in short, you just need the browser to point to the same IP as ISY but without the :8443. With kind regards, Michel
DennisC Posted November 21, 2021 Posted November 21, 2021 1 hour ago, Michel Kohanim said: @DennisC, Polyglot is on https://ip ... in short, you just need the browser to point to the same IP as ISY but without the :8443. With kind regards, Michel @Michel Kohanim Hi Michel, When I try https://xxx.xxx.x.xxx using the IP address of my ISY, I get "This site can not be reached" error.
kzboray Posted November 21, 2021 Posted November 21, 2021 @DennisC I think if you try https://ip_addr of your Polisy it will work. There shouldn't be any thing else you need to do. You may get a warning about the site not being safe. Continue past the warning. You'll be fine.
DennisC Posted November 21, 2021 Posted November 21, 2021 4 minutes ago, kzboray said: @DennisC I think if you try https://ip_addr of your Polisy it will work. There shouldn't be any thing else you need to do. You may get a warning about the site not being safe. Continue past the warning. You'll be fine. If I use the IP address of Polisy, I connect to Polyglot nodeserver associated with my ISY 994, not ISY on Polisy. I see no way to associate the two.
kzboray Posted November 21, 2021 Posted November 21, 2021 (edited) @DennisC Ah I understand. To access Polisy (ISY) you use the ISY Launcher application (Java based) Your existing ISY as well as the new Polisy ISY will both be listed. If you don't see the Polisy ISY listed. Clear the java cache and see if that helps. Edited November 21, 2021 by kzboray 1
Recommended Posts