Hallo zusammen,
ich habe gerade einen Pull-Request für den Development Stand gestellt, welcher ein neues Plugin integrieren soll. https://github.com/mknx/smarthome/pull/112
Da mir das Notify my Android Plugin mit dem Limit von 5 Meldungen pro Tag "zu wenig" war bin ich im Play-Store auf "Pushbullet" (https://www.pushbullet.com/) gestoßen.
Das Prinzip von Pushbullet ist im Grunde das gleiche wie NMA, erlaubt aber auch den Versand von anderen Notifications (wie z.B. Dateien, Links, Adressen).
Wie auch bei NMA wird ein API-Key benötigt, den es kostenlos nach der Registrierung gibt.
Die Push-Funktionen sind soweit durchgetestet, was ich nicht implementiert habe ist die Abfrage der registrierten Devices. Das könnte man evtl. noch mal zusätzlich aufnehmen, hier hatte ich aber bisher keine Notwendigkeit, da ich aktuell nur an 1 Device versende und keine Auswahl brauche.
Wer es ausprobieren will kann sich auch meinen Smarthome-Dev Stand auschecken und im Plugin-Ordner den "pushbullet" Ordner in seine Installation übernehmen. (https://github.com/lbernau/smarthome/tree/develop)
Feedback wird gern entgegen genommen.
Grüße,
Lars
Hier schon mal der Inhalt der "Readme.md" als Anleitung:
https://github.com/lbernau/smarthome...llet/README.md
ich habe gerade einen Pull-Request für den Development Stand gestellt, welcher ein neues Plugin integrieren soll. https://github.com/mknx/smarthome/pull/112
Da mir das Notify my Android Plugin mit dem Limit von 5 Meldungen pro Tag "zu wenig" war bin ich im Play-Store auf "Pushbullet" (https://www.pushbullet.com/) gestoßen.
Das Prinzip von Pushbullet ist im Grunde das gleiche wie NMA, erlaubt aber auch den Versand von anderen Notifications (wie z.B. Dateien, Links, Adressen).
Wie auch bei NMA wird ein API-Key benötigt, den es kostenlos nach der Registrierung gibt.
Die Push-Funktionen sind soweit durchgetestet, was ich nicht implementiert habe ist die Abfrage der registrierten Devices. Das könnte man evtl. noch mal zusätzlich aufnehmen, hier hatte ich aber bisher keine Notwendigkeit, da ich aktuell nur an 1 Device versende und keine Auswahl brauche.
Wer es ausprobieren will kann sich auch meinen Smarthome-Dev Stand auschecken und im Plugin-Ordner den "pushbullet" Ordner in seine Installation übernehmen. (https://github.com/lbernau/smarthome/tree/develop)
Feedback wird gern entgegen genommen.
Grüße,
Lars
Hier schon mal der Inhalt der "Readme.md" als Anleitung:
https://github.com/lbernau/smarthome...llet/README.md
Code:
Pushbullet Requirements Python libraries requests - http://docs.python-requests.org/en/latest/user/install/#install Other Pushbullet API-KEY - get it from here for free Configuration plugin.conf [pushbullet] class_name = Pushbullet class_path = plugins.pushbullet # deviceid = # apikey = Description of the attributes: apikey: set api-key globally so you do not have to set it in the function calls deviceid: set deviceid globally so it will be used as defaul target, you can override this on each call Functions Pass a 'deviceid' if no set globally or if you want to send to another device. Add 'apikey' if not set globally. sh.pushbullet.note(title, body [, deviceid] [, apikey]) Send a note to your device. Parameters title: The title of the note body: The note's body Example #send simple note to default device sh.pushbullet.note("Note to myself.", "Call my mother.") sh.pushbullet.link(title, url [, deviceid] [, apikey]) Send a link to your device. Parameters: title: The title of the page linked to url: The link url Example # send link to device with id: x28d7AJFx13 sh.pushbullet.link("Pushbullet", "http://www.pushbullet.com", "x28d7AJFx13") sh.pushbullet.address(name, address [, deviceid] [, apikey]) Send a address to your device. Parameters: name: The name of the place at the address address: The full address or Google Maps query Example # send address of "Eifel Tower" to default device sh.pushbullet.address("Eifel Tower", "https://www.google.com/maps/place/Eiffelturm/@48.85837,2.294481,17z/data=!3m1!4b1!4m2!3m1!1s0x47e66e2964e34e2d:0x8ddca9ee380ef7e0") sh.pushbullet.list(title, title [, deviceid] [, apikey]) Send a list of items to your device. Parameters: title: The title of the list items: The list items Example #send a shopping list to default device sh.pushbullet.list("Shopping list", ["Milk", "Eggs", "Salt"]) sh.pushbullet.file(filepath [, deviceid] [, apikey]) Send a file to your device. Parameters: filepath: absolute path to the file to push Example #send smarthome log file to default device sh.pushbullet.note("/usr/local/smarthome/var/log/smarthome.log")
Kommentar