ImsBrosLabs / rig-smart-switcher

A python script that automatically switches ON/OFF a crypto mining rig depending on the weather and rig temp.
0 stars 0 forks source link

JSONDecodeError after P110 firmware update #1

Open sangimed opened 2 years ago

sangimed commented 2 years ago

PyP100 doesn't seem to like upgrading the P110 FW to 1.0.16 Build 220624 Rel. 171733 (previous version unknown) :

Sending credentials to the plug and creating AES Key and IV for further methods...
Traceback (most recent call last):
  File "/home/myUsername/.local/lib/python3.8/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/myUsername/Repositories/rig-smart-switcher/main.py", line 57, in <module>
    main()
  File "/home/myUsername/Repositories/rig-smart-switcher/main.py", line 45, in main
    p110 = init_p110_object()
  File "/home/myUsername/Repositories/rig-smart-switcher/main.py", line 28, in init_p110_object
    p110.login()
  File "/home/myUsername/.local/lib/python3.8/site-packages/PyP100/PyP100.py", line 160, in login
    decryptedResponse = self.tpLinkCipher.decrypt(r.json()["result"]["response"])
  File "/home/myUsername/.local/lib/python3.8/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
sangimed commented 2 years ago

Related to https://github.com/fishbigger/TapoP100/issues/79.