Trying to trigger pin with CURL causes reboot

I'm trying to trigger the OUT (pin 8) manually using CURL and the REST API to test a buzzer but my unit just reboots.


Here is my curl command:


curl -H "Content-Type: application/json" -d '{"pin":8, "state":1, "momentary":1000}' http://192.168.0.93:13880/device

curl: (56) Recv failure: Connection reset by peer


And here is the console output...


Konnected firmware 2.3.0

NodeMCU 2.2.0.0 build 20190805 powered by Lua 5.1.4 on SDK 2.2.1(6ab97e9)

Heap: 41712 Initializing Konnected (2cf43259bb88)

Heap: 40736 Application Version: 2.3.5

Heap: 39568 Connecting to Wifi..

> Heap: 42240 Wifi connected with IP: 192.168.0.93 Gateway: 192.168.0.1

Heap: 42064 Current Date/Time: 2020-08-14 11:28:01 UTC

Heap: 41976 Booting Konnected application

Heap: 41888 UPnP: Listening for UPnP discovery

Heap: 41408 HTTP: Starting server at http://192.168.0.93:13880

Heap: 41240 Loaded: server

Heap: 39376 REST Endpoint: nil

Heap: 39328 Loaded: application

Heap: 37720 HTTP: Device

PANIC: unprotected error in call to Lua API (/opt/lua/httpd_res.lua:7: bad argument #1 to 'len' (string expected, got nil))

 

 ets Jan 8 2013,rst cause:2, boot mode:(3,6)

 

load 0x40100000, len 27760, room 16

tail 0

chksum 0xd4

load 0x3ffe8000, len 2340, room 8

tail 12

chksum 0x5f

ho 0 tail 12 room 4

load 0x3ffe8924, len 136, room 12

tail 12

chksum 0x84


Login or Signup to post a comment