How to pass information from a sensor to my telegram bot

Thank you for all the support provided, as you have helped me to identify the problem, I am going to ask in the general forum to see if a colleague gives me a hand and if in the end I solve it, I will come back here to put the solution for someone someday you are interested in how to solve it, I said many thanks for your time, greetings

1 Like

Had this exact issue and the detail in this thread is pretty much the only thing I could find on google. Since the final working solution was not actually posted, I figured it out for my own purposes and added here in case it helps someone else.

[{"id":"bd8e31c9.41f47","type":"chatbot-telegram-receive","z":"13f5d38f.51b8ac","bot":"194b8e9b.918651","botProduction":"","x":150,"y":180,"wires":[["b002eb3e.8b1e68"]]},{"id":"89028f38.da245","type":"chatbot-telegram-send","z":"13f5d38f.51b8ac","bot":"194b8e9b.918651","botProduction":"","track":false,"passThrough":false,"errorOutput":false,"outputs":0,"x":890,"y":180,"wires":[]},{"id":"b002eb3e.8b1e68","type":"chatbot-command","z":"13f5d38f.51b8ac","name":"","command":"/temps","x":330,"y":180,"wires":[["b1e5b6d4.428968"]]},{"id":"db79d19a.f22b4","type":"chatbot-message","z":"13f5d38f.51b8ac","name":"","message":[{"message":"Outside temperature is {{payload.content}} degrees\n"}],"language":"none","x":690,"y":180,"wires":[["89028f38.da245"]]},{"id":"3663cd1.3701b32","type":"link in","z":"13f5d38f.51b8ac","name":"Mkbedroom","links":["a438198e.f91a38"],"x":75,"y":260,"wires":[["978e7a4a.83c3c8"]]},{"id":"b1e5b6d4.428968","type":"change","z":"13f5d38f.51b8ac","name":"Outside temp","rules":[{"t":"change","p":"payload.content","pt":"msg","from":"/temps","fromt":"str","to":"outsidetemp","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":490,"y":180,"wires":[["db79d19a.f22b4"]],"info":"Replace the message command with the figure saved to the Flow context from the external data source"},{"id":"978e7a4a.83c3c8","type":"change","z":"13f5d38f.51b8ac","name":"","rules":[{"t":"set","p":"outsidetemp","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":260,"y":260,"wires":[[]],"info":"Save the external data source to the Flow context"},{"id":"a2e66f5f.b26d1","type":"comment","z":"13f5d38f.51b8ac","name":"External data source","info":"In my case, this is from an MQTT link node sending a temperature payload every 20 seconds","x":210,"y":300,"wires":[]},{"id":"4a6215e4.2bab0c","type":"comment","z":"13f5d38f.51b8ac","name":"Main Flow","info":"","x":150,"y":140,"wires":[]},{"id":"194b8e9b.918651","type":"chatbot-telegram-node","botname":"yourbot-here","usernames":"","providerToken":"","polling":"1000","store":"","log":"","debug":false,"webHook":"","connectMode":"polling"}]
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.