An archive of community.esquilo.io as of Saturday January 26, 2019.

“Send A Text Message” not working

Drathnis

I tried using the code from the ''recipes'' section of getting started, I filled in all my information; and i got this error:

    %%Runtime error [error in response]

    CALLSTACK
    *FUNCTION [main()] sd:/Mine/Text.nut line [11]
    
    LOCALS
    [vargv] ARRAY
    [this] TABLE

The code from website:

const accountSid = "ABCDEF1234567890";
const authToken  = "abcdef1234567890abcdef1234567890";

https <- HTTPC("api.twilio.com", 443);
https.auth(accountSid, authToken);

https.post("/2010-04-01/Accounts/" + accountSid + "/SMS/Messages", {
    From = "15555551111",
    To = "15555551212",
    Body = "Hello from Esquilo!"
});
Scott_Shumate

That exception indicates that the HTTPC class could not parse the HTTP in the response. It's possible that twillio has changed something in their API that we're not handling. We'll see if we can reproduce it here.

patrick

The demo is working fine for me.

Did you sign up with Twilio, get an account SID, an auth token, your Twilio from phone number, and add your 'to' phone number to the 'verified caller IDs' and update the code with all of the above?

The code snippet in our recipes has dummy values for all, and won't run as-is, if that's not clear. The instructions for getting setup with Twilio are next to the snippet in the recipe.

Drathnis

I did change the values, I'll go back and check just to make sure they are correct.

Thanks

Drathnis

I confused the number SID and the account SID, everything working fine now.

Are you aware of any plans to make some tutorials?

patrick

I'm glad you got it working. There's a lot of bits of info to get in the right spots...

What type of tutorials would you be interested in?

Drathnis

Maybe an intro to squirrel tutorial. I have done a bunch of Arduino programming, and thought I would try Esquilo.
Im trying to rewrite some of my programs, but they use a i2c LCD and I cant find much on that.
Also maybe a tutorial on interfacing with the html file.

This is a cool new system and it has a lot of potential.

Thanks.

patrick

Thanks for the suggestions. I've been working on a tutorial based on the Seeedstudio Grove starter kit:
http://www.seeedstudio.com/depot/Grove-Starter-Kit-for-Arduino-p-1855.html?cPath=84_13

It has an I2C LCD. I've ported some of the driver to Squirrel, but need to finish it up. I will post it on our Github page when done.

It would be a good kit to get started or play around with. We have some to put in our online store when the tutorial is done too.

Drathnis

Thanks, let me know when you get it ported.
I also wanted to let you know that for the "SEND AN IFTTT EVENT" the 443 is not needed

https <- HTTPC("api.mailgun.net", 443);

I removed it at it works fine smile

https <- HTTPC("maker.ifttt.com");

I also found this: https://electricimp.com/docs/resources/arduinoport/

Im not sure what changes it would need for esquilo.

Thanks again
-Julian

Scott_Shumate

Thanks for the feedback. The one thing to note with removing the 443 is that the connection will then default to port 80 which is HTTP without security. If you use port 443, which is the default HTTPS port, Esquilo will use HTTPS (SSL/ TLS) to secure the request. If you're not concerned with security, then it is definitely faster and will use less memory to remove the 443.