Telegram receive messages

Hi,
it is a possibility to optimize the bot for recive Messages?
I think with the messages we can change the light or the temperatur of room.