Emission of magic smoke is generally indicative of catastrophic component failure, the cause of which will be very difficult to ascertain in the field, it generally requires analysis in a lab by someone familiar with all of the component specs.
One thing you can do now however is to confirm the presence or absence of any major misapplication or installation error, for example the wrong voltage or a grounded connection. Beyond that, you replace the unit and start over, send the burned unit to the manufacturer for a Root Cause Failure Analysis (RCFA).
"You measure the size of the accomplishment by the obstacles you had to overcome to reach your goals" -- Booker T. Washington