Page 31 of 34

Re: PushBullet plugin (Pako)

Posted: Thu Jul 05, 2018 5:45 am
by kgschlosser
I have not personally done anything with this.

I don't know if building in a patch to handle this kind of a thing is the best way to go. This is because of how pycurl handles adding certificates to it's connection it is something I feel could be prone to errors. as far as a workaround goes the code i posted above should do the trick.

The requests library was as simple as adding an environment variable that points to the location of the certificates file. and that will automatically get used for each and every connection.


I think that this plugin at one point in time used the requests library and was converted to using pycurl due to issues with security certificates in the requests library. the requests library has been fixed and the certificates file is very easily updated. this will ensure it's continued operation. if using pycurl the plugin author would need to be responsible for taking care of pointing the connection to a working certificates file. I say this because it needs to be done on a per connection basis, and not all uses of pycurl would need to have access to a certificate file.

Re: PushBullet plugin (Pako)

Posted: Tue Aug 21, 2018 6:22 am
by Karlhfr
Done, thanks

Now.. I have managed to get PB running. I rolled back to EG version 0.4 and installed PB .21

It works! Well at least most of it. Can’t seem to get the ‘push’ action to work. I get a load of errors

Re: PushBullet plugin (Pako)

Posted: Mon Aug 27, 2018 12:29 pm
by carniom
Alright! I'm total n00b at this but trying to set up a simple event/macro in EventGhost to turn off a specific computer via Google Assistant. I was able to create a simple macro like this (keep in mind i've simplified the built in force shutdown code below):

Code: Select all

PushBullet.Note.GoogleVoiceSimpleCommands
PushBullet.DeletePush(u'{eg.event.payload[0]}')
System.PowerDown(True)
I have 2 questions/issues:
1. I can use the 1st line to recognise and see the note from GoogleVoiceSimpleCommands (via a ifttt applet), and it does work - HOWEVER, I realised if i send ANY note through pushbullet, it will see it in ifttt and turn off any computer that's on and running the above event (this is ok if i only have one device on but i often have 2 or more). So, how do I only activate the event if there is specific wording? In this case "wol_off_matt". I saw this viewtopic.php?f=2&t=10085&p=50391&hilit ... ote#p50391 however it did not work for me.
2. I cannot delete the push called "wol_off_matt". I used the built in 'DeletePush' however it throws an error saying it can't find the object. How do I delete the specific "wol_off_matt" push?

I am using EventGhost 0.4.1.r1722 and Pako PushBullet plugin v 0.2.20
Thank you

Re: PushBullet plugin (Pako)

Posted: Sun Jan 27, 2019 2:18 am
by kgschlosser
ok for those of you that are running into SSL issues with this plugin.

if someone is willing to do a test for me to see if it solves the problem. if you have my previous fix in place.. disable the actions, save and restart EG

create a python script action in your autostart group.
add the code below into the python script action.

Code: Select all

import os

os.environ['CURL_CA_BUNDLE'] = os.path.join(eg.sitePackagesDir, 'requests', 'cacert.pem')
click on Apply then click on OK
save and restart EG. see if the plugin works correctly.

Re: PushBullet plugin (Pako)

Posted: Sun Jan 27, 2019 12:03 pm
by mans
C:\Program Files (x86)\EventGhost\plugins\MCEvent\__init__.py:185: FutureWarning: This search is broken in 1.3 and earlier, and will be fixed in a future version. If you rely on the current behaviour, change it to './Item/Field'
itemList = tree.findall('/Item/Field')
Exception in thread Thread-7:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "threading.pyc", line 754, in run
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 3798, in updateDevices
self.getAccount()
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 3681, in getAccount
account, flag = self.request("GET", API + 'users/me')
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 3641, in request
c.perform()
error: (60, 'SSL certificate problem: unable to get local issuer certificate')

Re: PushBullet plugin (Pako)

Posted: Sun Jan 27, 2019 7:55 pm
by kgschlosser
ok replace the __init__ file in your pushbullet plugin folder. with the one attached.

I added the setting of the location to the CA bundle to each request using pycurl.

I have found reference to the certificates getting compiled into pycurl if the CURL_CA_BUNDLE environment variable is set. and if it is not set then no certificates get compiled into it. so this is the only way to get pycurl to use the certificates bundle is to tell it to specifically with each call. and This proves to be a very large headache for including pycurl in EG. because there is no way to set the certs file unless it is done manually each time.

