J
J
JuniorDev2018-03-13 02:39:38
Android
JuniorDev, 2018-03-13 02:39:38

And again this WhatsApp... Launch in any way or the best way to launch a bot for personal use?

Hello.
I have a simple task: Raise an account in WhatsApp to transfer data from weather station sensors on arduino.
The task is simple, which cannot be said about the solution. When I took it, I thought that everything would be much easier.
Since after sleepless nights, with half a hundred articles on this topic, reading and analyzing dozens of comments, I no longer have the task of just making this fucking bot, the task is much more noble, creating a bot to bend the bureaucracy of this office, for a dismissive and boorish attitude towards third-party Open Source developers.
The task is worth it, so it must be solved. So far I have several options:
1. Installing the application on the Android virtual machine + parsing WhatsApp Web and returning it in Json format (many paid services for creating bots on WA work in this way). You can do without a "virtual", but is it possible to run graphical applications through the console "in the void" without the necessary open gl libraries and others?
2. Reversing the application. The idea is not bad, but firstly, I don’t think that they don’t have message encryption (it does), secondly, the xmpp protocol, and thirdly, every new release can ruin all my work.
3. Running an application in a container without a virtual machine on Linux (for example, Ubuntu). Obtaining a token and working through the Web.
4. Your options...
In this regard, the following questions arose:
1. The resources of the machine are limited (1GB of RAM), which raises the question, is it possible to do without shells? In other words, you need to run a windowed application "in the void" and let it work for itself. What for? This is the requirement of WhatsApp.
2. If you install on a "virtual machine" + patched for your API AutoResponder (Android application for WA automation) and all this will be running on a server running Ubuntu 16.04, then where can I get a minimal Android image and a "non-gluttonous" virtual machine?
3. There is an option to do everything through OCR + autoclicker and autotyping through the ADB console, but this is a complete paragraph . If so, are there ready-made solutions for reading text from a certain area of ​​the screen and performing actions on a trigger?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Armenian Radio, 2018-03-13
@gbg

Hello! This is Linus Torvalds and I pronounce "WhatsApp" as "Telegram"
Seriously, what's the point of collective farming when there's a great quality solution specifically designed for it.
The minimum android for Linux is called Shashlik
. A shell is not needed for its operation, an X server is needed, xvfb can act as it.

F
float64, 2018-11-29
@float64

I have good news for you - you don't have to suffer like this :)
In your case, you can try to get by with a bunch of node red (to connect to sensors) + riot.im (to connect to whatsapp via a connector)
Node red is installed on arduino: https:// nodered.org/docs/hardware/arduino
There is a ready-made connector for whatsapp, no need for perversions with viewing the screen area: https://github.com/tulir/mautrix-whatsapp
Well, a bonus if you want to store the collected data from sensors not to trust their uncles in the cloud, I can recommend nextcloud (it even runs on raspberry pi): https://ownyourbits.com/nextcloudpi/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question