Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: json Interface to Blue Iris Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: June 19 2013 at 08:00 | IP Logged Quote GadgetGuy

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 . . .
Code:
C:\powerhome\phwmcmd.exe


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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
lizaoreo
Groupie
Groupie


Joined: February 11 2013
Location: United States
Online Status: Offline
Posts: 74
Posted: July 18 2013 at 14:55 | IP Logged Quote lizaoreo

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 View lizaoreo's Profile Search for other posts by lizaoreo
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: July 18 2013 at 15:48 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4126
Posted: July 18 2013 at 19:34 | IP Logged Quote dhoward

Test message: Test link
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2815
Posted: July 18 2013 at 19:56 | IP Logged Quote TonyNo

In Firefox, you can select the URL, right click, and then select Open Link or Save Target As. ;)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
lizaoreo
Groupie
Groupie


Joined: February 11 2013
Location: United States
Online Status: Offline
Posts: 74
Posted: July 18 2013 at 20:00 | IP Logged Quote lizaoreo

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 View lizaoreo's Profile Search for other posts by lizaoreo
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: July 18 2013 at 20:12 | IP Logged Quote GadgetGuy

dhoward wrote:
Test message: home.com">Test link


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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: July 25 2013 at 18:02 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
heatvent
Newbie
Newbie


Joined: October 28 2007
Location: United States
Online Status: Offline
Posts: 2
Posted: July 10 2014 at 10:50 | IP Logged Quote heatvent

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 View heatvent's Profile Search for other posts by heatvent
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4126
Posted: July 10 2014 at 12:06 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: July 10 2014 at 15:04 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: July 10 2014 at 15:19 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
MrGibbage
Super User
Super User
Avatar

Joined: October 23 2006
Location: United States
Online Status: Offline
Posts: 506
Posted: April 04 2017 at 18:51 | IP Logged Quote MrGibbage

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 View MrGibbage's Profile Search for other posts by MrGibbage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: April 05 2017 at 06:59 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
nick7920
Senior Member
Senior Member


Joined: March 04 2008
Location: United States
Online Status: Offline
Posts: 184
Posted: April 08 2017 at 16:34 | IP Logged Quote nick7920

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 View nick7920's Profile Search for other posts by nick7920
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: September 08 2017 at 06:02 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
elmerbug
Newbie
Newbie


Joined: November 12 2017
Location: United States
Online Status: Offline
Posts: 1
Posted: November 12 2017 at 13:31 | IP Logged Quote elmerbug

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 View elmerbug's Profile Search for other posts by elmerbug
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4126
Posted: November 13 2017 at 12:24 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: November 13 2017 at 12:43 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 779
Posted: November 13 2017 at 12:59 | IP Logged Quote GadgetGuy

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 View GadgetGuy's Profile Search for other posts by GadgetGuy
 

Page of 2 Next >>
  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum