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

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

Vorheriges Thema - Nächstes Thema

marvin78

Wie schon im anderen Thread gepostet, löst eigentlich das hier das Problem

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

Aber leider enthalten von yowsup empfangene Nachrichten danach viele Zeichen, die da nicht hin gehören. Eine Steuerung ist damit fast nicht möglich.


Tedious

Danke für Eure Hinweise. jau, läuft wieder - aber nutzbar ist anders ;)
FHEM auf Proxmox-VM (Intel NUC) mit 4xMapleCUN (433,3x868) und Jeelink, HUE, MiLight, Max!, SonOff, Zigbee, Alexa, uvm...

marvin78


Tedious

Schaut sehr gut aus, funktioniert auch weider wie gewohnt. Besten Dank!!!
FHEM auf Proxmox-VM (Intel NUC) mit 4xMapleCUN (433,3x868) und Jeelink, HUE, MiLight, Max!, SonOff, Zigbee, Alexa, uvm...

Fhemeinsteiger

Hallo,
Seit gestern Abend hab ich ein disconnect.
im log steht:

2016.03.22 20:09:46 2: WhatsApp: setting $HOME to /opt/fhem
2016.03.22 20:09:46 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/fhem/config.yowsup --yowsup
2016.03.22 20:09:49 3: WhatsApp: sending /L
2016.03.22 20:09:49 3: WhatsApp: sending /presence available
Traceback (most recent call last):
  File "/opt/yowsup-master/yowsup-cli", line 323, in <module>
    if not parser.process():
  File "/opt/yowsup-master/yowsup-cli", line 227, in process
    self.startCmdline()
  File "/opt/yowsup-master/yowsup-cli", line 255, in startCmdline
    stack.start()
  File "/opt/yowsup-master/yowsup/demos/cli/stack.py", line 25, in start
    self.stack.loop(timeout = 0.5, discrete = 0.5)
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 187, in loop
    asyncore.loop(*args, **kwargs)
  File "/usr/lib/python2.7/asyncore.py", line 216, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 156, in poll
    read(obj)
  File "/usr/lib/python2.7/asyncore.py", line 87, in read
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
    self.handle_read()
  File "/opt/yowsup-master/yowsup/layers/network/layer.py", line 86, in handle_read
    self.receive(data)
  File "/opt/yowsup-master/yowsup/layers/network/layer.py", line 94, in receive
    self.toUpper(data)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/opt/yowsup-master/yowsup/layers/stanzaregulator/layer.py", line 28, in receive
    self.processReceived()
  File "/opt/yowsup-master/yowsup/layers/stanzaregulator/layer.py", line 48, in processReceived
    self.toUpper(oneMessageData)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/opt/yowsup-master/yowsup/layers/auth/layer_crypt.py", line 63, in receive
    self.toUpper(payload)
  File "/opt/yowsup-master/yowsup/layers/__init__.py", line 59, in toUpper
    self.__upper.receive(data)
  File "/opt/yowsup-master/yowsup/layers/coder/layer.py", line 33, in receive
    node = self.reader.getProtocolTreeNode(data)
  File "/opt/yowsup-master/yowsup/layers/coder/decoder.py", line 13, in getProtocolTreeNode
    return self.streamStart(data)
  File "/opt/yowsup-master/yowsup/layers/coder/decoder.py", line 36, in streamStart
    raise Exception("expecting STREAM_START in streamStart, instead got token: %s" % token)
Exception: expecting STREAM_START in streamStart, instead got token: failure
2016.03.22 20:09:51 3: WhatsApp: sending /disconnect
2016.03.22 20:09:51 3: WhatsApp: Disconnected
2016.03.22 20:09:51 3: WhatsApp: read: error during sysread: No child processes
2016.03.22 20:09:51 1: PERL WARNING: Use of uninitialized value $ret in numeric le (<=) at ./FHEM/32_yowsup.pm line 480.
2016.03.22 20:09:51 3: WhatsApp: read: end of file reached while sysread
2016.03.22 20:10:01 2: WhatsApp: setting $HOME to /opt/fhem
2016.03.22 20:10:01 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/fhem/config.yowsup --yowsup
2016.03.22 20:10:06 3: WhatsApp: sending /L
2016.03.22 20:10:06 3: WhatsApp: sending /presence available
2016.03.22 20:10:07 3: WhatsApp: sending /disconnect
2016.03.22 20:10:07 3: WhatsApp: Disconnected
2016.03.22 20:10:07 3: WhatsApp: read: error during sysread: No child processes
2016.03.22 20:10:07 3: WhatsApp: read: end of file reached while sysread


Danach hab ich heute ein Update für yowsup gemacht,
aber immer noch steht im log:

