Avatar for Abhinav

Abhinav

Member since Dec 2017 • Last active Mar 2018
  • 0 conversations
  • 4 comments

Love Esp

Most recent activity

  • in Projects
    Avatar for Abhinav

    @Vasily,
    Till the time @PaddeK receives his Echo Dot, I will test the code on my dot.
    So here are the details of error that I was talking about.

    Firmware flashed : From here "espruino_1v94_esp8266_4mb.tgz"

    Test 1: I first tried file with name "alexa_ok4done.js" from your attachment.

                         Got a warning popup - Module dgram not found. But compiles without any issue.
                         Result: Error in device discovery. So I fixed the code 
    
     msg += "USN: uuid:Socket-1_0-"+getSerialNumber()+"::u­rn:Belkin:device:**\r\n";
    

    Test 2: I have modified the code and now device is discovered. But when I tried to turn it on/off using Alexa app.

    onPageRequest
    ****************************************­**************
    Header
    Req ( POST  req.url=  /upnp/control/basicevent1
    Req=
    httpSRs {  }
    Post length=
    Post url=
    {
      "method": "GET",
      "host": "",
      "path": "/upnp/control/basicevent1",
      "pathname": "/upnp/control/basicevent1",
      "search": null, "port": null, "query": null }
    ****************************************­**************
    Post (/upnp/control/basicevent1) received, start special handling doPost_handleUpnpControl
    pdata.length == length67 / 299
    pdata.length == length299 / 299
    ERROR: Error processing Serial data handler - removing it.
    Execution Interrupted during event processing.
    at line 340 col 31
          pinf("pdata == " + pdata);
                                  ^
    in function called from system
    New interpreter error: CALLBACK,MEMORY
    onPageRequest
    ****************************************­**************
    Header
    Req ( POST  req.url=  /upnp/control/basicevent1
    Req=
    httpSRs {  }
    Post length=
    Post url=
    {
      "method": "GET",
      "host": "",
      "path": "/upnp/control/basicevent1",
      "pathname": "/upnp/control/basicevent1",
      "search": null, "port": null, "query": null }
    ****************************************­**************
    Post (/upnp/control/basicevent1) received, start special handling doPost_handleUpnpControl
    Uncaught SyntaxError: Got return expected '}'
    at line 415 col 4
      });
       ^
    in function "doPost_handleUpnpControl" called from line 170 col 41
            doPost_handleUpnpControl(req,res);
                                            ^
     at line 171 col 9
            break;
            ^
    in function called from system
    server.on UDP message received
    ---
    

    And via Alexa Ask

    onPageRequest
    ****************************************­**************
    Header
    Req ( POST  req.url=  /upnp/control/basicevent1
    Req=
    httpSRs {  }
    Post length=
    Post url=
    {
      "method": "GET",
      "host": "",
      "path": "/upnp/control/basicevent1",
      "pathname": "/upnp/control/basicevent1",
      "search": null, "port": null, "query": null }
    ****************************************­**************
    Post (/upnp/control/basicevent1) received, start special handling doPost_handleUpnpControl
    pdata.length == length366 / 299
    ERROR: Error processing Serial data handler - removing it.
    Execution Interrupted during event processing.
    at line 336 col 66
    ...ata.length + " / " + length);
    

    I will try @PaddeK module share the results.
    EDIT: Just tried the Alexa module. It is not working. I gave saved the alexa.js in my local disk in SandBox folder. My other modules are loaded from the same location, so seems there is no issue with loading of the module from disk.

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v94 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >Uncaught SyntaxError: Got UNFINISHED STRING expected EOF
     at line 1 col 27
    Modules.addCached("alexa","'use strict';\n\nconst\n    Defau...
                              ^
    New interpreter error: LOW_MEMORY,MEMORY
    Uncaught Error: Module "alexa" not found
     at line 1 col 28
    var alexa = require('alexa');
                               ^
    =undefined
    
  • in Projects
    Avatar for Abhinav

    @PaddeK! you can use echoshim.io for testing purpose. Just install Alexa App in your smart phone and connect it with Amazon account.

    Echoshim is a browser based Echo emulator that is also connected with the same Amazon account that your actual echo dot.

  • in Projects
    Avatar for Abhinav

    Hi there,

    I am also interested to integrate Alexa with Esp8266. I have an Echo Dot and esp8266 12E and I tried all the attached code with latest Espruino firmware downloaded from github master tree on tip.

    I am getting lots of error when I am running discovery. doPost_handle* method is giving Javascript error.

    I can also post the screen shot of error.

    Another thing that I want to try the Alexa.js by PaddeK as a module but I don’t know how to call/use that module.
    I am a Dot net programmer and new to nodeJs
    Thanks

Actions