Smart sensors for smart factories