Open witnessmenow opened 8 years ago
Dear Brian, I see you did a huge re-work of my original project, Great!
It's the true that I did not take care of any Json available library and managed the decoding of incoming messages in a very "trivial" way. This is not because of a lack of performances by ESP8266; as you have already tested, I understand that the micorcontroller works fine also with the use of Json library. Simply, it was my lack of specific esperience and time to investigate :)
Now, I'm very happy of your improvements, and for sure I will upgrade the repo with your pull request. Hopefully in the next days I will work on it.
many thanks and best regards.
Ginacarlo
2016-06-07 2:58 GMT+02:00 Brian Lough notifications@github.com:
…elegram code
I wanted to make a Telegram library for ESP8266 chips that used JsonParser to make handling the responses from Telegram a little easier. I based the code off this Repo here is a pull request with my changes. I think the way you were parsing the messages may suit ESP8266 limited memory better so I completely understand if you would prefer not to incorporate them!
I also understand that normally pull requests are much easier when they are small changes, while this is a big chunk of changes all at once. I am very new to C++ and Arduino too so there may be issues.
I have tested these changes and the examples on my Wemos D1 mini and they seem to work well.
Main changes of the pull request
- Move to JsonParser (Users will now need to install the arduino json library from the library manager)
- Changed the way messages are returned
- Limited the number of messages that are received back from telegram (Looks like my Wemos mini when using the Json parser can only allocate enough memory to handle 1 message)
- Constructor only takes botToken
- implemented "getMe" api call to get name and username of bot (example of usage in echo bot example)
- Created a derived class that separates network code from Telegram code - This makes it easier to add new architecture types without needing the change the telegram code to suit. other libraries that support different architecture types such as this one https://github.com/CasaJasmina/TelegramBot-Library. could potentially be merged
Thanks!
You can view, comment on, or merge this pull request online at:
https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6 Commit Summary
- Re-write to use JsonParser and to extract the Network code from the Telegram code
File Changes
- M examples/EchoBot/EchoBot.ino https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6/files#diff-0 (29)
- M examples/FlashledBot/FlashledBot.ino https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6/files#diff-1 (71)
- M src/ESP8266TelegramBOT.cpp https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6/files#diff-2 (387)
- M src/ESP8266TelegramBOT.h https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6/files#diff-3 (42)
Patch Links:
- https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6.patch
- https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6, or mute the thread https://github.com/notifications/unsubscribe/ALU0t2hb3jYyHNSh7o1cwYk7lC6kU-5Wks5qJMJMgaJpZM4IvdOq .
Giancarlo Bacchio mob. +39 3313136813 skype: giancarlo_bacchio
Hi Ginacarlo,
Thanks a lot. I added another change there to split the functionality into different files. This will be needed if there was multiple architectures supported.
If you need me to explain anything or improve/change anything please just let me know.
Thanks, Brian
Hi! I think that's exacly what i was searching and trying to do. The custom keyboard! @Gianbacchio can you put this changes as a new version of the library?
(Sorry, i'm new on git)
Hey @carlosjosetam
I started maintaining a new library as I started to make changes that were very different from this library
The library I made is here: Universal Arduino Telegram Bot
That library supports keyboards. I dont have it very well documented yet but there are examples in that project that shows how to use it (although a friend mentioned last night that he needed to make some changes to them to run compile)
Here is a full example project I have using it, I would use this as reference as its a bit more up to date.
I'll try update the examples now and push them up. Feel free to message me on telegram if you need any help with the library (@witnessmenow)
Hello Carlos, Hi Brian :)
For sure, the most updated and reliable library today available for Telegram on ESP is the one from Brian. My work is now more than 1 year old and, unfortunately, I cannot maintain it in the next future.
Brian did a huge rework of my routines, I will endorse his pull request.
best regards Giancarlo
2016-07-13 23:32 GMT+02:00 Brian Lough notifications@github.com:
Hey @carlosjosetam https://github.com/carlosjosetam
I started maintaining a new library as I started to make changes that were very ge workdifferent from this library
The library I made is here: Universal Arduino Telegram Bot https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot
That library supports keyboards. I dont have it very well documented yet but there are examples in that project that shows how to use it (although a friend mentioned last night that he needed to make some changes to them to run them)
Here is a full example project I have using it https://github.com/witnessmenow/Immersion-Bot, I would use this as reference as its a bit more up to date.
I'll try update the examples now and push them up. Feel free to message me on telegram if you need any help with the library (@witnessmenow https://github.com/witnessmenow)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Gianbacchio/ESP8266-TelegramBot/pull/6#issuecomment-232493335, or mute the thread https://github.com/notifications/unsubscribe/ALU0t3N5IfIx4_q4DqdizCWCMmpgDvZfks5qVVl4gaJpZM4IvdOq .
Giancarlo Bacchio mob. +39 3313136813 skype: giancarlo_bacchio
…elegram code
I wanted to make a Telegram library for ESP8266 chips that used JsonParser to make handling the responses from Telegram a little easier. I based the code off this Repo here is a pull request with my changes. I think the way you were parsing the messages may suit ESP8266 limited memory better so I completely understand if you would prefer not to incorporate them!
I also understand that normally pull requests are much easier when they are small changes, while this is a big chunk of changes all at once. I am very new to C++ and Arduino too so there may be issues.
I have tested these changes and the examples on my Wemos D1 mini and they seem to work well.
Main changes of the pull request
Thanks!