Ankündigung

Einklappen
Keine Ankündigung bisher.

Neues Plugin: Whatsapp

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #46
    was kommt den im Log beim starten von sh.py?

    - wie geh ich da vor, bzw. mit welchem befehlt starte ich sh.py?

    sowas in der art müsste erscheinen:
    2014-02-13 10:18:04 INFO Thread-8 Whatsapp: Authed xxxxxx
    dann mach mal ne Logik test.py

    in welches Verzeichnis musst die test.py abgelegt werden?

    mit dem inhalt:

    sh.whatsapp("hallo Welt", "Tel-Nr")


    und triggere dann die Test-Logik via CLI

    - wie mach ich das?

    entschuldigung, bin ein absoluter Neuling.

    Kommentar


      #47
      Hi
      Ich denke du solltest zuerst mal ein bisschen im forum stöbern und lesen. Danach die ersten gehversuche starten - trial & error - und wieder versuchen.
      Bez. Diesem plugin ist nicht klar obs in paar tagen noch tut...

      Zu deinen fragen:
      sh.py starten /etc/init.d/smarthome start | stop etc
      Das log liegt unter var/log/

      Kommentar


        #48
        Sorry, für's OT, aber doch recht passend an dieser Stelle: WhatsApp lässt Hobby-Projekte löschen ? Festplattenabgabe auf Smartphones | iPhone-Ticker
        Mit freundlichen Grüßen
        Niko Will

        Logiken und Schnittstelle zu anderen Systemen: smarthome.py - Visualisierung: smartVISU
        - Gira TS3 - iPhone & iPad - Mobotix T24 - ekey - Denon 2313 - Russound C5 (RIO over TCP Plugin) -

        Kommentar


          #49
          Das Projekt ist wieder Online...warum auch immer....
          https://github.com/tgalal/yowsup

          Kommentar


            #50
            Hallo Zusammen,

            irgendwie bekomme ich das WhatsApp Plugin nicht ans fliegen :-(
            Beim start zeigt sich folgende Fehlermeldung:

            Code:
            # /usr/local/smarthome/bin/smarthome.py -d
            2014-06-11 20:33:53,790 INFO     Main         Start SmartHome.py 1.0-35-gf62db45 -- smarthome.py:__init__:231
            2014-06-11 20:33:53,795 DEBUG    Main         Python 3.2.3 -- smarthome.py:__init__:232
            2014-06-11 20:33:53,802 INFO     Main         Init Scheduler -- scheduler.py:__init__:86
            2014-06-11 20:33:53,808 INFO     Main         Init Plugins -- smarthome.py:start:274
            2014-06-11 20:33:53,822 DEBUG    Scheduler    creating 5 workers -- scheduler.py:run:93
            2014-06-11 20:33:53,833 DEBUG    Main         Plugin: knx -- plugin.py:__init__:43
            2014-06-11 20:33:53,862 DEBUG    Main         Plugin: cli -- plugin.py:__init__:43
            2014-06-11 20:33:53,884 DEBUG    Main         Plugin: sql -- plugin.py:__init__:43
            2014-06-11 20:33:53,912 DEBUG    Main         SQLite 3.7.13 -- __init__.py:__init__:62
            2014-06-11 20:33:53,923 DEBUG    Main         SQLite: database integrity ok -- __init__.py:__init__:78
            2014-06-11 20:33:53,948 DEBUG    Main         SQLite pack next time: 2014-06-12 03:02:00+02:00 -- scheduler.py:_next_time:289
            2014-06-11 20:33:53,955 DEBUG    Main         Plugin: notify -- plugin.py:__init__:43
            2014-06-11 20:33:53,964 DEBUG    Main         Plugin: whatsapp -- plugin.py:__init__:43
            2014-06-11 20:33:54,281 ERROR    Main         Plugin whatsapp exception: No module named Yowsup.Common.debugger -- plugin.py:__init__:57
            Traceback (most recent call last):
              File "/usr/local/smarthome/lib/plugin.py", line 53, in __init__
                plugin_thread = Plugin(smarthome, plugin, classname, classpath, args)
              File "/usr/local/smarthome/lib/plugin.py", line 79, in __init__
                exec("import {0}".format(classpath))
              File "<string>", line 1, in <module>
              File "/usr/local/smarthome/plugins/whatsapp/__init__.py", line 23, in <module>
                from plugins.whatsapp.ListenerClient import WhatsappListenerClient
              File "/usr/local/smarthome/plugins/whatsapp/ListenerClient.py", line 27, in <module>
                from .Yowsup.Media.uploader import MediaUploader
              File "/usr/local/smarthome/plugins/whatsapp/Yowsup/Media/uploader.py", line 1, in <module>
                from ..Common.Http.warequest import WARequest
              File "/usr/local/smarthome/plugins/whatsapp/Yowsup/Common/Http/warequest.py", line 33, in <module>
                from Yowsup.Common.debugger import Debugger as WADebug
            ImportError: No module named Yowsup.Common.debugger
            2014-06-11 20:33:54,310 INFO     Main         Init Items -- smarthome.py:start:280
            2014-06-11 20:33:54,412 DEBUG    Main         Item env.core.memory = 13963264.0 via SQLite None None -- item.py:set:457
            2014-06-11 20:33:54,428 DEBUG    Main         Item env.core.threads = 7.0 via SQLite None None -- item.py:set:457
            2014-06-11 20:33:54,444 DEBUG    Main         Item env.core.garbage = 0.0 via SQLite None None -- item.py:set:457
            2014-06-11 20:33:54,451 DEBUG    Main         Item env.core: no type specified. -- item.py:__init__:242
            2014-06-11 20:33:54,500 DEBUG    Main         Item env.location: no type specified. -- item.py:__init__:242
            2014-06-11 20:33:54,523 DEBUG    Main         Item env.system.load = 0.08 via SQLite None None -- item.py:set:457
            2014-06-11 20:33:54,535 DEBUG    Main         Item env.system: no type specified. -- item.py:__init__:242
            2014-06-11 20:33:54,539 DEBUG    Main         Item env: no type specified. -- item.py:__init__:242
            2014-06-11 20:33:54,554 DEBUG    Main         KNX: RegenSensor listen on 0/6/99 -- __init__.py:parse_item:235
            ...
            ..
            .
            Versteh leider nicht wo sein Problem ist
            Installiert habe ich Whatsapp folgendermaßen:
            - https://github.com/mknx/smarthome/tr...b2f1c15efbde5e
            - „Download ZIP“
            - Zipfile entpackt und „./plugins/whatsapp“ nach „/usr/local/smarthome/plugins/“ kopiert (…und Rechte angepasst chown smarthome:smarthome /usr/local/smarthome/plugins/whatsapp -R)
            - Konfig angepasst:

            ./etc/plugin.conf
            Code:
            [knx]
               class_name = KNX
               class_path = plugins.knx
               host = 192.168.123.123
               port = 6720
            
            [cli]
                class_name = CLI
                class_path = plugins.cli
                ip = 0.0.0.0
                update = True
            
            [sql]
                class_name = SQL
                class_path = plugins.sqlite
            
            
            [notify]
                class_name = Prowl
                class_path = plugins.prowl
                apikey = XX11XX...
            
            
            [whatsapp]
                class_name = Whatsapp
                class_path = plugins.whatsapp
                account = 'xxx'
                password = 'xxx'
                trusted = 49170123
                logic = 'Logi_Whatsapp'
            ./etc/logic.conf
            Code:
            [Logi_Whatsapp]
               filename = whatsapp.py
            ./logics/whatsapp.py
            Code:
            #!/usr/bin/env python
            
            msg = trigger['value']
            absender = trigger['source']
            
            logger.info(str(msg)+"@"+str(absender))
            
            if msg == "Regen?":
               antwort = "Ja" if sh.Zentrale.Regen() else "Nein"
               sh.whatsapp(antwort)
            Ohne SH.py klapp das Versenden problemlos:
            Code:
            # python –V
            Python 3.2.3
            
            # python yowsup-cli -c config.example -s 49170123 "helloABC"
            Detected cc: 49
            Authed 49179123
            Sent message
            Kann mir hier einer weiterhelfen?
            Ich hab echt keine Idee mehr

            Danke und Gruß

            Wolle

            Kommentar


              #51
              Wie sieht es eigentlich mit dem Whatsapp Plugin aus? Soll dies dauerhaft aus Smarthome.py entfernt werden, auch wenn Yowsup nun wieder on ist?
              In diesem Fall könnte man Yowsup Standalone laufen und auf einem Netzwerk Socket lauschen lassen, der von sh.py mit Nachrichten befüllt wird. Dann hätte man eine Entkopplung der beiden Projekte erreicht...

              LG

              Mode

              Kommentar


                #52
                Eigentlich könnte man auf Pushbullet umsteigen.. das Plugin funktioniert prima und ist auch unabhängig von der Tel-Nr.

                Kommentar


                  #53
                  Solange man nur eine OneWay-Kommunikation benötigt, kann man x-Varinaten wie Bulletpush, NMA, etc.. benutzen, da hast du recht. Bidirektional geht's im moment nur mit dem Whatsapp-Plugin...

                  gruss Buffi

                  Kommentar


                    #54
                    &lt;null&gt; antwort per Whatsapp

                    Hallo,
                    ich habe ein seltsames Phänomen:
                    Soweit funktioniert das Plugin sehr gut.
                    Es kommt nur oft vor, wenn ich eine Anfrage per Whatsapp stelle, dass mir der Pi ne <null> auf whatsapp zurückschickt (es steht nix in der Nachricht und per copy&paste kommt dann null)

                    Hat dies jemand schonmal gemerkt und ne Lösung gefunden?

                    Mein code
                    Code:
                    if msg == "Temperatur":
                       antwort = "Arbeiten: "+str(temp_arbeiten) 
                       sh.whatsapp(antwort)
                    Danke
                    Gruß
                    Christian

                    Kommentar


                      #55
                      Whatsapp in der letzten Smarthome.py Version funktioniert nicht mehr, da die Whatsappserver einen neueren Client erwarten.

                      Manuell kann man einfach die Datei Yowsup/Common/constants.py aus dem aktuellen Yowsup GIT einspielen, dann sollte es wieder funktionieren!

                      Soll das Whatsapp Plugin wieder seinen weg ins Smarthome Repository finden?

                      VG

                      mode

                      Kommentar


                        #56
                        Hallo,

                        Zitat von mode Beitrag anzeigen
                        Soll das Whatsapp Plugin wieder seinen weg ins Smarthome Repository finden?
                        ich würde einen Pull-Request annehmen.

                        Bis bald

                        Marcus

                        Kommentar


                          #57
                          Ich habe das Problem, dass das Plugin nach einiger Zeit nicht mehr reagiert. Im Detail: es reagiert nicht mehr auf Anfragen vom SmartPhone und schickt auch keine Nachrichten mehr raus.

                          Im Log steht nichts.

                          Hat jemand ähnliche Erfahrungen gemacht?

                          Grüße
                          David

                          Kommentar


                            #58
                            Ist mir noch nie aufgefallen. Kann es sein, dass es nicht mehr bei Whatsapp angemeldet ist?
                            steht bei dir im Log sowas?
                            2014-12-08 05:46:34 INFO Thread-25 Whatsapp: Disconnected because closed
                            2014-12-08 05:46:36 INFO Thread-27 Whatsapp: Authed 41xxxxxx
                            gruss

                            Kommentar


                              #59
                              Hallo,

                              mal eine Frage an alle die das Plugin nutzen:

                              geht das Plugin bei euch noch?

                              Bei mir ist die letzte Meldung am Donnerstag um 13:11 durchgegangen danach war stille.

                              Gruß Wolfi

                              Kommentar


                                #60
                                Hi,

                                geht nicht mehr, da wurde die Authentifizierung geändert. Ich habs heute mal aktualisiert. Nun tuts wider. Ich werds morgen mal hochladen.
                                PS: Bilder senden tut noch nicht, weiss allerdings grad nicht woran es liegt.
                                PPS: Es gibt auch yowsup Version 2. Die habe ich mal zum laufen gebracht. Ob ich Zeit finde, diese ins Whatsapp-Plugin zu integrieren kann ich noch nicht sagen...

                                Kommentar

                                Lädt...
                                X