From animal monitoring to early warning systems through the Internet of Things