This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

Add a way to cummunicate with a Telegram Bot

2456712

Comments

  • tim1990tim1990 Member
    edited July 2016
    Will do Sir!

    EDIT:

    Just made a simple flow .  Telegram --> Voice (token telegram)

    It repeats every thing. So it says it twice!
  • aloftaloft Member
    @tim1990 @jorden ;

    I have the same, also when I send a message via Telegram back, I get two messages.  Blazingly fast though! That is impressive

    I use a private bot as per your instructions.
  • jordenjorden Member
    I have noticed that that sometimes happens. Next version will have a check that the message ID is not equal to the last message id.
  • Idd is indeed very fast! Bever would have thought. 
  • jordenjorden Member
    Just found out the first 'crash' bug as well. Will fix that next week.
  • yes was my homey :wink: 
  • Version 0.1.1 is now online at Github and submitted for approval in the app store. It fixes the crash, and should fix the duplicate messages.

    Furthermore, I have been thinking of how to improve this app. Let me know what you think about this idea:

    Every unique user ID that sends a "register" message, will be created as a device. That way, you can have multiple users on the same Homey that can receive messages from the same Telegram bot.
  • I know what telegram is, but can anyone tell me an example where I can use it for on Homey?
  • I use it for feedback:


  • Oh ok, now it's clear @0burner0 ;
  • I plan to use it to be able to control my TV and receiver from abroad, when my girlfriend isn't able to get it on the right channel :)

    I am also thinking about using it to read out my email from work, and if there is a 'soft error' (for example, when 1 server is getting low on diskspace) I would telegram myself. Since I don't usually check mail often in my free time.
    ("Hard errors" are sent to me by SMS... might make an SMS tool for Homey as well LOL)
  • New version was just published in the app store; should fix the duplicate messages and a bug that causes the app to crash.
  • spoellyspoelly Member
    edited August 2016
    hmm after the update my own bot is not giving any reaction any more
    So i deleted the bot and made a new one... and it is still not working..

    The bot is not reacting on /register xxxxxx

    Deleting the app has the same result..
  • Did you previously install the bot using the app store or using the developers version? Not sure if that could have anything to do with it.

    You might want to try to set the URL for your Telegram bot again:

    https://api.telegram.org/bot<token>/setWebhook?url=https://webhooks.athom.com/webhook/5795eeea20ad3acc0b868ced/

    Replace <token> with the token of your bot.

  • ok done that {"ok":true,"result":true,"description":"Webhook was set"}
    Still not working

    I only used the app store versions, no developer version installed

  • Hmm okay, that means that at least it is going to the webhook of Athom. So that must mean something else is going wrong. Probably the link telegram_user_id_on_your_homey VS user_id_on_telegram_chat or something.

    I must admit, this is kinda hard to debug, but I'll go back to testing again ....
  • ok thanks for your first help, will wait for a further update
  • Hmm, actually already found out what I did wrong. Submitting update to app store now for approval!
  • ah ok thanks!
  • And it is published. Can you try to update (reinstall from the app store?) and then see if it works?
  • It works again! Thank you!
  • Awesome! No problem and sorry for inconvenience
  • no problem, thanks for the quick solution.
  • I would like to ask the bot things for example what is the tempature at home and recieve it. I have tried to do this with the better logic app by setting the tempature in a value but can value be put in a message?
  • Yes, you should be able to set that in a message, but to be honest I don't really know how that works with the better logic app (I'm not using that currently).
  • Can I register 2 users to chat with one bot? (one on my phone, one on my wifes phone)
  • mbalik79 said:
    Can I register 2 users to chat with one bot? (one on my phone, one on my wifes phone)
    I tried to make a channel and add the bot into it, but get an error on the webapp (of Telegram) parameter missing
  • Currently it's just one user. But I've been thinking about it, let me quote myself:

    "Furthermore, I have been thinking of how to improve this app. Let me know what you think about this idea:

    Every unique user ID that sends a "register" message, will be created as a device. That way, you can have multiple users on the same Homey that can receive messages from the same Telegram bot."
  • mbalik79mbalik79 Member
    edited August 2016
    jorden said:
    Currently it's just one user. But I've been thinking about it, let me quote myself:

    "Furthermore, I have been thinking of how to improve this app. Let me know what you think about this idea:

    Every unique user ID that sends a "register" message, will be created as a device. That way, you can have multiple users on the same Homey that can receive messages from the same Telegram bot."
    Sound good. So I Can chat thru homey when I Am at work with the family at home ;)
  • edited August 2016
    This is what I have, works like a charm  :)

Sign In or Register to comment.