17 lines
749 B
Python
17 lines
749 B
Python
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())
|