Ich bin gerade dabei zu versuchen, dass Whatsapp Plugin wieder ans Laufen zu bringen. Der Reconnect funktioniert nun (ohne men Zutun) dafür hat wohl Whatsapp inzwischen eine Verschlüsselung hinzugefügt, so dass ich noch einen weiteren Layer aus Yowsup in das Plugin eingefügt habe, nun kann ich senden und empfangen.
Allerdings kommt von Zeit zu Zeit beim senden eine solche Fehlermeldung, ich verstehe aber nicht, wofür das Plugin überhaupt auf SQLITE zugreift.
Hier der gesamte Ausschnitt mit Fehlermeldung "cannot start a transaction within a transaction":
Es kommt aber auch teilweise eine andere Fehlermeldung "Error binding parameter 0:
Hier meine plugin.conf Zeile:
im Anhang auch das komplette Plugin, whatsapp.zip
Allerdings kommt von Zeit zu Zeit beim senden eine solche Fehlermeldung, ich verstehe aber nicht, wofür das Plugin überhaupt auf SQLITE zugreift.
Hier der gesamte Ausschnitt mit Fehlermeldung "cannot start a transaction within a transaction":
PHP-Code:
if sh.Flur.TuerSchloss() == 0 and sh.Buero.TuerSchloss() == 1: sh.whatsapp("Buerotuer ist nicht verschlossen","XXXXXXXXXXX")
File "/usr/local/smarthome/plugins/whatsapp/__init__.py", line 124, in __call__
self._SmarthomeLayer.sendMsg(message, phoneNumber)
File "/usr/local/smarthome/plugins/whatsapp/SmarthomeLayer.py", line 92, in sendMsg
self.toLower(outgoingMessageProtocolEntity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 63, in toLower
self.__lower.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 173, in send
s.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 111, in send
send(entity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/protocol_messages/layer.py", line 15, in sendMessageEntity
self.entityToLower(entity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 115, in entityToLower
self.toLower(entity.toProtocolTreeNode())
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 63, in toLower
self.__lower.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/layer.py", line 107, in send
self.handlePlaintextNode(node)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/layer.py", line 190, in handlePlaintextNode
ciphertext = sessionCipher.encrypt(plaintext)
File "/usr/local/lib/python3.4/dist-packages/python_axolotl-0.1.7-py3.4.egg/axolotl/sessioncipher.py", line 65, in encrypt
self.sessionStore.storeSession(self.recipientId, self.deviceId, sessionRecord)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 53, in storeSession
self.sessionStore.storeSession(recepientId, deviceId, sessionRecord)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/store/sqlite/litesessionstore.py", line 38, in storeSession
c.execute(q, (recipientId, deviceId, sessionRecord.serialize()))
sqlite3.OperationalError: cannot start a transaction within a transaction
PHP-Code:
Traceback (most recent call last):
File "/usr/local/smarthome/lib/scheduler.py", line 341, in _task
exec(obj.bytecode)
File "/usr/local/smarthome/logics/fenster_melanie.py", line 19, in <module>
if sh.zentral.schlafmodus() == 0 and sh.BadUg.Fenster() == 1 and sh.Aussen.Temperatur() <18 and sh.BadUg.Fenster.age() >300 :sh.whatsapp("Das Badezimmerfenster im Untergeschoss ist seit " + str(round((sh.BadUg.Fenster.age()/60)))+ " Minuten auf.","491785500312")
File "/usr/local/smarthome/plugins/whatsapp/__init__.py", line 124, in __call__
self._SmarthomeLayer.sendMsg(message, phoneNumber)
File "/usr/local/smarthome/plugins/whatsapp/SmarthomeLayer.py", line 92, in sendMsg
self.toLower(outgoingMessageProtocolEntity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 63, in toLower
self.__lower.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 173, in send
s.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 111, in send
send(entity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/protocol_messages/layer.py", line 15, in sendMessageEntity
self.entityToLower(entity)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 115, in entityToLower
self.toLower(entity.toProtocolTreeNode())
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/__init__.py", line 63, in toLower
self.__lower.send(data)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/layer.py", line 107, in send
self.handlePlaintextNode(node)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/layer.py", line 190, in handlePlaintextNode
ciphertext = sessionCipher.encrypt(plaintext)
File "/usr/local/lib/python3.4/dist-packages/python_axolotl-0.1.7-py3.4.egg/axolotl/sessioncipher.py", line 38, in encrypt
sessionRecord = self.sessionStore.loadSession(self.recipientId, self.deviceId)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/store/sqlite/liteaxolotlstore.py", line 47, in loadSession
return self.sessionStore.loadSession(recepientId, deviceId)
File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/axolotl/store/sqlite/litesessionstore.py", line 16, in loadSession
c.execute(q, (recipientId, deviceId))
sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.
PHP-Code:
[whatsapp]
class_name = Whatsapp
class_path = plugins.whatsapp
account = 'XXXXXX'
password = 'XXXXXXX'
trusted = XXXXX XXXXXX
# cli_mode = True
logic = 'Logi_Whatsapp'
Kommentar