Unplugged the cable to the printer (even when it's off) and viola. iMac goes right to sleep and stays asleep.
Strange for sure.
Yeah, it's some USB activity from the printer for sure. Like I said, with my printer (a 3 year old Canon multifunction inkjet) if I leave it in the state it is in, either off or on, the iMac will not wake up. But if I happen to change it's state while the Mac is sleeping it will come on immediately.
My best guess is that some signal is sent out over USB when entering sleep mode to which your HP is somehow responding to.
I hope you get it sorted. I understand how unplugging it, while a solution, is hardly ideal and a bit of a pain in the butt.