• I cannot give you an answer but I can maybe give you a workaround. Instead of using onInit(), maybe try to make your own init function, with some delay before execution:

    function myInit()
    {
      //cut-paste here the content of onInit()
    }
    
    setTimeout(myInit,500);
    

    Without knowing exactly why, with this trick, I was able to let most of my scripts work even when invoked from flash. FYI, I had the same behaviour with some I2C displays .

About