RMS vs average current.
If you consider the voltage as DC then you need to use "average current".
Sorry yes , my mistake, well spotted, i was babbling on and tripping myself up....indeed, "hacking" it up so that you can do a simple VDC * IDC measurement to get input power is the best way.
............................................................................
Also, do you have an mains isolation transformer so that you can do measurements with scope probe on the primary side....if so, then could we have a look at the RCD clamp cap voltage?
I wouldnt mind betting that your temperature readings are just normal for a DIP8 chip with little PCB copper around it, and no heatsink used. Switchng losses can be very high with offline flybacks due to the high voltage being switched.......and your flyback doesnt operate in quasi resonant mode either.
Also, you only have a 50V electro cap at your controllers vcc pin....you really also need a 100n ceramic here, and close to the pin aswell.
Also, a 50V electrolytic cap is not good for a 5V rail.....so better use say a 16v rated cap there. Electrolytic caps dont form properly until they get >10% of rated voltage on them
Also, the DK1203 is probably a "cheap as chips" controller...probably it overheats, but its internal temperature protection shuts it down, until it gets cooler, then it starts workign again....they probably just hope the user doesnt use it in hot environments, or doesnt use it for long at max power.
Also, the chip has self-supply, so with a high votlage rail......the bias supply alone will be putting some fair heat into the DK1203......you could investigate whether you can supply the bias supply externally, eg from a auxiliary coil off the mains transformer......but there is no proper datasheet so you cant find this out....for example, it may even be possible to drive the VCC pin with an external 12v rail, so that you get a low rds(on) of the internal fet....but without a proper datasheet, we have no way of finding out if this is even possible.