{"id":1123,"date":"2012-02-22T09:12:32","date_gmt":"2012-02-22T08:12:32","guid":{"rendered":"http:\/\/blog.guiguiabloc.fr\/?p=1123"},"modified":"2013-05-13T12:59:42","modified_gmt":"2013-05-13T11:59:42","slug":"pushingbox-vos-notifications-in-the-cloud","status":"publish","type":"post","link":"http:\/\/blog.guiguiabloc.fr\/index.php\/2012\/02\/22\/pushingbox-vos-notifications-in-the-cloud\/","title":{"rendered":"PushingBox, vos notifications \u00ab\u00a0in the cloud\u00a0\u00bb"},"content":{"rendered":"<p>Aujourd&rsquo;hui je vais vous parler d&rsquo;un nouveau service qui vient d&rsquo;ouvrir : <a title=\"http:\/\/www.pushingbox.com\/\" href=\"http:\/\/www.pushingbox.com\/\" target=\"_blank\">PushingBox<\/a>.<\/p>\n<p>Cela me fait d&rsquo;autant plus plaisir de vous en faire sa \u00ab\u00a0publicit\u00e9\u00a0\u00bb car l&rsquo;un des membres pensant de ce projet est un confr\u00e8re,<a title=\"http:\/\/clement.storck.me\/\" href=\"http:\/\/clement.storck.me\/\" target=\"_blank\"> Cl\u00e9ment Storck<\/a>, dont je vous avez d\u00e9j\u00e0 parl\u00e9 dans de pr\u00e9c\u00e9dents billets (enfin surtout de son blog hein :p).<\/p>\n<p>Raison suppl\u00e9mentaire, Cl\u00e9ment m&rsquo;a fait l&rsquo;immense plaisir d&rsquo;\u00eatre b\u00e9ta-testeur de ce projet il y a quelques semaines et c&rsquo;est donc avec impatience que j&rsquo;attendais son ouverture officielle (du projet hein, pas de Cl\u00e9ment..) pour vous en parler (secret-d\u00e9fense toussa, conspiration, mots chuchot\u00e9s et courrier crypt\u00e9 en AES256 et blowfish (nan j&rsquo;d\u00e9conne).<\/p>\n<p>Bref, c&rsquo;est avec grand plaisir que je vous annonce le lancement officiel du service <a title=\"http:\/\/www.pushingbox.com\/\" href=\"http:\/\/www.pushingbox.com\/\" target=\"_blank\">PushingBox<\/a>.<\/p>\n<p>Alors a quoi ca sert ?<\/p>\n<p><a title=\"http:\/\/www.pushingbox.com\/\" href=\"http:\/\/www.pushingbox.com\/\" target=\"_blank\">PushingBox <\/a>est un centralisateur de notifications. C&rsquo;est \u00e0 dire qu&rsquo;il vous permet de cr\u00e9er et de g\u00e9rer des sc\u00e9narios de notifications pour vos applications (domotique dans mon cas).<\/p>\n<p>La liste des notifications disponibles au lancement du service est d\u00e9j\u00e0 bien garnie :<\/p>\n<ul>\n<li>Email<\/li>\n<li>Twitter<\/li>\n<li>Karotz<\/li>\n<li>Prowl<\/li>\n<li>Pushme.to<\/li>\n<li>Toasty<\/li>\n<li>Notifry<\/li>\n<li>Notify My Android<\/li>\n<li>GetNote<\/li>\n<\/ul>\n<p>Et ce n&rsquo;est qu&rsquo;un d\u00e9but \ud83d\ude42<\/p>\n<p>Comment \u00e7a marche ?<\/p>\n<p>Et bien vous allez voir, c&rsquo;est tout simple :<\/p>\n<p>Supposons que vous d\u00e9sirez une notification qui arrive simultan\u00e9ment sur votre compte <a title=\"https:\/\/notifrier.appspot.com\/\" href=\"https:\/\/notifrier.appspot.com\/\" target=\"_blank\">Notifry<\/a> et votre email en cas de d\u00e9tection sur une intrusion chez vous.<\/p>\n<p>Dans la partie services, vous allez cr\u00e9er les \u00ab\u00a0cibles\u00a0\u00bb qui vont recevoir les notifications.<\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox31.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1132\" title=\"pushingbox3\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox31-300x101.png\" alt=\"\" width=\"300\" height=\"101\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox31-300x101.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox31.png 913w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Dans mon cas, un email avec le sujet et le message a envoyer.<\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox5.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1127\" title=\"pushingbox5\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox5-300x221.png\" alt=\"\" width=\"300\" height=\"221\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox5-300x221.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox5.png 354w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Puis le service Notifry avec le sujet et la cl\u00e9 Notifry.<\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox6.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1128\" title=\"pushingbox6\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox6-300x300.png\" alt=\"\" width=\"300\" height=\"300\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox6-300x300.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox6-150x150.png 150w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox6.png 389w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox7.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1129\" title=\"pushingbox7\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox7-300x251.png\" alt=\"\" width=\"300\" height=\"251\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox7-300x251.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox7.png 339w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Ensuite le sc\u00e9nario dans lequel vous allez ajouter les deux services pr\u00e9c\u00e9demment cr\u00e9\u00e9s.<\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox2.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1130\" title=\"pushingbox2\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox2-300x103.png\" alt=\"\" width=\"300\" height=\"103\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox2-300x103.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox2.png 977w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox8.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1131\" title=\"pushingbox8\" src=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox8-300x117.png\" alt=\"\" width=\"300\" height=\"117\" srcset=\"http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox8-300x117.png 300w, http:\/\/blog.guiguiabloc.fr\/wp-content\/2012\/02\/pushingbox8.png 979w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Un cl\u00e9 \u00ab\u00a0deviceid\u00a0\u00bb est g\u00e9n\u00e9r\u00e9 dont vous allez vous servir pour ex\u00e9cuter le sc\u00e9nario en utilisant l&rsquo;API fournie par PushingBox.<\/p>\n<p>La m\u00e9thode la plus simple :<\/p>\n<pre>curl -d \"devid=v35883B72B89AFAC\" http:\/\/api.pushingbox.com\/pushingbox<\/pre>\n<p>et boum, vous recevez un email et la notification Notifry !<\/p>\n<p>C&rsquo;est pas g\u00e9nial ? Si, je l&rsquo;avoue<\/p>\n<p>D&rsquo;autres m\u00e9thodes d&rsquo;appel \u00e0 l&rsquo;API sont disponibles sur la page du projet :<\/p>\n<p><a title=\"http:\/\/www.pushingbox.com\/api.php\" href=\"http:\/\/www.pushingbox.com\/api.php\" target=\"_blank\">http:\/\/www.pushingbox.com\/api.php<\/a><\/p>\n<p>Sachez \u00e9galement que son int\u00e9gration avec l&rsquo;Arduino est de d\u00e9j\u00e0 disponible.<\/p>\n<p>Si comme moi vous utilisez \u00e9norm\u00e9ment Python, voici la classe que j&rsquo;ai \u00e9crite pour envoyer mes alertes sur <a title=\"http:\/\/www.pushingbox.com\/index.php\" href=\"http:\/\/www.pushingbox.com\/index.php\" target=\"_blank\">PushingBox <\/a>:<\/p>\n<pre lang=\"python\">import urllib, urllib2\r\nclass pushingbox():\r\n  url = \"\"\r\n  def __init__(self, key):\r\n    url = 'http:\/\/api.pushingbox.com\/pushingbox'\r\n    values = {'devid' : key}\r\n    try:\r\n      data = urllib.urlencode(values)\r\n      req = urllib2.Request(url, data)\r\n      sendrequest = urllib2.urlopen(req)\r\n    except Exception, detail:\r\n      print \"Error \", detail<\/pre>\n<p>L&rsquo;appel de la classe se fait tr\u00e8s simplement :<\/p>\n<pre lang=\"python\">from PushingBox import pushingbox\r\nkey = \"v35883B72B89AFAC\"\r\npushingbox(key)<\/pre>\n<p>(il vous suffit de variabiliser la valeur \u00ab\u00a0key\u00a0\u00bb pour envoyer votre notification au bon endroit)<\/p>\n<p>Voici donc un service excellent, de plus Gratuit (et c&rsquo;est \u00e0 souligner de nos jours), et seul un compte Google vous suffit.<\/p>\n<p>Toutes mes f\u00e9licitations \u00e0 Cl\u00e9ment et ses coll\u00e8gues pour ce webservice indispensable dans nos installations domotique.<\/p>\n<p>Longue vie au projet \ud83d\ude00 et Merci \u00e0 Cl\u00e9ment pour sa confiance sur le lancement du projet \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Aujourd&rsquo;hui je vais vous parler d&rsquo;un nouveau service qui vient d&rsquo;ouvrir : PushingBox. Cela me fait d&rsquo;autant plus plaisir de vous en faire sa \u00ab\u00a0publicit\u00e9\u00a0\u00bb car l&rsquo;un des membres pensant de ce projet est un confr\u00e8re, Cl\u00e9ment Storck, dont je &hellip; <a href=\"http:\/\/blog.guiguiabloc.fr\/index.php\/2012\/02\/22\/pushingbox-vos-notifications-in-the-cloud\/\">Read More <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[137,13],"tags":[177,178],"_links":{"self":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/1123"}],"collection":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/comments?post=1123"}],"version-history":[{"count":14,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/1123\/revisions"}],"predecessor-version":[{"id":1535,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/posts\/1123\/revisions\/1535"}],"wp:attachment":[{"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/media?parent=1123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/categories?post=1123"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.guiguiabloc.fr\/index.php\/wp-json\/wp\/v2\/tags?post=1123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}