whatsapp
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung | |||
| whatsapp [2016/12/10 09:57] – noone | whatsapp [2017/10/16 23:43] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====Whats-App-Nachrichten mit dem Pi versenden==== | ||
| + | Es gibt kaum einen Dienst, der so polarisiert wie WhatsApp. Für viele ist ein Leben ohne diesen Messenger kaum noch vorstellbar. Mit geringem Aufwand können Sie einen Raspberry Pi so konfigurieren, | ||
| + | sudo apt-get update | ||
| + | sudo apt-get upgrade | ||
| + | sudo rpi-update | ||
| + | Danach installieren Sie einige Software-Pakete. Das geht ebenfalls am schnellsten über die Konsole: | ||
| + | sudo apt-get install python-dateutil | ||
| + | sudo apt-get install python-dev | ||
| + | sudo apt-get install libevent-dev | ||
| + | sudo apt-get install ncurses-dev | ||
| + | Jetzt besorgen Sie sich mit wget das für das Versenden notwendige Script und entpacken es: | ||
| + | wget https:// | ||
| + | unzip master.zip | ||
| + | Führen Sie dann im betreffenden Ordner das Setup-Programm aus: | ||
| + | sudo python setup.py install | ||
| + | Optional können Sie eine Datei für die Konfiguration anlegen. Unbedingt notwendig ist das mit der aktuellen Version des Scrips alledings nicht. | ||
| + | |||
| + | Jetzt können Sie Ihren Registrierungscode von WhatsApp abholen. Wie Sie sicherlich wissen, kann immer nur eine Rufnummer mit dem Dienst verbunden werden. Somit gehen Nachrichten, | ||
| + | | ||
| + | Danach sollten Sie an das Telefon eine SMS mit dem Code erhalten. Diese müssen Sie dem Raspberry dan noch mitteilen: | ||
| + | | ||
| + | **ACHTUNG: | ||
| + | |||
| + | Damit Sie nun nicht jedes Mal die Rufnummer und das Passwort übergeben müssen, legen Sie am besten eine Konfigurationsdtei an. Dies kann mit jedem Editor erledigt werden. In unserem Fall soll die Datei " | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | Nachdem Sie diese Datei gespeichert haben, können Sie eine erste Testnachricht versenden: | ||
| + | | ||
| + | Wenn Sie regelmäßig auf der grafischen Oberfläche des Raspberry arbeiten, können Sie mit dem Web-Client von WhatsApp auch Nachrichten senden und empfangen. Dazu benötigen Sie einen Browser sowie Ihr Smartphone,, | ||
| + | sudo apt-get install iceweasel | ||
| + | den Browser Iceweasel (Firefox). Rufen Sie damit die Seite // | ||
| + | |||
| + | **Achtung: | ||
| + | |||
| + | LinuxWelt 1/2016 S. 62f | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ====How to Control a Raspberry Pi Using WhatsApp==== | ||
| + | |||
| + | We control a Raspberry Pi by using a tool called Yowsup. Yowsup is basically a python library which offers all the features of WhatsApp on the Raspberry Pi. It functions exactly the same on a Raspberry Pi as a Whatsapp client works on a smartphone. | ||
| + | |||
| + | Now let’s go through the steps for controlling Raspberry Pi via Whatsapp. | ||
| + | |||
| + | ===Step 1=== | ||
| + | The first step is to install the Yowsup python library on Raspberry Pi. But before doing that, it is recommended to upgrade all the previous packages installed in Raspberry Pi. | ||
| + | |||
| + | To update the previously installed packages, you need to run the following command. | ||
| + | sudo apt-get update | ||
| + | |||
| + | ===Step 2=== | ||
| + | Once all the packages are updated, you need to update the firmware. Command for the same is given below. | ||
| + | sudo rpi-update | ||
| + | |||
| + | ===Step 3=== | ||
| + | After upgrading previously installed packages, it’s time to install all the necessary new packages on Raspberry Pi, which are required to install to Yowsup. | ||
| + | |||
| + | sudo apt-get install python-dateutil | ||
| + | sudo apt-get install python-setuptools | ||
| + | sudo apt-get install python-dev | ||
| + | sudo apt-get install libevent-dev | ||
| + | sudo apt-get install ncurses-dev | ||
| + | |||
| + | ===Step 4=== | ||
| + | Now its time to install the downloaded Yowsup library. For this, run the following command to download the library. | ||
| + | git clone git:// | ||
| + | |||
| + | ===Step 5=== | ||
| + | Once the Yowsup library downloaded, you need to install it. The following command will help you get into the Yowsup folder and install the library successfully. | ||
| + | cd yowsup | ||
| + | sudo python setup.py install | ||
| + | |||
| + | ===Step 6=== | ||
| + | Once the installation of Yowsup library is done successfully, | ||
| + | |||
| + | If you don’t know your cc, mcc and mnc, use the following command to know about it. | ||
| + | | ||
| + | |||
| + | Write the complete number replacing the xxx with the original digits. 91 is the country code which should be replaced with your country code. Similarly, other details can be different depending upon your details. | ||
| + | |||
| + | ===Step 7=== | ||
| + | As sooner you run that command, all the requested data will show up as the result and you will get the code on your mobile. Now you need to enter that code to register the Whatsapp using the following command. | ||
| + | | ||
| + | |||
| + | Replace xxx-xxx with the code you received on your mobile. With that, registration would be completed. But remember, don’t use the same number you use for your daily Whatsapp messaging. One Whatsapp number can be used only in one device. | ||
| + | |||
| + | ===Step 8=== | ||
| + | Okay, it’s now time to use the Whatsapp. The process is simple. All you need to do is to enter your phone number and password. You need to save the config file inside the Yowsup folder using the following command. | ||
| + | sudo nano / | ||
| + | |||
| + | ==Step 9=== | ||
| + | Once done, quickly copy the following command and paste it into the config file. | ||
| + | ## Actual config starts below ## | ||
| + | cc=49 #if not specified it will be autodetected | ||
| + | | ||
| + | | ||
| + | |||
| + | ===Step 10=== | ||
| + | Now navigate to the Yowsup folder by the following command | ||
| + | cd / | ||
| + | |||
| + | and start yowsup-cli demos. Command for the same is given below. | ||
| + | | ||
| + | |||
| + | As sooner you do this, you will be encountered with Yowsup prompt. Now first use ‘/L’ command for login. If you are confused about the commands, use “/help” command to see all the available commands. | ||
| + | |||
| + | Okay, after using the /L command, enter the login credential which you saved in the config file. | ||
| + | |||
| + | If you want to send a message to the desired number, use the following command. | ||
| + | / | ||
| + | |||
| + | The message sent will be displayed on the Raspberry Pi. So that’s how to control a Raspberry Pi using WhatsApp. | ||
| + | |||
| + | At a glance, this guide might seem confusing, but once you will go through all the steps carefully, the things will appear really easy! If you encounter any problem while following the steps, feel free to contact us via the comment box below. | ||
| + | |||
| + | [[http:// | ||
