itead / Sonoff_Devices_DIY_Tools

BSD 3-Clause "New" or "Revised" License
548 stars 168 forks source link

SOnOff Basic doesn't respond to HTTP1.0 Post requests #105

Open mordorr opened 3 years ago

mordorr commented 3 years ago

Hi, i am not sure if this is right place to report this issue, but i see here is great community of experts, so let me try,

Short background of user story: i've bought SOnOff to extend my PLC-controlled home capability, WAGO PLC is based on codesys2 and it's library handles http post and get requests, so sound like perfect match with SOnOff DYI

I can control SOnOff using Postman or CURL but wago doesn't get response from the device (timeout) so, tracing an issue i've found that POSTMAN and CURL sending HTTP1.1 requests when Wago send HTTP1.0 (it's been "upgraded" in the past to avoid chunking)

I've confirmed issue with HTTP1.0 sending CURL in this format - no response from SOnOff. image

is this something that should be fixed in Sonoff FW, or rather i should look for workaround ? In case, I have two ideas:

  1. Ask Wago to deliver old (2009) library for HTTP
  2. use RPi as HTTP sender and handle requests from WAGO there. this makes all infrastructure too complex and i'd like to avoid spreading control to RPi

Thank you for hints

Jacek