Switch puts to logger calls.
Add device id to connection logs.
Gracefully handle message decode errors.