Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

PushBullet plugin to send a .JPG file from command line?

Questions and comments specific to a particular plugin should go here.
Post Reply
seandudley
Posts: 8
Joined: Wed Mar 18, 2015 1:55 pm

PushBullet plugin to send a .JPG file from command line?

Post by seandudley »

Hi,
I am new to EventGhost. I downloaded it because I need to be able to push .JPG images from the command line with PushBullet, but it doesn't seem very clear how to do it. I've installed EventGhost and the PushBullet plugin. I have the PlugIn installed in EventGhost. Could someone please give me details on how I need to proceed?

Thanks.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: PushBullet plugin to send a .JPG file from command line?

Post by Pako »

Here's how:
1) I assume you have installed and functional plugin (entered API key).
2) You must create a new macro (here is a Short Manual and an article Controlling your living room with EventGhost. It is helpful to read).
From PushBullet plugin, select the action "Push"
3) Opens the configuration dialog. There, select the target, optionally enter a message text, and in File: box type {eg.event.payload[0]}
4) Add an event to the macro. The second part of the name, you can choose yourself. I will assume that the event will be called "Main.PushPicture"
5) All confirm and save the configuration of EventGhost (File -> Save As ...), the name you choose.
That's it.

Assume that you will want to send the file "D:\Data\MyPicture.jpg".
Command line looks like this:

Code: Select all

"C:\Program files (x86)\EventGhost\EventGhost.exe" -e PushPicture D:\Data\MyPicture.jpg
Pako
Attachments
PushPicture_01.png
PushPicture_01.png (3.38 KiB) Viewed 3417 times
PushPicture_02.png
seandudley
Posts: 8
Joined: Wed Mar 18, 2015 1:55 pm

Re: PushBullet plugin to send a .JPG file from command line?

Post by seandudley »

Great, thank you so much for the instructions, and for developing the plugin.
seandudley
Posts: 8
Joined: Wed Mar 18, 2015 1:55 pm

Re: PushBullet plugin to send a .JPG file from command line?

Post by seandudley »

I got all of this working, thanks. I have run into a very weird problem, though, and thought I'd ask if anyone has any ideas. What I am doing is sending a push to my phone when motion is detected by Blue Iris software. I have written the batch file, written the code in Tasker on the Android side, everything works fine, with one big exception. If BlueIris is the one who calls the batch file, as soon as EventGhost gets called, the batch file window locks up hard and the command never executes. IÔÇÖve tried using alternative 3rd party command prompts instead of the Windows one, which didnÔÇÖt help, still locks up. I tried compiling the batch file to an EXE file, still locks up. If I try to just run EventGhost.exe without any of the command line parameters that it is being passed, it still locks up. I've tried having the batch file that BlueIris calls spawn another batch file, and that batch file is the one that does everything, still locks up. I canÔÇÖt even fathom how it is that BlueIris calling the batch file causes it to lock up, but if I type in, ÔÇ£cmd /c c:\camera-alerts\driveway.batÔÇØ or just ÔÇ£c:\camera-alerts\driveway.batÔÇØ from the run command in Windows, it works just fine. If I open a command prompt and run it from there, it runs just fine, too.

Any ideas?
seandudley
Posts: 8
Joined: Wed Mar 18, 2015 1:55 pm

Re: PushBullet plugin to send a .JPG file from command line?

Post by seandudley »

I've determined that EventGhost hangs if it is in a batch file that is called from Blue Iris, but not otherwise. If the batch file window is hung and I go into Task Manager and kill the EventGhost task, the batch file then continues on. So, any idea how the fact that BlueIris started the batch file that ultimately calls EventGhost could cause EventGhost to lock up?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: PushBullet plugin to send a .JPG file from command line?

Post by Pako »

I do not know what is causing the problem.
But surely it is possible to find a workaround.
For example:
The application BlueIris saves the image to a specified directory (say ALARMS).
EventGhost is distributed with the plugin Directory Watcher. You can watch folder "ALARMS".
If in folder ALARMS will appear new file, EventGhost sends it via PushBullet plugin.
Then, the file may be deleted or moved elsewhere.

Pako
seandudley
Posts: 8
Joined: Wed Mar 18, 2015 1:55 pm

Re: PushBullet plugin to send a .JPG file from command line?

Post by seandudley »

Thanks, Pako. I ended up doing something similar, I am having EventGhost watch for a program to be executed, and when it is executed am running my task. I am just using the DOS mode command as my trigger, and have renamed it to different names based on what I'm wanting to run. It just pops up quickly with syntax info and then closes which then launches the task.
Post Reply