I don’t really know how to help you… reset the device?
Recently, several people had problems with random behavior, but it was with 4CHR3, not D1. The only common denominator here is RF 433Mhz… which was probably the problem for these people.
I can only speculate that something strange has been happening recently with some Sonoff devices that have RF 433mhz. Maybe some bug in FW or ewelink… or finally fix rf codes are starting to be problematic.
But in your case it may be something completely different.
The problem that others had with the 433 was related to ghost transmission, they themselves did not have a remote added and the device still responded to someone else’s transmission.
Unfortunately, Sonoff uses fixed codes in RF 433, as a result there is always a chance that something nearby generates exactly the same codes that affect the behavior of the device.
RF 433Mhz with fixed codes is very easy to eavesdrop and transmit identical codes and possibly influence other people’s devices. Sometimes it is just an unfortunate coincidence and sometimes it may be intentional.
The code scheme that Sonoff uses is nothing special and mysterious, you can find them online.