I recall not too long ago a startup advertising exactly this idea for farms. It was some box with various sensors (and output lines) that you could configure to do a multitude of tasks