jasch97
(Jannik Schubert)
January 28, 2024, 6:51pm
1
Hi,
i added the icloud Binding to my openhab 4 installation to check if my iPhone is in my house. Unfortunately, after some time the icloud binding either reports a communication error or the binding says that my iPhone is offline. When I restart one of the things they start working again but after some time one of them goes offline again. Is there a way to keep both things online?
jasch97
(Jannik Schubert)
January 29, 2024, 8:23pm
3
Thanks for your reply. Looks like this could be a hacky solution for the problem. So far it looks like the rule posted in this thread works.
configuration: {}
triggers:
- id: "1"
configuration:
thingUID: icloud:account:xxxxxx
previousStatus: ONLINE
status: OFFLINE
type: core.ThingStatusChangeTrigger
- id: "2"
configuration:
time: 07:00
type: timer.TimeOfDayTrigger
- id: "4"
configuration:
thingUID: icloud:device:xxxxx
previousStatus: ONLINE
status: OFFLINE
type: core.ThingStatusChangeTrigger
conditions: []
actions:
- inputs: {}
id: "3"
configuration:
type: application/javascript
script: >-
var logger = log('Restarting Apple Things');
var thingMgr = osgi.getService('org.openhab.core.thing.ThingManager');
var ThingUID = Java.type('org.openhab.core.thing.ThingUID');
logger.info('disable iCloud Account and iPhone');
thingMgr.setEnabled(new ThingUID('icloud:account:xxxxxx'), false);
thingMgr.setEnabled(new ThingUID('icloud:device:xxxxx'), false);
java.lang.Thread.sleep(3000);
logger.info('Enable iCloud Account and iPhone');
thingMgr.setEnabled(new ThingUID('icloud:account:xxxxx'), true);
thingMgr.setEnabled(new ThingUID('icloud:device:xxxxx'), true);
type: script.ScriptAction
pete3
(peter jepsen)
August 10, 2024, 11:02am
4
hmm … i installed icloud binding on OH4.1
The first installation went flawless. Got 2FA-code etc. It worked for some days.
then the account suddenly turned offline
I tried to delete the account thing (defined through UI) and reinstall
but now i never get the 2FA code on my phone or macbook ?!?
I tried delete&reinstall gain. Also binding.
I tried to disable&enable account thing.
nothing makes the 2FA-code show on iphone again,
AlexOH
(Alexander)
October 24, 2024, 10:49am
5
Did you find a solution for this by any chance, Peter? I have the exact same problem since a few days…
pete3
(peter jepsen)
October 27, 2024, 10:21am
6
yeah, it works now
Sadly i am not shure excactly why - because i did a lot of things due to other problems. But mainly:
I restored an old backup,
disable + wait 10 sec + reactivate the account thing
Then the message for the code showed in iphone/mac
AlexOH
(Alexander)
October 27, 2024, 4:07pm
7
Thanks for your response Peter! Very strange, I didn’t change anything, it just stopped working a week ago. Whatever I try now, I never get the 2FA on any off my Apple devices. I also tried with another Apple Account and that’s also not working I guess I’ll need to do some more digging…
pete3
(peter jepsen)
October 28, 2024, 7:34am
8
just an idea:
do you have an old back of the sd-card?
for debugging - try to restore “everything” with that backup. If it still fails, it might somehow be a flaw on apples side
same here.
It was working for months - now the two-factor-dialogue does not popup on my iPhone anymore.
AlexOH
(Alexander)
November 14, 2024, 9:10pm
10
Quick update from my side: I didn’t change anything, just kept trying every now and then and this night I received the MFA code again and could enable the iCloud things again…
lucky you
For me it is still not working (anymore).