[32_yowsup.pm] Whatsapp versenden (Mit Handy- oder Festnetznummer)

Begonnen von AHA1805, 01 Oktober 2014, 21:58:55

Vorheriges Thema - Nächstes Thema

nils_

viele Wege in FHEM es gibt!

heinzfo

#1576
Zitat von: nils_ am 07 Februar 2018, 09:30:59
festnetznummer werden schonmal von Whatsapp geblockt!
Ich verwende seit 2 Jahren zwei Festnetznummern ohne Einschränkung.

Wenn die Nummer geblockt ist muss man leider eine neue nehmen.

Evtl. hilft dieser Thread was das registrieren angeht weiter, letzer Eintrag ganz unten.
Ich habe das nicht nachgestellt, es scheint aber nun einen anderen Vorgang beim registrieren zu geben vs. fhem wiki.

https://github.com/tgalal/yowsup/issues/2319

Grüße

nils_

Zitat von: heinzfo am 07 Februar 2018, 09:46:49
Ich verwende seit 2 Jahren zwei Festnetznummern ohne Einschränkung.
ich auch.
aber ich habe auch schon mehrfach darüber gelesen das whatsapp festnetznummer blockiert!
viele Wege in FHEM es gibt!


heinzfo

#1579
[gelöst siehe unten] ==========

Guten Morgen

Update: Yowsup version 2.5.2 auf meinem Windows PC läuft problemlos, aber yowsup 2.5.7 auf meinem RPi3 nicht.

Wer hat auch dieses Problem mit yowsup?

Seit gestern ca. 22 Uhr, und heute immer noch!

Nach dem senden einer Nachricht aus FHEM erfolgt ein reconnect, die Nachricht kommt nicht am Smartphone an!
Yowsup/Whatsapp bleibt bis zum senden der nächsten Nachricht online.

Log mit yowsup verbose 5:

2018.02.12 08:22:00 3: WhatsApp: sending /message send 491..... 'test2'
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/opt/yowsup-master/yowsup/demos/cli/cli.py", line 154, in startInputThread
    wait = self.execCmd(cmd)
  File "/opt/yowsup-master/yowsup/demos/cli/cli.py", line 138, in execCmd
    return self.doExecCmd(lambda :targetFn(*args))
  File "/opt/yowsup-master/yowsup/demos/cli/cli.py", line 141, in doExecCmd
    return fn()
  File "/opt/yowsup-master/yowsup/demos/cli/cli.py", line 138, in <lambda>
    return self.doExecCmd(lambda :targetFn(*args))
  File "/opt/yowsup-master/yowsup/demos/cli/layer.py", line 372, in message_send
    self.toLower(outgoingMessage)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 84, in toLower
    self.__lower.send(data)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 198, in send
    s.send(data)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 136, in send
    send(entity)
  File "/opt/yowsup-master/yowsup/layers/protocol_messages/layer.py", line 15, in sendMessageEntity
    self.entityToLower(entity)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 140, in entityToLower
    self.toLower(entity.toProtocolTreeNode())
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 84, in toLower
    self.__lower.send(data)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 198, in send
    s.send(data)
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 48, in send
    self.processPlaintextNodeAndSend(node)
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 95, in processPlaintextNodeAndSend
    self.sendToContact(node)
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 155, in sendToContact
    ciphertext = cipher.encrypt(messageData)
  File "build/bdist.linux-armv6l/egg/axolotl/sessioncipher.py", line 69, in encrypt
    self.sessionStore.storeSession(self.recipientId, self.deviceId, sessionRecord)
  File "/opt/yowsup-master/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 55, in storeSession
    self.sessionStore.storeSession(recepientId, deviceId, sessionRecord)
  File "/opt/yowsup-master/yowsup/layers/axolotl/store/sqlite/litesessionstore.py", line 35, in storeSession
    self.deleteSession(recipientId, deviceId)
  File "/opt/yowsup-master/yowsup/layers/axolotl/store/sqlite/litesessionstore.py", line 53, in deleteSession
    self.dbConn.cursor().execute(q, (recipientId, deviceId))
OperationalError: database is locked

