Whatsapp yowsub und Stretch Distribution

Begonnen von MikeA, 10 Mai 2018, 14:38:31

Vorheriges Thema - Nächstes Thema

MikeA

Hallo,
ich hatte vor diverse Meldungen über WhatsApp auf mein Handy zu bringen und wollte das über den WhatsApp Dienst machen.
Jedoch stellt sich die Implementierung schwieriger dar als ursprünglich gedacht.
Da ich mein FHEM neu aufgesetzt habe, hatte ich dies auch mit der aktuellen Stretch Distri gemacht.
Nun habe ich das Problem dass die ganzen Wiki's und Anleitungen nicht mehr funktionieren da verschiedene Module und Pakete nicht mehr identisch mit einem Wheezy & Co. sind.
An dieser Stelle bin ich mit meinem Latain auch am Ende da ich nicht so tief in der Materie stecke um die Installationsschritte auf die Stretch-Distri anzupassen, bzw nicht weiß was zu tun ist.
Mein Frage an die Experten hier:
Gibt es eine funktionierende Anleitung / Wiki für die Stretch-Distribution mit der ich das hinbekomme ?
Oder sollte ich doch lieber eine Wheezy oder Jessie Distri nehmen ?
Danke für eure Hilfe
LG
Mike
Raspi 4 Mod. B auf Buster-lite vom 13.02.2020

Wernieman

Bei Strech sollte doch eigentlich ein passender Client dabei sein?
https://packages.debian.org/stretch/python-yowsup

Ansonsten siehe Original:
https://github.com/tgalal/yowsup
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

MikeA

#2
Hi,
das weiß ich nicht ob alles schon in der Distri enthalten ist.
Das Modul im FHEM gibt es ja wohl.
Aber die ganzen Schritte zum Einrichten auf der CLI kann ich nicht durchführen weil eben wie yowsup-cli etc nicht verfügbar sind.

Dies wollte ich wie im Wiki beschrieben mit den Installationen korrigieren was dann aber wie oben beschrieben nicht funktionierte.
Mache ich was falsch ?

LG
Mike
Raspi 4 Mod. B auf Buster-lite vom 13.02.2020

JoWiemann

Poste doch bitte einmal, was Du bisher gemacht hast. Und zwar genauso, wie Du es gemacht hast und den Fehlern die gemeldet werden.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

MikeA

#4
Hallo Jörg,
die Distri ist die 2018-03-13-raspbian-stretch-lite mit der letzten FHEM Version.
Python Version ist die 2.7.13
Folgende Schritte habe ich durchgeführt:

sudo apt-get update
sudo apt-get upgrade
update
shutdown restart

Bisher ohne Fehlermedungen.
Danach laut Wiki
sudo apt-get install python-soappy python-dateutil python-pip python-dev build-essential

hier bereits kommt als Meldung dass die Module
python-soappy
python-dateutil
python-dev
nicht gefunden werden können.

In der Annahme dass die Funktionen jedoch verfügbar sind habe ich versucht den Rest durchzuziehen.
sudo pip install --upgrade pip
ging nicht. Dann versucht wie von Dir in einem anderen Thread empfohlen
sudo python -m pip install --upgrade --force setuptools
sudo python -m pip install --upgrade --force pip

Damit ging es dann auch ohne Fehlermeldung..
sudo pip install python-axolotl

Hier kommt eine Fehlermeldung mit einem Compile-Error
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-YoQ34E/cffi/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-Yo8sdD/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-YoQ34E/cffi


Dann habe ich es manuell wie von Dir beschrieben versucht mit
cd /opt
sudo wget https://github.com/tgalal/python-axolotl/archive/master.zip
sudo unzip master.zip
cd python-axolotl-master
sudo python setup.py install


Dies ist dann aber mit einem Compilierungsfehler abgebrochen

curve25519module.c:3:20: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
#include <Python.h>
                    ^
compilation terminated.
error: Setup script exited with error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1


