Author |
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: June 19 2013 at 08:00 | IP Logged
|
|
|
I have created a VB .Net program to control the Blue Iris Video Security and Webcam program (BI).
BI uses the json (JavaScript Object Notation) interface to allow control of cameras from external programs (such as powerhome).
This allows you to PTZ a camera or start/stop recording, etc based on conditions within PH.
For instance, when I start the home theater up, I disable the Triggering on the camera in that room, otherwise it triggers on motion on the big screen.
If anyone is interested, I will post the raw code in the Repository and an executable (the executable is designed for general use so should work all by itself).
This program, used in conjunction with the "phwmcmd.exe" located in the powerhome program folder, allows full two-way interaction between Blue Iris (motion trigger alerts>ph) and PowerHome (control commands>BI)
The BI Alert notification to PH would look like . . .
And calls from PH to BI look like . . .
Code:
ph_run("C:\powerhome\jsonBI.exe login, http://192.168.1.90:8080/json, keb, 00123Q; ThtrCam pause -1") |
|
|
where you provide the IP address of the BI running process along with the login and pw and one, or more, control commands. In the example above to cause the ThtrCam to go into "pause" mode so it doesn't trigger.
I embed that formula in the PH macro that controls the Theater scene.
Holler, if interested; else I won't clutter up the forum with unnecessary posts.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
lizaoreo Groupie
Joined: February 11 2013 Location: United States
Online Status: Offline Posts: 75
|
Posted: July 18 2013 at 14:55 | IP Logged
|
|
|
I'd be interested in seeing what you have going on :) I've
recently installed a RadioThermostat thermostat and it can
be controlled using JSON commands. I'm planning on just
using CURL probably, but I'd love to see how your app
works.
Aside from that interest, I've got a camera I'm trying to
find the time to install watching my driveway and I'd like
to interface with PH via BI the way you have, with my own
personal tweaks of course ;)
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 18 2013 at 15:48 | IP Logged
|
|
|
lizaoreo -
Your timing was perfect.
This morning I've just released v2.0 of my efforts to the
Blue Iris Forum download section.
Since it ties in with my PH efforts, I was planning to
post it here in the PH Forum, but I discovered that the
Forum not only no longer allows image uploads, it does
not support file uploads either
So, I guess the only alternative is to post a link to my
DropBox and let everyone get everything from there. I
just hate to make that a final solution due to permanence
issues.
Here is a link to the software collection >>>
**LINK THAT WAS HERE IS NO LONGER FUNCTIONAL. SEE
UPDATE NOTE BELOW.
(Apparently the Forum doesn't support links anymore
either so I can't post a link you can click on.)
You'll just have to copy and paste the above.
This ZIP file contains the Windows jsonBI.exe executable,
the VB .Net 4.5 raw code, and a User Guide.
Hope this is helpful.
======
UPDATE: Thanks to the efforts of Dave Howard, we have
found a permanent home for the "jsonBI" application code
and documentation that supports the JSON interface
control of the Blue Iris Security & Video Camera
Monitoring program.
It can now be found here . . .
http://www.power-home.com/download/ken/jsonBI-v2.0.0.zip
This ZIP file includes the raw VB .Net 4.5 code, the
Windows Executable, and a User Guide.
Edited by GadgetGuy - January 19 2014 at 06:53
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: July 18 2013 at 19:34 | IP Logged
|
|
|
Test message: Test link
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: July 18 2013 at 19:56 | IP Logged
|
|
|
In Firefox, you can select the URL, right click, and then select Open Link or Save Target As. ;)
|
Back to Top |
|
|
lizaoreo Groupie
Joined: February 11 2013 Location: United States
Online Status: Offline Posts: 75
|
Posted: July 18 2013 at 20:00 | IP Logged
|
|
|
Cool, thanks Ken.
For redundancy :)
https://www.dropbox.com/s/2hmtrklb95gmccw/jasonBI.zip
I use SkyDrive now, so my DropBox never gets messed with, shouldn't have to worry about anything happening to it there, at least until DropBox starts purging inactive accounts.
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 18 2013 at 20:12 | IP Logged
|
|
|
Ha. Don't know what to say except when I tried the 4th
icon (hyperLink) over on the tool bar what got posted was
just the raw markup code and not a real link.
When I just tried it now, it worked!
Go figure.
Thanks for checking it out, though.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 25 2013 at 18:02 | IP Logged
|
|
|
Thanks to the efforts of Dave Howard, we have found a permanent home for the "jsonBI" application code and documentation that supports the JSON interface control of the Blue Iris Security & Video Camera Monitoring program.
It can now be found here . . .
http://www.power-home.com/download/ken/jsonBI-v2.0.0.zip
This ZIP file includes the raw VB .Net 4.5 code, the Windows Executable, and a User Guide.
Edited by GadgetGuy - July 25 2013 at 18:07
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
heatvent Newbie
Joined: October 28 2007 Location: United States
Online Status: Offline Posts: 2
|
Posted: July 10 2014 at 10:50 | IP Logged
|
|
|
GadgetGuy wrote:
Thanks to the efforts of Dave Howard, we have found a permanent home for the "jsonBI" application code and documentation that supports the JSON interface control of the Blue Iris Security & Video Camera Monitoring program.
It can now be found here . . .
http://www.power-home.com/download/ken/jsonBI-v2.0.0.zip
This ZIP file includes the raw VB .Net 4.5 code, the Windows Executable, and a User Guide. |
|
|
Is this still available?
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: July 10 2014 at 12:06 | IP Logged
|
|
|
All,
I just checked this out and it appears that Ken has updated the code to version 2.2.2. The correct link is:http://www.power-home.com/download/ken/jsonBI-v2.2.2.zip
Hope this helps,
Dave.
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 10 2014 at 15:04 | IP Logged
|
|
|
Contents deleted due to content bug.
See next entry.
Edited by GadgetGuy - July 10 2014 at 15:20
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: July 10 2014 at 15:19 | IP Logged
|
|
|
Thanks Dave-
Your help is much appreciated.
Unfortunately, I have been a very bad boy, and have not
kept these links up-to-date.
It turns out that there is yet a newer release that addds
capabilities and fixes some bugs.
It can be found at...
jsonBI-2.2.3.zip
I will replace the old link files, with a message to see
the newest link.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
MrGibbage Super User
Joined: October 23 2006 Location: United States
Online Status: Offline Posts: 513
|
Posted: April 04 2017 at 18:51 | IP Logged
|
|
|
Ken, is this still your latest code? I haven't
downloaded it yet, but it might be just what I am
looking for. Right now the project I am working on is to
have PH query BI to grab a jpg from a camera (based on a
PH trigger). Do you think I will be able to do that with
your code?
__________________ Skip
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: April 05 2017 at 06:59 | IP Logged
|
|
|
Skip -
the 2.2.3 version is the final version and has had no
updates in several years.
It is quite comprehensive but has only been used (by
me) with Foscam video cameras, so the syntax is Foscam
oriented.
But, that said the ZIP file contains documentation and
the original VB source code so you can modify things
to fit your specific needs, if necessary.
I would expect this all to work in any Jason
environment, as syntax changes are easy to modify, it
is the communications drivers that tie everything into
PH that were the hard part.
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
nick7920 Senior Member
Joined: March 04 2008 Location: United States
Online Status: Offline Posts: 193
|
Posted: April 08 2017 at 16:34 | IP Logged
|
|
|
I have not tried Ken's code, one of these day for sure,
but just in case if you need quick and simple and have
foscam most other web camera also allow's web access and
have command to save picture)
I have foscam and use directly from Ph to send me the
snap on condition thru PH condition .
this is my CAM_FRONT variable
http://x.x.x.x:88/cgi-bin/CGIProxy.fcgi?
cmd=snapPicture2&usr=myuser&pwd=mypassword
in my macro
ph_saveurl("
{CAM_FRONT}","c:\powerhome\web\IPsnapshot_cur
.jpg",6)
then I email this IPsnapshot_cur.jpg to me.
I also have blue iris but have not created the
connection, if I need detail I just log into blue iris
app and check it out.
Edit Ph_saveurl had missing bracket corrected.
Nick
Edited by nick7920 - April 08 2017 at 19:19
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: September 08 2017 at 06:02 | IP Logged
|
|
|
richard -
Not clear what Link you are seeking. The one from
gadgetGuy (link is about 5 posts above this one) or
whatever Nick is referring to?
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
elmerbug Newbie
Joined: November 12 2017 Location: United States
Online Status: Offline Posts: 1
|
Posted: November 12 2017 at 13:31 | IP Logged
|
|
|
All, I have installed the jsonbi executable and am now
testing it using Windows PowerShell. The result I get
in the logfile (biRtnCodes.txt) is "result fail". I
expected a session id. What am I missing?
Thanks in advance.
Edited by elmerbug - November 12 2017 at 13:33
__________________ Don
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 13 2017 at 12:24 | IP Logged
|
|
|
Don,
Ive never had a chance to play with Ken's Blue Iris JSON interface so cant really provide much info. But until Ken is able to respond,
the only thing I can suggest, based upon reading his release notes, is Blue Iris and PowerHome installed on the same machine?
Dave.
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: November 13 2017 at 12:43 | IP Logged
|
|
|
Dave-
Many thanks for jumping in there. I got tied up on other tasks this morning and was long delayed in getting back to the Forum.
Don-
It has been years since I wrote the BI code, but the PH archive should have ALL of my code in it, including the raw VB source code.
Perhaps you can check in that file to see what triggers a "result fail" error comment.
I will also look, as see if any of the effort comes back to mind.
[:-)}
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|
GadgetGuy Super User
Joined: June 01 2008 Location: United States
Online Status: Offline Posts: 942
|
Posted: November 13 2017 at 12:59 | IP Logged
|
|
|
Don-
Checking I see the following error code comment in my source code...
"Login malformed. Address must start with http:// and end with /json and there must be a user ID and password.")
An example of a correctly formed json cmmd would be...
jsonBI.exe login http://192.168.1.90:8080/json keb qwert1234; camconfig pause ThtrCam -1; ptz, DrvCam, 5; status
Are you following that syntax? Especially with regard to the login and pw?
ken b
__________________ Ken B - Live every day like it's your last. Eventually, you'll get it right!
|
Back to Top |
|
|