But lets see if this works. the modified version is attached.

Re: PushBullet plugin (Pako)

Posted: Mon Jan 28, 2019 10:17 am
by mans
Something seems to be missing in order to load;

Fout gedurende laden van invoegtoepassing C:\ProgramData\EventGhost\plugins\PushBullet.
Traceback (most recent call last) (0.5.0-rc6):
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 292, in <module>
from ImageGrab import grab, grabclipboard
ImportError: No module named ImageGrab

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 2:06 am
by kgschlosser
bah! i for got to update it to be compatible with eg0.5

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 2:14 am
by kgschlosser
ok here is the plugin __init__ updated for eg 0.5

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 10:40 am
by mans
Hi Kevin.

Here you go;

Exception in thread Thread-7:
Traceback (most recent call last):
File "threading.pyc", line 801, in __bootstrap_inner
File "threading.pyc", line 754, in run
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 3800, in updateDevices
if not self.connectivity():
File "C:\ProgramData\EventGhost\plugins\PushBullet\__init__.py", line 2778, in connectivity
os.path.join(eg.sitePackagesDir, 'requests', 'cacert.pem')
NameError: global name 'os' is not defined

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 11:18 am
by kgschlosser
ok hopefully last time!

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 1:21 pm
by mans
Bingo Kevin !

Installed and restarted EG and the server;
No more error messages;

PushBullet: Adding push messaging listener
PushBullet.InternetConnection.Restored
PushBullet.WebSocketOpened
PushBullet: modified_after updated: xxxxxxxxxxxxxxx.xxx
PushBullet: WebSocket message: {u'type': u'nop'}
PushBullet: WebSocket message: {u'type': u'nop'}
System.Idle
PushBullet: WebSocket message: {u'type': u'nop'}
PushBullet: WebSocket message: {u'type': u'nop'}
PushBullet: WebSocket message: {u'type': u'nop'}
PushBullet: WebSocket message: {u'type': u'nop'}
PushBullet: WebSocket message: {u'type': u'nop'}

:D :D :D

Thanks !

Re: PushBullet plugin (Pako)

Posted: Tue Jan 29, 2019 6:08 pm
by kgschlosser
that is what I am here for!!!

Re: PushBullet plugin (Pako)

Posted: Mon Feb 04, 2019 1:54 am
by Kameleau
Hi,

I'm trying to have Eventghost to control foobar2000 using my Google Home Mini by going thru IFTTT and Pushbullet

I configured Eventghost, the Pushbullet plugin, Pushbullet and IFTTT.
Event ghost 0.4.1r1722 and Pushbullet plugin 0.2.20

Doing simple testing first, I have a problem where any Pushbullet Note or Link send true IFTTT doesnt work because I dont see any "Action" (PUSHBULLET.NOTE.* ) available when its IFTTT the sender. Any trigger in IFTTT is causing this problem, if its going tru IFTTT I dont have an action availabe for it. I see that EG receive the Pushbullet note when I put log level to 5, but no action.

Here is my log :

Code: Select all

