Errors configuring Immediate Notifications

Posted on
Fri May 14, 2021 3:04 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Errors configuring Immediate Notifications

I got really far with this... I got all the codes figured out and was easily able to send messages out of Indigo to my cell phone.

In trying to get messages into Indigo, I found the Immediate Notifications page, and went thru all the steps... was able to get the right Twilio folder into the webserver/plugin folder, and was able to get my URL working on my Twilio account page... (just had to insert the port # after the Dot Com).

But I can't get Indigo to get messages from my phone.

1. When I message back from my phone thru Twilio and into Indigo, I get a bunch of red text in the Event log:
Error XML Parse Error: not well-formed (invalid token)
Error On character 0 of line number 1.

This is repeated a number of times

And this error message as well:

Client authentication failed - bad XML received (18.215.172.103)
Client disconnected (18.215.172.103)

FWIW, I tried using the Update Webhooks item in the plugin but that gave me this error:
Twilio Error Error in plugin execution MenuAction:

Traceback (most recent call last):
File "plugin.py", line 473, in updateWebhooks
StandardError: PacketTargetNotConnectedError -- client target com.flyingdiver.indigoplugin.httpd not found for message ExecuteActio


So not sure what the problem is. Something I've noticed on my Twilio webpage, I see nothing on the Messages log, either under incoming or outgoing. Not that I'll ever need to check it, but I'm wondering if that indicates something else is wrong....

Posted on
Fri May 14, 2021 6:43 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

On the Immediate Notifications page (https://github.com/FlyingDiver/Indigo-Twilio/wiki/Immediate-Notifications), it describes two possible methods to get notifications. Which are you using? The HTTPd plugin, or the Indigo Reflector?

If you're using the HTTPd plugin, the instructions will have changed slightly since the wiki page was written for the original HTTPd plugin, which has been discontinued. The currently available HTTPD-2 plugin works slightly differently.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 7:07 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

Split this to new topic.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 9:24 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

Actually I'm using the reflector method, but I'm not using a reflector. As I found out, this works on port 1176, so all that traffic is sent to the Indigo Server from the router. I had to modify the URL used in Twilio to this:
Code: Select all
HTTPS://<name>:<Password>@myurl.com:1176/twilio/ping

and given the error messages, traffic is getting from the Twilio servers to my Indigo Server I even tried just http://. (no s) and while there were less messages, it still didn't work.

And FWIW, even on my LAN, entering this URL into a browser
Code: Select all
https://<name>:<password>@123.456.789.123:1176/twilio/ping
(where the IP address is the LAN address of my Indigo Server)
gets the exact same error messages in Indigo.

I'm just not sure if the error messages are being generated from Twilio meaning that my cell phone isn't "authorized" to send messages to Twilio and that message is being sent along to Indigo, or if the connection between Twilio and Indigo isn't working correctly.


I absolutely don't mind trying the other route if you think it would work better.

Posted on
Fri May 14, 2021 9:47 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

I don't think going directly to port 1176 is supposed to work. That port is not a normal http server, it's specifically programmed for the reflector and the Indigo clients.

Do you have a subscription so that the reflector is available?

The errors are from the Indigo server rejecting the requests coming into port 1176.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 10:59 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

Not sure where the start of this process is, but I had Indigo set to use a different port for the HTTP port, but changed it back to default, which is 8176. And while I think my Server Port may have been changed, I have switched it back to the default 1176. And for testing, I've changed the router to send ALL traffic to my Indigo Server. Both the server and the router have been restarted.

Back in Twilio, I've taken out the port number from the URL- nothing happens
I put in the 1176 port number - lots of error messages
I put in the 8176 port number - nothing happens

( I'm assuming that the Reflector automatically re-directs traffic to Port 1176 in the background, since that's the port Indigo is set up for. Would be interesting to see what happens if one changed the Indigo Server Port to something else... but I'm guessing there is a way to specify a different port from the Reflector side as well(but don't know for sure))

So forgetting about Twilio for a moment, is there another way for me to ping the web server to activate this process locally? Something I can try in Terminal? in a browser? I guess I'm just trying to test this as locally as possible to rule out any opaque issue with my indigo server before moving on to looking for issues in Twilio.

Posted on
Fri May 14, 2021 11:03 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

And to add more fuel to the fire, I get these handshake error messages from Twilio:
Code: Select all
You are receiving this email because the following error events triggered one of your configured Alert Triggers.

Error   Time
11220 - SSL/TLS Handshake Error   2021-05-14 16:00:19 UTC
11200 - HTTP retrieval failure   2021-05-14 09:06:33 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 08:27:40 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 08:09:54 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 05:17:57 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 05:17:34 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 05:16:47 UTC
11220 - SSL/TLS Handshake Error   2021-05-14 05:16:12 UTC

Posted on
Fri May 14, 2021 11:10 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

and one last tidbit... I am running Indigo on Big Sur

Posted on
Fri May 14, 2021 11:39 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

You installed the ISW/plugins/twilio files in the correct place, right? It should look like this:

Screen Shot 2021-05-14 at 1.35.44 PM.png
Screen Shot 2021-05-14 at 1.35.44 PM.png (332.93 KiB) Viewed 9715 times


I need to check the Wiki to see if it's documented, but you need to restart the Indigo server after installing these files. The server, not the client.

Then you can use the reflector or the direct web server port (8176) to activate the twilio IWS code, which sets the twilio_ping variable. Either of these work:

Code: Select all
 curl https://<reflector name>.indigodomo.net/twilio/ping --digest -u username:password
curl https://<Indigo server IP>:8176/twilio/ping --digest -u username:password


I use curl to test HTTP fetches. Browsers can do weird things.

You can't use port 1176 for HTTP requests, that's not an HTTP server port.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 11:41 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

jltnol wrote:
And to add more fuel to the fire, I get these handshake error messages from Twilio:


Twilio is reporting errors because the URL you provided in the webhook is rejecting the request. That's to be expected.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 11:53 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

NOW we're making progress:

My folder looks different than yours. In the "Immediate Notification" wiki, I didn't see a link to download the IWS Plugin, so again, based on the info in the wiki that the Twilio plugin had a IWS Plugin, I just grabbed the whole Twilo folder that is inside the Twilo plugin, so while my path is right, the files are very different, so I suspected that is the root of the problem. Where do I download the IWS Plugin that is needed for this?
Attachments
Screen Shot 2021-05-14 at 12.44.01 PM.png
Screen Shot 2021-05-14 at 12.44.01 PM.png (82.81 KiB) Viewed 9707 times

Posted on
Fri May 14, 2021 11:55 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

No. Delete those files before you really break something.

The files you want are on GitHub, in the same repository as the plugin: https://github.com/FlyingDiver/Indigo-Twilio

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 11:58 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

They're also included if you download the source code zip file from GitHub, but they're not in the compressed plugin file. There's no good solution to this discrepancy because the plugin store doesn't understand how to deal with files not in the plugin.

I just need to document this better in the WIki.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 11:59 am
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Errors configuring Immediate Notifications

Oh, and be sure that twilio folder is still in the plugin. ;)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri May 14, 2021 12:02 pm
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Errors configuring Immediate Notifications

So clearly I'm just an idiot! So I'm on the GitHub page but all I see are these 2 files... is this all I need to put in the Twilio folder?
Attachments
Screen Shot 2021-05-14 at 1.01.00 PM.png
Screen Shot 2021-05-14 at 1.01.00 PM.png (74.63 KiB) Viewed 9701 times

Who is online

Users browsing this forum: No registered users and 3 guests