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

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

Vorheriges Thema - Nächstes Thema

heinzfo

acceptFrom gibt es nicht ohne "userattr acceptFrom".

Leider hilft das auch nicht :-|

uland2012

 :-[

sorry, stimmt... nicht aufgepasst beim Ablesen in meiner config

VG
Uwe


justme1968

das attribut heisst acceptFrom und wird vom modul automatisch beim start hinzugefügt. es ist dann auch im userattr des devices zu sehen. du musst nichts von hand machen.

accept_from ist falsch. wo kommst das her?

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

heinzfo

Bei meinem fhem ist hier leider kein "acceptFrom"
Siehe Anhang.


Aus der commandref und dem Wiki

commandref
accept_from
comma separated list of contacts (numbers) from which messages will be accepted


wiki
accept_from
kommagetrennte Liste von Kontakten (Nummern), von denen Nachrichten akzeptiert werden. Ist das Attribut nicht gesetzt, so werden die Nachrichten von jedem akzeptiert.

justme1968

commandref und wiki waren tatsächlich falsch.

das attribut heisst definitiv acceptFrom.

ich habe gerade keine idee warum es bei dir nicht angezeigt wird. füge es mal von hand als userattr direkt beim device hinzu.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

heinzfo

acceptFrom als userattr eingefügt.
Das Problem bleibt, jeder kann nun etwas senden :-|

Grüße
Heinz

justme1968

hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

heinzfo

#1342

2016.09.29 12:23:07 0: Server started with 265 defined entities (fhem.pl:12192/2016-09-22 perl:5.020002 os:linux user:fhem pid:1019)
2016.09.29 12:23:12 3: WhatsApp: sending /L
2016.09.29 12:23:12 3: WhatsApp: sending /presence available
2016.09.29 12:23:12 3: WhatsApp: sending /presence name 'fhem'
2016.09.29 12:23:12 1: FHEMWEB SSL/HTTPS error:  SSL connect accept failed because of handshake problems
2016.09.29 12:23:12 1: FHEMWEB SSL/HTTPS error:  SSL connect accept failed because of handshake problems
2016.09.29 12:23:18 3: FB7390_SmartHome: read from http://fritz.box:80 timed out
2016.09.29 12:23:20 1: FHEMWEB SSL/HTTPS error:  SSL accept attempt failed error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
2016.09.29 12:24:02 4: WhatsApp: parse: Iq:
ID: 1
Type: result
from: 49xxxxx@s.whatsapp.net

2016.09.29 12:24:02 4: WhatsApp: parse:

2016.09.29 12:24:52 4: WhatsApp: parse: Iq:
ID: 2
Type: result
from: 49xxxxx@s.whatsapp.net

2016.09.29 12:24:52 4: WhatsApp: parse:

2016.09.29 12:25:43 4: WhatsApp: parse: Iq:
ID: 3
Type: result
from: 49xxxxx@s.whatsapp.net


2016.09.29 12:26:33 4: WhatsApp: parse: Iq:
ID: 4
Type: result
from: 49xxxxx@s.whatsapp.net


32_yowsup.pm 12056 2016-08-22 19:30:31Z justme1968

In der Datei kann man" acceptFrom" finden.

justme1968

natürlich steht es da drin. das ist ja das fhem modul.


achtung: sind die clients devices schon angelegt?

das acceptFrom ist nur für die aller erste kontakt aufnahme wenn es für die schreibende nummer noch kein client device gibt.

wenn es das client device gibt wird alles weitere dort geregelt.

was heisst jeder?

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

heinzfo

#1344
Zitat von: justme1968 am 29 September 2016, 13:46:03
natürlich steht es da drin. das ist ja das fhem modul.


achtung: sind die clients devices schon angelegt?

das acceptFrom ist nur für die aller erste kontakt aufnahme wenn es für die schreibende nummer noch kein client device gibt.

wenn es das client device gibt wird alles weitere dort geregelt.

was heisst jeder?

gruss
  andre
Habe ich jeder geschrieben?

Die Clients gibt es bereits.
Wo muss ich die Einträge machen um die Kommunikation auf meine drei Clients zu begrenzen?

Grüße
Heinz

justme1968

ja. du hast jeder geschrieben:
ZitatDas Problem bleibt, jeder kann nun etwas senden :-|

was genau willst du denn begrenzen?

- wenn ein client gar nichts mehr senden darf: das client device löschen
- wenn er keine (oder nur bestimmte) kommandos senden darf: commandPrefix und/oder allowedCommands anpassen
- wenn du die attribute nicht verwendest und alles selber in einem notify machst: dein notify anpassen

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

heinzfo


joewanne

Hallo, wer kann mir helfen,
Ich kann mit yowsup keine Nachrichten empfangen.

Habe alles wie in der FHEM Wiki beschrieben gemacht.

Bekomme folgenden Fehler:


AttributeError: 'NoneType' object has no attribute 'getData' 2016.10.05 10:16:49 3: WhatsApp: sending /disconnect 2016.10.05 10:16:49 3: WhatsApp: Disconnected 2016.10.05 10:16:49 3: WhatsApp: read: end of file reached while sysread 2016.10.05 10:16:59 2: WhatsApp: setting $HOME to /opt/fhem 2016.10.05 10:16:59 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -M -c /opt/yowsup-config/yowsup.config --yowsup 2016.10.05 10:17:00 3: WhatsApp: sending /L 2016.10.05 10:17:00 3: WhatsApp: sending /presence available 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 268, in process self.startCmdline() File "/opt/yowsup-master/yowsup-cli", line 297, in startCmdline stack.start() File "/opt/yowsup-master/yowsup/demos/cli/stack.py", line 26, in start self.stack.loop(timeout = 0.5, discrete = 0.5) File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 188, 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 102, in handle_read self.receive(data) File "/opt/yowsup-master/yowsup/layers/network/layer.py", line 110, in receive self.toUpper(data) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 76, in toUpper self.__upper.receive(data) File "/opt/yowsup-master/yowsup/layers/stanzaregulator/layer.py", line 29, in receive self.processReceived() File "/opt/yowsup-master/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived self.toUpper(oneMessageData) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 76, in toUpper self.__upper.receive(data) File "/opt/yowsup-master/yowsup/layers/auth/layer_crypt.py", line 65, in receive self.toUpper(payload) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 76, in toUpper self.__upper.receive(data) File "/opt/yowsup-master/yowsup/layers/coder/layer.py", line 35, in receive self.toUpper(node) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 76, in toUpper self.__upper.receive(data) File "/opt/yowsup-master/yowsup/layers/logger/layer.py", line 14, in receive self.toUpper(data) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 76, in toUpper self.__upper.receive(data) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 189, in receive s.receive(data) File "/opt/yowsup-master/yowsup/layers/__init__.py", line 125, in receive recv(node) File "/opt/yowsup-master/yowsup/layers/protocol_messages/layer.py", line 20, in recvMessageStanza entity = TextMessageProtocolEntity.fromProtocolTreeNode(node) File "/opt/yowsup-master/yowsup/layers/protocol_messages/protocolentities/message_text.py", line 38, in fromProtocolTreeNode entity.setBody(node.getChild("body").getData()) AttributeError: 'NoneType' object has no attribute 'getData' 2016.10.05 10:17:03 3: WhatsApp: sending /disconnect 2016.10.05 10:17:03 3: WhatsApp: Disconnected 2016.10.05 10:17:03 3: WhatsApp: read: end of file reached while sysread 2016.10.05 10:17:14 2: WhatsApp: setting $HOME to /opt/fhem 2016.10.05 10:17:14 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -M -c /opt/yowsup-config/yowsup.config --yowsup 2016.10.05 10:17:14 3: WhatsApp: sending /L 2016.10.05 10:17:14 3: WhatsApp: sending /presence available Traceback (most recent call last):


Gesendet von meinem EVA-L09 mit Tapatalk


michael.winkler

Wenn ich an meinen FHEM eine Whatsapp mit ä ö ü schicke dann bekomme ich im Log immer folgende Meldung


UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 0: ordinal not in range(128)
2016.10.27 16:50:51 3: WhatsApp: sending /disconnect
2016.10.27 16:50:51 3: WhatsApp: Disconnected
2016.10.27 16:50:51 3: WhatsApp: read: end of file reached while sysread
2016.10.27 16:51:01 2: WhatsApp: setting $HOME to whatsapp
2016.10.27 16:51:01 2: WhatsApp: starting yoswup-cli: /opt/yowsup-master/yowsup-cli demos -c /opt/yowsup-config/yowsup.config --yowsup
2016.10.27 16:51:02 3: WhatsApp: sending /L
2016.10.27 16:51:02 3: WhatsApp: sending /presence available
WARNING:yowsup.layers.axolotl.layer_receive:Received a message that we've previously decrypted, goint to send the delivery receipt myself

justme1968

von welcher platform schickst du?

eigentlich sollte unicode kommen nicht latin1.

das ganze ist aber kein problem des fhem moduls sondern von youwsup, am besten mal dort github fragen.

vielleicht hilft dir das: https://github.com/tgalal/yowsup/issues/1592.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968