after rebooting my OpenHAB today, figuring same issue.
Not sure I can contribute, but really looking for a fix….
after rebooting my OpenHAB today, figuring same issue.
Not sure I can contribute, but really looking for a fix….
I thought this was mentioned above, but now I can’t find it. The pyicloud python module has also solved this issue using srp. The specific PR is at Fix authentication with new authentication protocol by irakhlin · Pull Request #459 · picklepete/pyicloud · GitHub, though I just learned the project is now maintained in another repo where this PR has been incorporated: GitHub - timlaing/pyicloud: A Python + iCloud wrapper to access iPhone and Calendar data.
Yes exactly. I checked the homekit, implementation, sadly this is using a different API with different authentication mechanism. I started to reimplement the pyicloud solution. One step of the authentication is working, the second one fails. This will take its time since there are no helpful error messages and different srp variants.
@maihacke, I don’t know whether this adds something: ⚠️ Apple Login Authentication Error (421, 503) ➤ Update to v3.3.3 · Issue #476 · gcobb321/icloud3_v3 · GitHub?
Instead of reimplementing the pyicloud solution, is it possible to just directly rely on pyicloud itself for the module? It seems silly to have multiple projects all maintaining their own methods of connecting to the iCloud API.
I don’t know how easy it is to build a reliable module with python, but I know there’s at least a janky way to get it to work because my own OH installation runs off pyicloud (I made the switch a long time ago when the module was having an issue, and I’ve found it more customizable).
Thank you for all you are doing. If there are some builds to assist with testing, happy to help.
Dear all, is there a fixed binding for OH 4.3?
Not yet. Simon is working on that but it may take its time.
As the fix takes a little bit longer, can you elaborate how you use pyicloud with openHAB?
I assume with a script that calls an external python script? But I’m interested as well.
I have written my own python script that updates OH via the REST API. The script runs as a cronjob on the bare metal.
Great! Care to share? ![]()
It’s become a fairly convoluted script that does several other things, and would be very hard to anonymize. To get it working in its most basic form, copy the 2FA example from the module documentation. Then call api.devices to get the info you want. Then post it to OH using the requests module:
```
requests.put(“http://192.168.1.1:8080/rest/items/myLocation/state”, result, headers={‘Content-type’: ‘text/plain’})
```
I managed to create a first draft implementation, which at least works for me:
Please follow discussion in Github and report issues there.
Just installed and tested. logged in and authenticated without any issues.
Many Thanks
What happens if you restart openHAB?
Tried a couple of restarts to be sure.
Each time I restart it has to re-authenticate using a new code.
After the new code is entered everything appears to be working correctly.
Yes, that’s true.
But this is rather inconvenient ![]()
Not ideal but much better than it not working.
I do not restart often, so will keep using this update.
The pyicloud module solves this by storing what is, in effect, a cookie in a subfolder.