Sonoff Mini ver 3.5.0 has a new REST API protocol - can it be controlled by webcore without firmware upgrade


#1
  1. Give a description of the problem**

Sonoff Mini ver 3.5.0 has a new REST API protocol which allows local control directly. I have the device successfully switching with postman.
Reading the forums over the last few months, it seems that it always been the longterm aim of the Smartthings/Webcore community to control Sonoff devices directly without the need for firmware updates - perhaps we are a bit nearer?
I expect I have made a silly error - thanks in advance for any pointers

2) What is the expected behaviour?
Should switch

3) What is happening/not happening?
Does not switch - but I see that the {“seq”:49, value increments so I must be close!!

**4) Post a Green Snapshot of the piston!

this is the removed url:
http://192.168.1.127:8081/zeroconf/switch

5) Attach logs after turning logging level to Full

8/10/2020, 11:15:16 PM +584ms
+0ms ╔Received event [PH].wc_async_reply = httpRequest with a delay of 1ms
+92ms ║RunTime Analysis CS > 16ms > PS > 36ms > PE > 39ms > CE
+94ms ║Runtime (37931 bytes) successfully initialized in 36ms (v0.3.110.20191009) (93ms)
+95ms ║╔Execution stage started
+105ms ║║{“seq”:49,“error”:422}
+106ms ║║Executed virtual command log (1ms)
+109ms ║╚Execution stage complete. (15ms)
+110ms ║Setting up scheduled job for Mon, Aug 10 2020 @ 11:16:16 PM BST (in 60.084s)
+119ms ╚Event processed successfully (119ms)
8/10/2020, 11:15:16 PM +140ms
+1ms ╔Received event [PH].time = 1597097716778 with a delay of -638ms
+145ms ║RunTime Analysis CS > 21ms > PS > 71ms > PE > 52ms > CE
+147ms ║Runtime (37927 bytes) successfully initialized in 71ms (v0.3.110.20191009) (145ms)
+149ms ║╔Execution stage started
+160ms ║║Cancelling statement #2’s schedules…
+169ms ║║Sending internal web request to: 192.168.1.127:8081/zeroconf/switch
+198ms ║║Executed virtual command httpRequest (31ms)
+199ms ║║Requesting a wake up for Mon, Aug 10 2020 @ 11:15:36 PM BST (in 20.0s)
+204ms ║╚Execution stage complete. (56ms)
+206ms ║Setting up scheduled job for Mon, Aug 10 2020 @ 11:15:36 PM BST (in 19.994s), with 1 more job pending
+214ms ╚Event processed successfully (214ms)


#2

I think the issue you’re going to run into is webCoRE cannot send nested json as far as I remember. Single level is doable.