Always go by the internal temperature of the meat; use a meat thermometer, reading the temperature at the center of the thickest part of the meat, not near any bones.
When I smoke pork, I consider it done at 190 degrees, though it's probably very safe at 180 degrees.