Great work until now, really love the app.
How can I buy you a coffee? (or beer?!)
Next suggestion, Probably most users will have some kind of Logic value in their message. Better Logic now has been rebranded to Better Logic Library, where its functionality can be incorporated into any app, maybe this is something for Telegram Notifications as well.
Iāll be adding the custom functions, like in DC, HOOP and Watchman, into BLL this week and hope to also finish the ānumberā function/class.
But just know, if you incorporate the decoder, which is just a few simple steps, the custom functions and number-method will be automaticly included when BLL is updated on a local Homey. There is no need to update anything on the apps that have BLL encoding included.
if I change from app.bot.telegram.sendMessage(args.user.id, args.message) to app.bot.telegram.sendMessage(args.user.id, bl.decode(args.message)) it would support all of your custom tags e.g. Send message "Hello, today is {[date("dddd")]}
(Ofc it needs to be checked if there is a bc instance etcā¦ but thats it?)
Also do you plan to support typescript definitions?
Dont forget the await before the bl.decode (itās an async method).
And you need the setup steps:
Add the permission to your app.json "permissions": ["homey:app:net.i-dev.betterlogic"]
Import the BL module in the app.js:. const { BL } = require('../../lib/bll/bl');
Initialize the BLL in the app.js onInit: let bl = await new BL({homey:this.homey, silent:true]});
Create a file /lib/bll/bll-loader.js and place the next code into it:
Source
But beside those few steps, yeah itās just a matter of running it through the await bl.decode.
It will be run through the AppApi on the BLL app, so you donāt need to include anything.
If you would ever need the DateTime to convert a lott of dates to show in a app settings or something like that, the Datetime module is a beter use, because it runs within your own app and only syncās the BLL app settings.
But for the BLL decoding in text-arguments, its just a simple inlude into your app and than the simple bl.decode .
TypeScript definitions.
I am not very knowegable about that, but im not sure if you really mean TypeScripts or JSDoc info?
The BL.js i post on the topic is in Javascript and i am not (yet/currently) thinking about chaning that to TypeScript (because i donāt have the expirience yet).
But i am already working (and have a big part ready) on the jsdoc file, so you will get āintellisenseā.
Is that what you ment?
Or is it really about the BL.js needs to be in TypeScript (definitions)?
Addition:
You can combine TS and Javascript in the same app right?
If you have a TS App, you could still include, reference and use the BL.js, right?
(I am not a native TS or Javascript expert, so no idea yet. I ofc. will be looking into TS when i have some more time and a spare Homey to start rewriting apps, but thatās gonna take some time).
Oh itās used to provide typescript type information about an API thatās written in JavaScript.
Check it out here. Then you can include the d.ts files into your npm package.
If I donāt have these typescript definitions Iāll have to tell the compiler to ignore the lines, what is quite annoying.
Hmmm. Stuck.
My goal is to setup Siri on iOS Shortcuts to send a message to my Homey connected bot.
So I build a URL and finish the message through speech.
It seemed easier to send messages through URL from a bot than sending from my own username, so I made a new botā¦
Both bots were present in the group when I sent /start.
But since messages from the āhelper_botā show up in the group chat, but isnāt received by homey, even after sending /start from the helper_bot, I guess also bots has to āpress the button belowā?
Any idea how to help me? Or do you know how to send a message from my own account through URL?
So you have 1 Group with 2 bots + yourself?
And you want to read the messages from the other bot Inside the group?
Then you have to change to bot privacy mode.
'Enable' - your bot will only receive messages that either start with the '/' symbol or mention the bot by username.
'Disable' - your bot will receive all messages that people send to groups.
Send to the @botfather bot /setprivacy and put the homey bot to DISABLED
Then your Homey Telegram bot can read messages inside the group
If we call them Bot#1 and Bot#2. Bot#1 is connected to Homey. I set /setprivacy = disabled. Still not working. Which makes sense? If I send ātestā (no ā/ā) from my own account, Homey detects it. If I do the same from Bot#2, it doesnāt.
Bah. Bummer. Since you seem to be well versed in Telegram.
Do you mind helping me build a URL to send a message from myself?
Iāve tried reading TDLib and sendMessage, but got none the wiser. Maybe itās not possible?
I will be able to get my APP ID and ID HASH myself, but my googling has only resulted in Python code and left me none the wiserā¦
You want to send a message via Siri to your homey/telegram chat?
If thatās the case. sadly there is only a way to send it to a contact/phone number not a group/bot.
Sadly telegram doesnāt support iOS Shortcuts that well. Maybe ask in the #questions-help area if someone else found a way to send a payload to homey via Siri shortcuts. Telegram will currently not work.
Yeah basically update a variable through speech is what Iām aiming for.
I came THIS close. Message is sent through voice, is seen inside the correct chat, but not received by Homey
Iāll ask a question on the forum you linked me to. Thanks.
Great app though! Not your fault Must make do with opening Telegram until I find a way
Just a little teaser Still no homey, but I can develop some stuff without it.
I hope the shipping will start soon of the new homeys!
FYI: Telegram Notification will require v8.1.0 or higher with the next update. Also it will include some nice stuff for @JB2K. (Deletion Question/messages, Custom IDs and some little QoL improvements)
And it will support BLL from @Arie_J_Godschalk if everything goes according to plan.
Hi, newbie user to TN, I am wondering if questions/answers could be managed directly from the flows like BLL new handling of variables from flows? Or is it not possible?