Hier geht es dann nicht weiter. Wenn ich auf der Console eingebe:
python yowsup-cli registration -c /opt/yowsup-config/yowsup.config -r voice
bekomme ich die Meldung
Traceback (most recent call last):
  File "yowsup-cli", line 6, in <module>
    from yowsup.env import YowsupEnv
  File "/opt/yowsup-master/yowsup/env/__init__.py", line 1, in <module>
    from .env import YowsupEnv
  File "/opt/yowsup-master/yowsup/env/env.py", line 15, in <module>
    class YowsupEnv(with_metaclass(YowsupEnvType, object)):
  File "/usr/lib/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Ich vermute dass noch einiges in der Installation fehlt weil im Vorfeld, wie beschrieben, Installationen fehlgeschlagen sind.
Aber kenne ich mich da nicht ausreichend aus um das beurteilen zu können.

Aber vielleicht hast du da noch eine Idee..

LG

Mike
Raspi 4 Mod. B auf Buster-lite vom 13.02.2020

Wernieman

Irgendentwas stimmt bei Dir nicht.

Habe hier ein Stretch:

root@raspi1:~# cat /etc/debian_version
9.4


und ein Versucht der Installation der ersten Packete (simulate):

root@raspi1:~# apt-get -s install python-soappy python-dateutil python-pip python-dev build-essential
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
build-essential ist schon die neueste Version (12.3).
The following additional packages will be installed:
  libexpat1-dev libpython-all-dev libpython-dev libpython2.7 libpython2.7-dev
  python-all python-all-dev python-crypto python-dbus python-defusedxml
  python-gi python-keyring python-keyrings.alt python-pip-whl
  python-secretstorage python-wheel python-wstools python-xdg python2.7-dev
Vorgeschlagene Pakete:
  python-crypto-dbg python-crypto-doc python-dbus-dbg python-dbus-doc
  python-gi-cairo gnome-keyring libkf5wallet-bin gir1.2-gnomekeyring-1.0
  python-fs python-gdata python-kde4 python-keyczar python-secretstorage-doc
Die folgenden NEUEN Pakete werden installiert:
  libexpat1-dev libpython-all-dev libpython-dev libpython2.7 libpython2.7-dev
  python-all python-all-dev python-crypto python-dateutil python-dbus
  python-defusedxml python-dev python-gi python-keyring python-keyrings.alt
  python-pip python-pip-whl python-secretstorage python-soappy python-wheel
  python-wstools python-xdg python2.7-dev
