iCloud things permanently turning offline

Hello,

i got the problem, that some of my icloud things are permanently turning offline.
When i disable and reanable it, it is online again and then another thing goes offline.

Sometimes i get this error message:

CONFIGURATION_ERROR
The device is not included in the current account

and sometimes this:

COMMUNICATION_ERROR
Reported offline by iCloud webservice

Anyone with the same problem here?

Thanks,
Alex

I also have the same issue.
A workaround I have create a rule that disable/enable the thing when it get offline.

I did that, and the log shows the rule runs exactly every 5 minutes… I’m not sure that’s wise use of server resources…?

Is this a new issue, since OH4?

Is it a coincidence a parameter (if that’s the correct wording, I’m still discovering :grimacing:) of the Thing is
refreshTimeInMinutes=5? I assume there’s a correlation…

Hello Phuong, could you please share how did you enable and disable item from you rule? Are you uding DSL rule?

The rules is trigged by:

  1. The things goes from ONLINE to OFFLINE (iCloud things)
  2. Everyday at 7.00
  3. The things goes from ONLINE to OFFLINE (iPhone things)

Please see the rules below:

configuration: {}
triggers:
  - id: "1"
    configuration:
      thingUID: icloud:account:XXXXX
      previousStatus: ONLINE
      status: OFFLINE
    type: core.ThingStatusChangeTrigger
  - id: "2"
    configuration:
      time: 07:00
    type: timer.TimeOfDayTrigger
  - id: "4"
    configuration:
      thingUID: icloud:device:XXXX:XXXXX
      previousStatus: ONLINE
      status: OFFLINE
    type: core.ThingStatusChangeTrigger
conditions: []
actions:
  - inputs: {}
    id: "3"
    configuration:
      type: application/javascript
      script: |-
        var logger = log('Restating Things');

        logger.info('iCloud Account');
        var thingMgr = osgi.getService('org.openhab.core.thing.ThingManager');
        var ThingUID = Java.type('org.openhab.core.thing.ThingUID');
        logger.info('disable iCloud Account');
        thingMgr.setEnabled(new ThingUID('icloud:account:XXXXX'), false);
        java.lang.Thread.sleep(3000);
        logger.info('Enable iCloud Account');
        thingMgr.setEnabled(new ThingUID('icloud:account:XXXXX'), true);
    type: script.ScriptAction

Thanks, but my account are online and what’s getting offline is icloud device. Any suggestion?

I’ve tried to use your rule with OH 4 and Java 17 but it’s showing this error:

2023-12-27 10:34:35.833 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - ScriptEngine for language ‘application/javascript’ could not be found for identifier: 6e5fe587-9a23-402e-9fa6-5dc1d81b7d2a

Please read this:

Dear Colleague, any one else facing issues with icloud binding get disconnected?

I am using icloud binding as well and can not confirm any problems yet.
All things are online for me - running OH4.1.1 in a Synology Docker Container.

1 Like

Same over here.

I’m not able to understand what happes time to time on icloud binding here stop and there is no errors. Any clue?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.