2018.02.12 08:24:07 3: WhatsApp: sending /disconnect
2018.02.12 08:24:07 3: WhatsApp: Disconnected
2018.02.12 08:24:07 2: WhatsApp: setting $HOME to /opt/fhem
2018.02.12 08:24:07 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/yowsup-config/yowsup.config --yowsup
2018.02.12 08:24:09 4: WhatsApp: parse: yowsup-cli  v2.0.15
yowsup      v2.5.7

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate



2018.02.12 08:24:09 4: WhatsApp: parse: Yowsup Cli client
==================
Type /help for available commands


2018.02.12 08:24:09 4: WhatsApp: parse: [offline]:
2018.02.12 08:24:09 3: WhatsApp: sending /L
2018.02.12 08:24:09 3: WhatsApp: sending /presence available
2018.02.12 08:24:10 4: WhatsApp: parse: Auth: Logged in!



Beste Grüße
Heinz

==========

Ich habe axolotl neu installiert, laut wiki, dann kam dieser Fehler:

Traceback (most recent call last):
File "/opt/yowsup-master/yowsup-cli", line 368, in <module>
  if not parser.process():
File "/opt/yowsup-master/yowsup-cli", line 272, in process
  self.startSendClient()
File "/opt/yowsup-master/yowsup-cli", line 323, in startSendClient
  not self.args["unmoxie"])
File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 20, in __init__
  .pushDefaultLayers(encryptionEnabled)\
File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 52, in pushDefaultLayers
  defaultLayers = YowStackBuilder.getDefaultLayers(axolotl)
File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 74, in getDefaultLayers
  from yowsup.layers.axolotl import AxolotlSendLayer, AxolotlControlLayer, AxolotlReceivelayer
File "/opt/yowsup-master/yowsup/layers/axolotl/__init__.py", line 1, in <module>
  from .layer_send import AxolotlSendLayer
File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 8, in <module>
  from axolotl.axolotladdress import AxolotlAddress
ImportError: No module named axolotladdress


Man muss axolotl nochmals deinstallieren und neu installieren, damit die Abhängigkeiten berücksichtigt werden.
https://github.com/tgalal/yowsup/issues/500

sudo pip uninstall python-axolotl
sudo pip install python-axolotl


Jetzt läuft es wieder wie geschmiert ;-)

JoWiemann

Hallo,

ab und zu habe ich einen UTF-8 Fehler in yowsup bekommen, was dann zu einem reconnnect geführt hat. Hierzu gibt es einen issue, der aber noch nicht den Weg ins Repository gefunden hat. Anbei die von mir angepasste: yowsup-master/yowsup/demos/cli/layer.py

Damit ist für mich der Fehler behoben.

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

JoWiemann

