Embedded devices Authentication, Integrity and Confidentiality
I do not see an immediate flow, but the public-key cryptography seems to be an overkill in your system with a single server. As long as the server keeps some keys of each device $D$, it may as well keep a single symmetric key $K_D$, and use a single authenticated encryption scheme $\Pi$ with key $K_D$, for instance, AES-GCM. This would simplify your system significantly, and you would not need certificates. You would not even need random number generator, except for the key generation.