Closed jm185267 closed 1 year ago
seems like post is no longer allowed for the /shelly endpoint. It must be a get.
Edit: After reading Op.. this comment is a dupe. +1 for reading comprehension.
Can reproduce, will fix as soon as I can and release a patch release a new minor version
fix commited tested against Shelly Gen 1 and 2 tagged as 0.3.0 pushed released to pypi
If this still occurs reopen the issue.
After the recent firmware update of Shelly Pro 4PM to version 1.0.3 it is no longer possible to initialize the device with the following exception: Bad JSON
After a short debugging session I discovered that in class
class Shelly():
, method:def __detect__(self, ip, port):
POST is used to gather the device information:response = post(url, timeout=5)
. After changing that toget()
(and importing get from requests), Shelly starts responding normally.This doesn't seem to align with the HTTP API description on the Shelly webpage (they claim that the method doesn't matter) but I might be missing something.
Device Info