2016.03.23 10:50:45 2: WhatsApp: setting $HOME to /opt/fhem
2016.03.23 10:50:45 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/fhem/config.yowsup --yowsup
2016.03.23 10:50:48 3: WhatsApp: sending /L
2016.03.23 10:50:48 3: WhatsApp: sending /presence available
2016.03.23 10:50:53 3: WhatsApp: sending /disconnect
2016.03.23 10:50:53 3: WhatsApp: Disconnected
2016.03.23 10:50:53 3: WhatsApp: read: error during sysread: No child processes
2016.03.23 10:50:53 3: WhatsApp: read: end of file reached while sysread
2016.03.23 10:51:03 2: WhatsApp: setting $HOME to /opt/fhem
2016.03.23 10:51:03 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/fhem/config.yowsup --yowsup
2016.03.23 10:51:07 3: WhatsApp: sending /L
2016.03.23 10:51:07 3: WhatsApp: sending /presence available
2016.03.23 10:51:12 3: WhatsApp: sending /disconnect
2016.03.23 10:51:12 3: WhatsApp: Disconnected
2016.03.23 10:51:12 3: WhatsApp: read: error during sysread: No child processes
2016.03.23 10:51:12 3: WhatsApp: read: end of file reached while sysread
2016.03.23 10:51:16 2: WhatsApp: setting $HOME to /opt/fhem
2016.03.23 10:51:16 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/fhem/config.yowsup --yowsup
2016.03.23 10:51:19 3: WhatsApp: sending /L
2016.03.23 10:51:19 3: WhatsApp: sending /presence available
2016.03.23 10:51:23 3: WhatsApp: sending /disconnect
2016.03.23 10:51:23 3: WhatsApp: Disconnected

und das geht so munter weiter.

Ich glaube Tedious hat ein änliches problem?



oli82

Habe gerade den ENV Type von Nokia auf Android umgestellt. Seit dem bin ich wieder connected. Irgendwie war 2015 das bessere Yowsup Jahr :(

marvin78

Es war aber von Anfang klar, dass man hier immer wieder nacharbeiten muss. Das liegt in der "Natur der Sache". Es ist auch möglich, dass das irgendwann überhaupt nicht mehr funktioniert.

VB90

Das "S40" Problem habe ich bei mir lösen können, musste aber die "Manufacturer"-Zeile raus lassen

@Fhemeinsteiger
Dann versuche doch mal, Die Lösung die ihm geholfen hat, ebenfalls umzusetzen... ,)

@oli

auf die Idee kam ich auch schon, hab aber nicht die passende Datei gefunden.
Kannst du mir sagen, wo du was umgestellt hast?
Ich war bisher an der __init__.py dran, aber ohne Erfolg.

vb
Man muss das Rad nicht neu erfinden, nur wissen wie es gedreht wird.

marvin78


Tedious

Ich fasse das denn noch mal kurz Zusammen, ich denke die beiden Hilfesteller (vielen Dank!) haben sicher nichts dagegen. Die Folgenden beiden Schritte befolgen und die entsprechenden Dateien editieren, denn funktioniert es wieder:

Zitat von: marvin78 am 23 März 2016, 09:56:40
Das hier hilft beim S40 Problem (vorläufig)

https://github.com/tgalal/yowsup/pull/1385/commits/0348511d02ff1addc208a5468a9a32fe48b89430

Zitat von: marvin78 am 23 März 2016, 10:31:16
Hier gibt es auch die Lösung für das Zeichen-Problem:

https://github.com/tgalal/yowsup/issues/1389#issuecomment-200261795
FHEM auf Proxmox-VM (Intel NUC) mit 4xMapleCUN (433,3x868) und Jeelink, HUE, MiLight, Max!, SonOff, Zigbee, Alexa, uvm...

VB90

Als "neues" S40 war ich nicht lange online. Nun habe ich mal auf Android umgestellt, mal schauen.
Danke für die Hinweise dazu.

Nun habe ich noch das Zeichensatz Problem, aber das ist bei mir zweitrangig.
Viel wichtiger ist, das ich Nachrichten von FHEM bekommen kann.

vb

edit: Nagut... lange online bleibt es so aber nicht.
Zitat2016.03.23 11:48:08.975 4: WhatsApp: parse:
general: Disconnected: Connection Closed
[connected]:

Mal sehen ob ich da ne regelmäßigkeit entdecken kann.
Man muss das Rad nicht neu erfinden, nur wissen wie es gedreht wird.

marvin78

Bei mir seit der Umstellung auf Android seit heute morgen kein disconnect (S40 klappte bei mir auch sofort - neu kompiliert natürlich). Auch für das Problem mit den Zeichen ist oben eine Lösung verlinkt.

VB90

@marvin

auch die Lösung habe ich schon gesehen, danke.
Da es für mich wie gesagt nicht soo spannend ist, zweitrangig.
Erstmal muss yowsup wieder stabil sein.

vb
Man muss das Rad nicht neu erfinden, nur wissen wie es gedreht wird.

marvin78

Na hast du denn die geänderten Datein auch neu kompiliert und reconnected? Danach sollte yowsup stabil sein (bis wieder eine Änderung nötig ist).