WetterOnline versendet neuerdings an WhatsApp, Telegram und Co Wetterinformation. Soweit habe ich das auch für Fhem und WhatsApp eingerichtet bekommen. Ich erhalte auch die das Wetter, allerdings wird das Reading message nur mit [Media Type:image, Size:60548, URL:https://mmg-fna.whatsapp.net/d/f/As4it3sfZEGWc6uT_dowUc5d5Lta130tMelYpH9HrMrh.enc] gefüllt. Der auch versendete Text geht irgendwie verloren. Vielleicht hat ja jemand eine Idee.

Grüße Jörg

PS: Hierfür ist allerdings der im vorhergehende Post beschrieben Patch unbedingt notwendig.
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

en-trust

sudo pip install python-axolotl


Downloading/unpacking protobuf>=3.0.0.b2 (from python-axolotl)
  Downloading protobuf-3.5.2.post1-py2.py3-none-any.whl (388kB): 388kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
    )[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log


im pip.log steht dann...

Downloading/unpacking python-axolotl
  Getting page https://pypi.python.org/simple/python-axolotl/
  URLs to search for versions for python-axolotl:
  * https://pypi.python.org/simple/python-axolotl/
  Analyzing links from page https://pypi.python.org/simple/python-axolotl/
    Found link https://pypi.python.org/packages/93/e9/539c05a0e1df93084789b029fc8f4a31ac652317f78b80d8ba79b8316cad/python-axolotl-0.1.1.tar.gz#md5=5824fdfd071068b1f6222ce697120ae1 (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.1
    Skipping link https://pypi.python.org/packages/f5/45/599d96363d6f2342f59ff63a1701b2c5b6a593c22d87f4f00b958bcd8644/python_axolotl-0.1.1-py2.7.egg#md5=f2c0cdd55ab546ad41f19147170548fe (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/71/9f/1df058fc330728fe9221097c842bfa67e2da44a44a84716d2e9eeba6067e/python-axolotl-0.1.2.tar.gz#md5=ba208e0672829a9206d08be0d563a5fb (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.2
    Skipping link https://pypi.python.org/packages/6e/05/cee4073964e84f327e2ca8c0507a115d80bb0e33d41c3e10de7fcd5762c9/python_axolotl-0.1.2-py2.7.egg#md5=58b4cd16666e65b8402f7b412be9bfb2 (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/45/01/9d6c996412fb4780482cd498a5eded1be79dd56a8540f7667a23c2ac03cd/python-axolotl-0.1.3.tar.gz#md5=6f7f3a389a5c493cb97504dcf10bc33e (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.3
    Skipping link https://pypi.python.org/packages/4f/8e/65f4bfd84f5152e9a50f2da78fd0658e869378e5718b3303e156fbef8e8c/python_axolotl-0.1.3-py2.7.egg#md5=3231dcac576eceb997a2d7006cfec4e0 (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/1f/0e/f0560ae39caa4d093fb96fe32c2de55f72ab7b43e96f3838304a9cc8fbb4/python-axolotl-0.1.34.tar.gz#md5=3e3ddb8a441f8910780f46e11829d077 (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.34
    Skipping link https://pypi.python.org/packages/06/15/0effd9410e99deacbbccfef2cda14c3e58fdbe6d5e469156f59a25ea571d/python_axolotl-0.1.34-py2.7.egg#md5=7e75f50eb427413ca4bbb39c53a4d141 (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/d5/6b/cc0256a10d11f8a8868e9c8673a0edcdba438c1e92c4b66e52c6b575ca6a/python-axolotl-0.1.35.tar.gz#md5=34c54a41fe2271caade486fc92392541 (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.35
    Skipping link https://pypi.python.org/packages/41/21/997e3f9f26a7f546418c0197a2b74ed81cff5ac848d5316e4e3cb31b162f/python_axolotl-0.1.35-py2.7.egg#md5=c4a95b28fe4a61fc9e9ed57b9c5eeea3 (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg
    Found link https://pypi.python.org/packages/7f/9d/410ce5c2322180cae7025e52e2f91f585d2be71f30ebbcfd605d2c9a1cd5/python-axolotl-0.1.39.tar.gz#md5=136d37cf7aceb4b3e01fbb40ac592f3c (from https://pypi.python.org/simple/python-axolotl/), version: 0.1.39
    Skipping link https://pypi.python.org/packages/53/42/164b69e7874c322ff1ea3396218a9de97ea533ab8b54cf2819882e995df8/python_axolotl-0.1.39-py3.6.egg#md5=376975ce77fd45c29992a9cb1d6915d8 (from https://pypi.python.org/simple/python-axolotl/); unknown archive format: .egg


en-trust

Ich versuche mich zu registrieren...

python yowsup-cli registration -c /opt/yowsup-config/yowsup.config -r voice


erhalte aber old Version.

yowsup-cli  v2.0.15
yowsup      v2.5.7

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


INFO:yowsup.common.http.warequest:{"login":"49xxxx","status":"fail","reason":"old_version"}

status: fail
reason: old_version
login: 49xxxx

JoWiemann

Hast Du die hier beschriebene Lösung schon versucht: https://github.com/tgalal/yowsup/issues/2350?

Bitte auch beachten: update yowsup, register using android env, login using s40 env

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

en-trust

#1585
was meinst du mit register using android env, login using s40 env?

Ich habe nun von dem Link mal das versucht...

ZitatI was having the same issue, the solution is edit env.py as follow

DEFAULT="android"

env_android.py:

_MD5_CLASSES = "OyTf9XK7xoJkKIxLgY6/Lw=="
_VERSION = "2.17.426"

After registration to be able to use yowsup-cli you have to modify again env.py to use s40

Zitatpython yowsup-cli registration -c /opt/yowsup-config/yowsup.config -r voice
yowsup-cli  v2.0.15
yowsup      v2.5.7

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


INFO:yowsup.common.http.warequest:{"login":"49xxx","status":"sent","length":6,"method":"voice","retry_after":64,"sms_wait":64,"voice_wait":64}

status: sent
retry_after: 64
length: 6
login: 49xxx
method: voice

Dann rief mich jemand aus 0044 an und nannte mir den Code. Danach mit diesem Registriert. Was mich etwas stutzig macht, ist der Preis von 0,99.

status: ok
kind: free
pw: xxxx
price: $0.99
price_expiration: 1522863312
currency: USD
cost: 0.99
expiration: 4444444444.0
login: 49xxx
type: new


Bezahl ich jetzt pro whatsapp 0.99 cent ?

JoWiemann

#1586
Zitat von: en-trust am 28 März 2018, 19:32:49
was meinst du mit register using android env, login using s40 env?

Ich meine das nicht, sondern es steht so bei tgalal. Also nach dem Registrieren mit Android env, wieder auf s40 env umstellen.

Zitat von: en-trust am 28 März 2018, 19:32:49
Bezahl ich jetzt pro whatsapp 0.99 cent ?

Nein, WhatsApp behält sich vor in Zukunft eine Jahresgebühr von 0,99 us Cent einzuziehen.

Grüße Jörg

PS: und lies doch bitte die angegebenen Quellen sorgfältig.
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

en-trust

#1587
Also scheint die Registrierung nun endlich fuunktioniert zu haben. Jetzt wollte ich einen Test fahren...

sudo python yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4917xxxx "Das ist ein Test"


bekomme aber...

Traceback (most recent call last):
  File "yowsup-cli", line 368, in <module>
    if not parser.process():
  File "yowsup-cli", line 272, in process
    self.startSendClient()
  File "yowsup-cli", line 314, in startSendClient
    from yowsup.demos import sendclient
  File "/opt/yowsup-master/yowsup/demos/sendclient/__init__.py", line 1, in <module>
    from .stack import YowsupSendStack
  File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 1, in <module>
    from yowsup.stacks import  YowStackBuilder
  File "/opt/yowsup-master/yowsup/stacks/__init__.py", line 1, in <module>
    from .yowstack import YowStack, YowStackBuilder
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 10, in <module>
    from yowsup.layers.protocol_media              import YowMediaProtocolLayer
  File "/opt/yowsup-master/yowsup/layers/protocol_media/__init__.py", line 1, in <module>
    from .layer import YowMediaProtocolLayer
  File "/opt/yowsup-master/yowsup/layers/protocol_media/layer.py", line 2, in <module>
    from .protocolentities import ImageDownloadableMediaMessageProtocolEntity
  File "/opt/yowsup-master/yowsup/layers/protocol_media/protocolentities/__init__.py", line 3, in <module>
    from .message_media_downloadable_image import ImageDownloadableMediaMessageProtocolEntity
  File "/opt/yowsup-master/yowsup/layers/protocol_media/protocolentities/message_media_downloadable_image.py", line 4, in <module>
    from yowsup.layers.protocol_messages.proto.wa_pb2 import ImageMessage
  File "/opt/yowsup-master/yowsup/layers/protocol_messages/proto/wa_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
ImportError: No module named google.protobuf


Hab dann sudo apt-get install python-protobuf nachinstalliert und bekam neuen Fehler...

ImportError: No module named axolotl.state.prekeybundle


Mit sudo pip install python-axolotl kam ich dann nicht weiter...

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
    )[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log


JoWiemann

#1588
Ich vermute mal, Du hast folgendes noch nicht installiert: https://github.com/tgalal/python-Axolotl

Auszug aus dem Fhem Wiki:

Zudem wird neben den Python Modulen noch eine Lib von tgalal benötigt: https://wiki.fhem.de/wiki/Yowsup
cd /opt/fhem/yowsup
sudo wget https://github.com/tgalal/python-axolotl/archive/master.zip
sudo unzip master.zip
cd python-axolotl-master
sudo python setup.py install
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

en-trust

Ja aber sudo pip install python-axolotl funktioniert ja nicht...

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
    )[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log


...und cd /opt/fhem/yowsup gibt es nicht.
Ich habe nur /opt/yowsup-config und /opt/yowsup-master