Working in Sonoff Mini

This commit is contained in:
2021-02-02 12:51:13 -05:00
parent 33efa7052c
commit 6e2f3e071d
7 changed files with 297 additions and 13 deletions

16
sonoff_mini.py Normal file
View File

@@ -0,0 +1,16 @@
import requests
the_ip = "192.168.86.50"
emptybody = {"data":{}}
response = requests.post('http://'+the_ip+':8081/zeroconf/info', json = emptybody)
print(response)
print(response.json())
response = requests.post('http://'+the_ip+':8081/zeroconf/ota_unlock', json = emptybody)
print(response)
print(response.json())
response = requests.post('http://'+the_ip+':8081/zeroconf/info', json = emptybody)
print(response)
print(response.json())
flashbody = {"deviceid": "","data": {"downloadUrl": "http://meneelys.com/f/firmware_sonoff_mini99.bin","sha256sum": "76847a88e96f8053cd2b848bbd2b3ce9a95ac86d599848e272610d4e14f1a9cb"}}
response = requests.post('http://'+the_ip+':8081/zeroconf/ota_flash', json = flashbody)
print(response)
print(response.json())