17:26:42   ---> Welcome to EventGhost <---
17:26:51   PushBullet.WebSocketClosed
17:26:53   PushBullet: Email address obtained
17:26:53   PushBullet: Devices received: [{u'iden': u'ujAEc0DdCp2sjAaILdXEiq', u'icon': u'system', u'created': 1549230967.3364449, u'nickname': u'EventGhost-MediaKam', u'modified': 1549230967.3364489, u'active': True, u'model': u'plugin by Pako', u'app_version': 220, u'type': u'stream', u'kind': u'stream', u'pushable': True, u'manufacturer': u'EventGhost'}, {u'iden': u'ujAEc0DdCp2sjz9quKN0eW', u'icon': u'desktop', u'created': 1549219791.460644, u'nickname': u'KAMPC', u'modified': 1549219791.460649, u'fingerprint': u'{"cpu":"AMD64 Family 23 Model 1 Stepping 1, AuthenticAMD","computer_name":"KAMPC"}', u'active': True, u'remote_files': u'disabled', u'model': u'Windows 10 Home', u'app_version': 396, u'type': u'windows', u'kind': u'windows', u'pushable': True, u'manufacturer': u'Microsoft'}]
17:26:54   PushBullet: Friends received: []
17:26:54   PushBullet: Channels received: []
17:26:54   PushBullet: Targets derived: [(u'EventGhost-MediaKam', u'ujAEc0DdCp2sjAaILdXEiq', 'pc'), (u'KAMPC', u'ujAEc0DdCp2sjz9quKN0eW', 'pc')]
17:26:54   PushBullet: Adding push messaging listener
17:26:54   PushBullet.WebSocketOpened
17:26:54   PushBullet.InternetConnection.Restored
17:26:54   PushBullet: modified_after updated: 1549232285.1083930
17:26:54   PushBullet: WebSocket message: {u'type': u'nop'}
17:27:08   PushBullet: WebSocket message: {u'subtype': u'push', u'type': u'tickle'}
17:27:08   PushBullet: Getting pushes, modified_after = 1549232285.1083930
17:27:08   PushBullet: Response = {u'chats': [], u'blocks': [], u'pushes': [{u'body': u'Start', u'iden': u'ujAEc0DdCp2sjz1Mck4hbg', u'created': 1549232829.275233, u'sender_name': u'[b][size=150]IFTTT[/size][/b]', u'awake_app_guids': [u'web-tbmc1og9qgog3jkneht6g4'], u'title': u'Google Voice Simple Commands', u'direction': u'incoming', u'modified': 1549232829.2962189, u'dismissed': True, u'client_iden': u'udprOCjAgjoR6nAG', u'receiver_email': u'EMAILREMOVED', u'active': True, u'receiver_iden': u'ujAEc0DdCp2', u'type': u'note', u'receiver_email_normalized': u'EMAILREMOVED'}], u'contacts': [], u'clients': [], u'devices': [], u'channels': [], u'texts': [], u'grants': [], u'accounts': [], u'profiles': [], u'subscriptions': []}


Here is another log where I sent a note with the Pushbullet Windows Application direclty to the devices. You can see that I get a action and my trigger is working.

Code: Select all

17:29:01   PushBullet: WebSocket message: {u'subtype': u'push', u'type': u'tickle'}
17:29:01   PushBullet: Getting pushes, modified_after = 1549232285.1083930
17:29:01   PushBullet: Response = {u'chats': [], u'blocks': [], u'pushes': [{u'body': u'test', u'iden': u'ujAEc0DdCp2sjAnTyBUWfk', u'sender_iden': u'ujAEc0DdCp2', u'created': 1549232942.9006331, u'sender_name': u'[b][size=150]J-p C[/size][/b]', u'awake_app_guids': [u'ujAEc0DdCp2sjz9quKN0eW'], u'target_device_iden': u'ujAEc0DdCp2sjAaILdXEiq', u'direction': u'self', u'modified': 1549232942.9076428, u'dismissed': False, u'sender_email_normalized': u'EMAILREMOVED', u'receiver_email': u'EMAILREMOVED', u'source_device_iden': u'ujAEc0DdCp2sjz9quKN0eW', u'sender_email': u'EMAILREMOVED', u'active': True, u'receiver_iden': u'ujAEc0DdCp2', u'guid': u'3d5ad411-db37-4fb3-8729-1901801e3132', u'type': u'note', u'receiver_email_normalized': u'EMAILREMOVED'}, {u'body': u'Start', u'iden': u'ujAEc0DdCp2sjz1Mck4hbg', u'created': 1549232829.275233, u'sender_name': u'IFTTT', u'awake_app_guids': [u'web-tbmc1og9qgog3jkneht6g4'], u'title': u'Google Voice Simple Commands', u'direction': u'incoming', u'modified': 1549232829.2962189, u'dismissed': True, u'client_iden': u'udprOCjAgjoR6nAG', u'receiver_email': u'EMAILREMOVED', u'active': True, u'receiver_iden': u'ujAEc0DdCp2', u'type': u'note', u'receiver_email_normalized': u'EMAILREMOVED'}], u'contacts': [], u'clients': [], u'devices': [], u'channels': [], u'texts': [], u'grants': [], u'accounts': [], u'profiles': [], u'subscriptions': []}
17:29:01   PushBullet: modified_after updated: 1549232942.9076428
17:29:01   [b][size=150]PushBullet.Note.Test[/size][/b] [u'test', None, u'ujAEc0DdCp2sjAnTyBUWfk', u'KAMPC', '2019-02-03 17:29:02']
17:29:01      Foobar2000: Run
17:29:01         Foobar2000: Run
I dont know what Im not doing correctly, please help. Thanks!

Re: PushBullet plugin (Pako)

Posted: Fri Mar 01, 2019 8:49 pm
by Kameleau
Any one?