0 aktualisiert, 23 neu installiert, 0 zu entfernen und 1 nicht aktualisiert.
Inst libexpat1-dev (2.2.0-2+deb9u1 Raspbian:stable [armhf])
Inst libpython2.7 (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Inst libpython2.7-dev (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Inst libpython-dev (2.7.13-2 Raspbian:stable [armhf])
Inst libpython-all-dev (2.7.13-2 Raspbian:stable [armhf])
Inst python-all (2.7.13-2 Raspbian:stable [armhf])
Inst python2.7-dev (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Inst python-dev (2.7.13-2 Raspbian:stable [armhf])
Inst python-all-dev (2.7.13-2 Raspbian:stable [armhf])
Inst python-crypto (2.6.1-7 Raspbian:stable [armhf])
Inst python-dateutil (2.5.3-2 Raspbian:stable [all])
Inst python-dbus (1.2.4-1 Raspbian:stable [armhf])
Inst python-defusedxml (0.4.1-2 Raspbian:stable [all])
Inst python-gi (3.22.0-2 Raspbian:stable [armhf])
Inst python-secretstorage (2.3.1-2 Raspbian:stable [all])
Inst python-keyring (10.1-1 Raspbian:stable [all])
Inst python-keyrings.alt (1.3-1 Raspbian:stable [all])
Inst python-pip-whl (9.0.1-2+rpt2 Raspberry Pi Foundation:stable [all])
Inst python-pip (9.0.1-2+rpt2 Raspberry Pi Foundation:stable [all])
Inst python-wstools (0.4.3-3 Raspbian:stable [all])
Inst python-soappy (0.12.22-1 Raspbian:stable [all])
Inst python-wheel (0.29.0-2 Raspbian:stable [all])
Inst python-xdg (0.25-4 Raspbian:stable [all])
Conf libexpat1-dev (2.2.0-2+deb9u1 Raspbian:stable [armhf])
Conf libpython2.7 (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Conf libpython2.7-dev (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Conf libpython-dev (2.7.13-2 Raspbian:stable [armhf])
Conf libpython-all-dev (2.7.13-2 Raspbian:stable [armhf])
Conf python-all (2.7.13-2 Raspbian:stable [armhf])
Conf python2.7-dev (2.7.13-2+deb9u2 Raspbian:stable [armhf])
Conf python-dev (2.7.13-2 Raspbian:stable [armhf])
Conf python-all-dev (2.7.13-2 Raspbian:stable [armhf])
Conf python-crypto (2.6.1-7 Raspbian:stable [armhf])
Conf python-dateutil (2.5.3-2 Raspbian:stable [all])
Conf python-dbus (1.2.4-1 Raspbian:stable [armhf])
Conf python-defusedxml (0.4.1-2 Raspbian:stable [all])
Conf python-gi (3.22.0-2 Raspbian:stable [armhf])
Conf python-secretstorage (2.3.1-2 Raspbian:stable [all])
Conf python-keyring (10.1-1 Raspbian:stable [all])
Conf python-keyrings.alt (1.3-1 Raspbian:stable [all])
Conf python-pip-whl (9.0.1-2+rpt2 Raspberry Pi Foundation:stable [all])
Conf python-pip (9.0.1-2+rpt2 Raspberry Pi Foundation:stable [all])
Conf python-wstools (0.4.3-3 Raspbian:stable [all])
Conf python-soappy (0.12.22-1 Raspbian:stable [all])
Conf python-wheel (0.29.0-2 Raspbian:stable [all])
Conf python-xdg (0.25-4 Raspbian:stable [all])



d.h. Deine erste Fehlermeldung würde ich nicht kriegen.

Kurzgefasst:
- Was für eine Distri hast Du drauf (Wirklich Debian Stretch?)
- Bitte mal die Versionsausgabe (s.o. cat /etc/debian_version)
- Was für ein Python hast Du? (python --version)

Ansonsten mach mal "clean" und fange bitte von Vorne an ..... und bitt erstmal OHNE pip :o(
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Helmi55

Hallo
Weiß nicht ob das passt. Ich hatte mit einem neuen Strech System und der I1wire Installation.
Nach einem sudo apt-get update (empfohlen vom Forum) könnte ich die Installation starten und es wurde alles gefunden
Gruß Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/

MikeA

#7
Hallo an alle Helfer,

sorry dass ich mich erst heute melde. War gestern etwas out-of-order nach dem Donnerstag.
Jetzt bin ich wieder da :)

Zu den Fragen:
ja es ist die aktuelle Stretch die ich in der Lite-Version installiert haben.
Hier der Beweis:
pi@raspberrypi:~ $ cat /etc/debian_version
9.4
pi@raspberrypi:~ $


Die Python ist die

pi@raspberrypi:~ $ sudo python --version
Python 2.7.13
pi@raspberrypi:~ $
pi@raspberrypi:~ $
pi@raspberrypi:~ $ sudo python3 --version
Python 3.5.3


Wegen dem clean ??
Das ist eine neue Installation ohne Altlasten. Lediglich meine alte FHEM Config benutzt.
Ich werde es aber später dann noch mal mit einem "clean" versuchen. Vielleicht haben ja doch einige Quellen nicht gestimmt, obwohl es eine neue Installation ist.

@Helmut
apt-get update habe ich ganz zu Anfang natürlich gemacht um die letzten Versionen zu nutzen


Was könnte ich noch machen ? Doch noch mal neu aufsetzen ? :'(

LG

Mike
Raspi 4 Mod. B auf Buster-lite vom 13.02.2020

Helmi55

Servus
na bei mir hat es geholfen, nach dem upgrade nochmals ein apt-get update durchzuführen.

Wusste ich auch nicht, bekam den Tip hier im Forum

Gruß
Helmut
System1 fhem 6.1 auf RPi 4B mit 4GB, HMUSBConfig, DS9490R-1Wire, Busware USB 868, Pool-Solarsteuerung mit FHEM. System2 fhem 6.1 auf RPi 4B mit 4GB (Bullseye) mit Busware USB 868 und 433 und HMUARTLGW für Haussteuerung

https://www.flickr.com/photos/canonhelmi/