SCI callbacks suddenly deregistered

I’m using callbacks for 2 programs in a Digi IX14 device.
They suddenly stop working, I mean they work for a while, but at a random basis they stop working, when I make SCI requests from Digi Remote suddenly they are no longer accesible, even if the container program where they are registered are still running without errors.

Maybe I’m missing something? any configuration to prevent callbacks being dropped without any explanation?

For registering the callbacks I use
from digidevice.device_request import register as register_callback
register_callback(“launcher”, self.launcher)

I don’t event have a unregister method in my program, so I find it unlikely i’m unregistering by accident.

This is my SCI request:

   {"action": "check_status"}

When the callbacks is working I get a correct answer:

    {"status": "ok", "pid": 22633}

But when it stops working, the answer is like if the callback was never registered:

    CCAPI Error 7 (CCAPI_RECEIVE_ERROR_INVALID_DATA_CB) while handling target 'launcher'

Everytime it happens I solve it by restarting the container process (the .py file), my program is running in a custom init script:
python /etc/config/scripts/program.py

Could there be a chance this is a bug in the OS or in the python library? I’ve been struggling with this issue for 10 months, I even isolated the callback in a file that only contains the callback, and still eventually it gets unregistered.

Any help would be appreciated.
Have a nice day and thank you.

At what stage are you registering the callback?

Presumably you are registering on boot once the connection is made but what is your script doing to monitor that the callback is still valid?

From a guess I would be logging into DRM and viewing the Summary Dashboard of the device and checking the Connection History to see if the connection history lines up with callback failure.

The TCP connection to DRM could drop for a number of reasons and obviously the IX14 will rebuild the connection but on reconnect do you need to reregister the callback?

From firmware 21.8 the “show cloud” command in the command interpreter will feedback the uptime of the cloud connector. If you monitor that and re register when uptime now < uptime before then it might solve your case.

Don’t forget that the IX14 has been End Of Lifed by Digi for over a year now and 22.5.50.62 will be the final major firmware release for the IX14 product.

I would not be stuffing around with DRM when you are working with an end of lifed product. I would be looking to map this to a MQTT platform such as ThingsBoard or Datacake.

For reference, I have had issues with python on version 21.11 and 22.2 so stick to 22.5 or 21.8 if you need an older version.

Nicholas Wilson
Your IoT
https://www.YourIoT.com.au