Amazon to pay almost $31 million to settle Alexa, Ring violations