HomeGenie Forum
Automation Program Plugins and Wizard Scripting => APP Contributions => Topic started by: mvdarend on May 05, 2015, 09:02:40 AM
-
Since I've moved back to Android from Windows and I'm now using PushBullet for PC -> phone notifications I decided to integrate PushBullet into Homegenie.
You can associate modules with PushBullet or call it independently with the following code:
var pushBullet = Modules.InDomain("HomeAutomation.Network.Pushbullet").WithAddress("1").Get();
pushBullet.Command("Send").Set("Message to send.");
Here's more info:
https://www.pushbullet.com/ (https://www.pushbullet.com/)
-
hey all. is there any possibility to use.this addon with xmpp / jabber ? I have my own xmpp server running and would just like.to integrate some events via xmpp like motion control or notifications when some sensors have an alert. Is that possible in some way? would highly appreciate
-
To be honest, I have no idea how xmpp / jabber works.
A quick Google search for "xmpp / jabber pushbullet" doesn't help much, it looks like you need a third party app (Zapier, Cloudpipes) to get them to communicate.
-
hi all. i try to make HG communicate with mqtt and xmpp. maybe this can be an idea.. i'm a newbie in linux and don't know how to realize this, but it should be possible and it would be great if someone could write a plugin for HG?
http://ceit.uq.edu.au/content/using-xmpp-home-and-building-automation-first-post (http://ceit.uq.edu.au/content/using-xmpp-home-and-building-automation-first-post)
http://ceit.uq.edu.au/system/files/blog/41194386_-_Thesis_Proposal_-_Using_XMPP_in_Home_and_Building_Automation.pdf (http://ceit.uq.edu.au/system/files/blog/41194386_-_Thesis_Proposal_-_Using_XMPP_in_Home_and_Building_Automation.pdf)
-
I've added a new .hgx file with the following line added to ignore any certificate warnings:
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => true;
I was getting a 'Error getting response stream (Write: The authentication or decryption has failed.): SendFailure' error and mozroots --import --ask-remove wasn't helping. So I decided to just trust the certificate.
-
Just curious, is there an advantage of PushBullet over sending text messages via email?
-
Just curious, is there an advantage of PushBullet over sending text messages via email?
For me the main advantage is that PushBullet 'Alerts' are separate from my emails. (I don't like my email cluttered with other messages.)
But, in the end it's just another way to send a message (although PushBullet can do more than just messaging), some people prefer WhatsApp over Email, others prefer texting :)
-
Hi!
It's nice program. Works fine. But, can I change character encoding?
The program send me that:
Riaszt� rendszer �les�tve!
Riaszt� rendszer �les�tve!
but really like this:
Riasztó rendszer élesítve!
Riasztó rendszer élesítve!
-
But, can I change character encoding?
I don't know... I'll see if I can find something. A quick Google search for Pushbullet and encoding doesn't help me much, and I don;t have much experience with character encoding.
If all else fails I can strip the diacritics before sending, is that an option for you?
eg:
Riasztó rendszer élesítve!
will become
Riaszto rendszer elesitve!
-
Thanks!
But I have the same problem with mirage. :( ( http://www.homegenie.it/forum/index.php?topic=1031.0 (http://www.homegenie.it/forum/index.php?topic=1031.0) )
I'll wait a bit to see if Gene knows what's wrong.
-
Hi, mvdarend
I am running latest HG (493) on Windows.
Have added your pushbullet and copied and pasted my pushbullet Access Token.
On my one light switch, I selected pushbullet and ticket Notifications Change.
Issue: Not working, no Notification received on my Android cellular for pushbullet app?
Any help will be much appreciated.
-
Hi BitCraze,
I just tested it on my Windows test machine (v.493) with a Philips Hue light and a Virtual switch and both worked for me.
Can you send test messages from the PushBullet site to your mobile device?
Is it possible that your firewall is blocking outgoing traffic?
Can you double check the access token?
-
Hi, mvdarend
Checked PushBullet: Using correct Access Token in HG (copied and pasted).
Tested PushBullet web link to my phone: Received.
HG: Added "TestPB" virtual switch: Seems greyed out. Nothinh happens when clicked.
-
HG: Added "TestPB" virtual switch: Seems greyed out. Nothinh happens when clicked.
Could you add a screenshot of that?
Have you also tried temporarily disabling the firewall on the HomeGenie machine?
-
Hi, mvdarend
It's running on a Windows PC. Have disabled Firewall and tested: No change.
Works from PushBullet website to my Android phone.
My test button is attached. Nothing happens when clicked.
-
To be honest I have no idea what you are trying to do... Have you tried it with a normal switch or button?
- What is TestPB, it doesn't look like a normal button to me, does it actually have a change event?
- Why have you given 'Network 1' the name 'PushBullet'? The name is probably conflicting with the actual PushBullet APP.
And how exactly are the three screenshots related to each other?
-
Hi Bitcraze,
"gray led" means that the program is not enabled. starting from r494, hg won't let disabled program to run. so enable that program first (yellow led).
-
Hi, Gene
Thanks for the reply. :)
It is enabled (see attached), bit icons show blue?
The code is eneterd.
-
Well the name of the button is different from the name shown in this screenshot. So where is that grayed button coming from? :)
-
Hi, Gene
I don't quite understand?
Let me tell you the steps I took:
I added the .hgx file to "Messaging and Social" and enabled. Then added the Authorization token. Should it show BLUE on the left?
In Configure, Groups, I added a Test Group.
In that Group, I added Module by selecting from the List: Pushbullet 1000
The Button Pushbullet then shows under Test Group. The light is Grey, but goes yellow for a split second when I click it, then back to Grey.
Every 6th click or so, it would go green, and stay green, until clicked.
No PushBullet Notifications received on my Android phone.
-
I think you're misunderstanding how the PushBullet APP works. Basically it's the same as the Pushing Box APP.
In that Group, I added Module by selecting from the List: Pushbullet 1000
You don't need to do that, just activating the APP is enough. (Blue is in the latest test version, I think it means running in background.)
Add a simple switch, light or sensor to a group, and then activate Pushbullet notifications. When a value changes for the given switch, light or sensor you should receive a pushbullet notification.
Or you can try the C# example from the first post.
-
Hi,
Thanks so much: Working perfectly! ;)
-
Hi!
It's nice program. Works fine. But, can I change character encoding?
The program send me that:
Riaszt� rendszer �les�tve!
Riaszt� rendszer �les�tve!
but really like this:
Riasztó rendszer élesítve!
Riasztó rendszer élesítve!
Hi KaZe, I noticed while testing something else today that the character encoding works properly, could you confirm?. (I'm running v498)
-
Hi mvdarend!
I test it on v499. You're right. I confirm that, the character encoding works properly for me too. Nice :)
-
Hi!
I add 1 more feature to the program. "Pushbullet notifications only under away security mode".
So, if this checkbox checked, you only get the notifications, if the security system is "away" mode. (so, nobody at home)
I think this feature usefull for everyone, who use built in security system.
-
Hi,
Pushbullet is working as described above. How do I go about changing the message text so that it reads more like real english. So to be clear, at the moment I get a message along the lines of:
Module: Roger's Garage Door
Parameter: Status.Level
Value: 0
But I want to change it to something like:
Roger's Garage Door is closed.
Similarly, when it is open, i.e. status level is 1, I want it to say something along the lines of "Roger's Garage Door is open".
It will help with the WAF!
-
One way is to change the program itself to check for the type of sensor and then to give custom strings depending on the sensor type, you can then change this line for a more friendly message:
string theMessage = String.Format("Module: {0}{3} Parameter: {1}{3} Value: {2}{3}", module.Instance.Name, property.Name, property.Value, Environment.NewLine);
Another way is to not use the 'Pushbullet notifications' checkbox. I only ever use it for testing, for 'real' messages I usually create a new program with something like the following:
When.ModuleParameterChanged( (module, parameter) =>
{
if (module.Is("Roger's Garage Door"))
{
if(parameter.Name == "Status.Level")
{
var pushBullet = Modules.InDomain("HomeAutomation.Network.Pushbullet").WithAddress("1").Get();
string messageToSend = String.Empty;
if(parameter.Value == "1")
{
messageToSend = "Roger's Garage Door is open!";
}
else
{
messageToSend = "Roger's Garage Door is closed.";
}
pushBullet.Command("Send").Set(messageToSend);
return false;
}
}
return true;
});
I haven't tested the above code.
-
Hey Marcel,
Your code was absolutely spot on! Thanks very much.
Next question!
I need to be able to send pushbullet messages to more than one recipient. In my particular scenario, we have a double garage, one port is used by me, the other by my wife. I need to be able to notify her when door opens and closes and I need to notify me whenever my door opens or closes (I may also choose to add a notification to me whenever my wife's garage door opens or closes as well). How do I go about that? Is it a case of having a second instance of the Pushbullet program say Pushbullet2 so that I can input my wife's access token and then modify the code you have written accordingly? Or is there a simpler way? I assume that Pushbullet2 would also require some modification?
Thanks,
Roger
-
To be honest, I've never tried anything like that.
Your idea sounds like it should work, but I've no idea if it will. I fear you'll have some conflicts with two almost identical programs running.