[OBSOLETE] BI Fusion v3.0 - Adds: Blue Iris Device Type Handler, Blue Iris Camera DTH, Motion Sensing

I got you PM with the logs, but also got super busy, I’ll take a look soon hopefully. Regarding the mode missing a BI Profile, that’s probably gonna through some errors, namely the one you posted earlier where it said it was null. Can you copy one profile to another and link the mode to that profile? That could solve some or all of your spurious errors.

All modes now are assigned a unique profile # and still get the same errors.

I posted a new Trigger app beta in github. I didn’t update the version numbers so I wouldn’t spam folks with a potentially buggy app. But it should fix the issues with setting up triggers using presets while using “select from list.” Should also fix issues where the camera would only move slightly and then return when using a “return to” preset. lemme know how it goes.

I’m extremely busy with moving right now, so please bear with me, responses are bound to be slow.

I tried the new trigger app, and here are my results. First, it seems you have fixed the choose camera from list option. I was able to use it to create and save a trigger without throwing an error. However, the option to return to previous preset after trigger still does not work, and I get 2 different results, depending on which camera selection method I use to set up the trigger.

When I set up a new trigger using the “choose from list” option, and select for the ptz to return to previous preset, I get the following result when I perform the trigger: 1.THe camera moves to new position, but No recording takes place. 2. The camera does not attempt to return to the home preset. The log entry below is generated at initial trigger.

6a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#plus.
Cannot resolve which method to invoke for [null] due to overlapping prototypes between:
[class java.lang.Character]
[class java.lang.String]
[class java.lang.Number] @line 310 (returnPresetLocalAction)
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: info Moving PTZ to back to preset null
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: debug GET /cam/PTZ/pos=13&user=Gary&pw=Bassman2 HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.0.27:81

66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: info Moving PTZ to preset 6
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: debug processName is Moving and Triggering
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: info Event occured within the desired timing conditions, sending commands
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎06‎:‎42‎ ‎PM: debug processed event switch from device Boat Charger Switch with value on and data {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#00A0DC"}}

Then if I switch off the option to have camera return to original preset, the trigger seems to work as it should, recording and moving to the triggered preset.

Then if I create the same trigger by typing the camera short name, I get a slightly different result. 1. When triggered, the camera moves slightly, then right back to original position, with recording activated. The log entry is:

66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎22‎:‎39‎ ‎PM: debug processName is Moving and Triggering
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎22‎:‎39‎ ‎PM: info Event occured within the desired timing conditions, sending commands
66a5eac6-6c7b-46bb-b6d2-f5f93d4db6bb ‎7‎:‎22‎:‎39‎ ‎PM: debug processed event switch from device Boat Charger Switch with value on and data {“microDeviceTile”:{“type”:“standard”,“icon”:“st.switches.switch.on”,“backgroundColor”:"#00A0DC"}}

Then if I switch off the return to original position option, the trigger seems to operate as it should.

Hope these comments aid in your development. Thanks for the good work.

Hey thanks @garhun for the quick, solid feedback! I found another big bug in the preset code (I don’t have any PTZ cameras, so I can’t really test them). New beta is in github, please give it a try and let me know.

Also, looking at the logs there seems like a setting may be wrong, or there’s a problem in the app elsewhere. Specifically:

The " Moving PTZ to preset 6" and the “Moving PTZ to back to preset null” are at the same time, but the second one should be waiting the “Wait period (seconds) before returning to original preset” time. Part of that code is what I fixed, so it could be me, but just confirm you have at least 5-10 seconds in there or something.

The other one is actually where it said it’s moving back to “preset null.” You put a number in there correct? It should say what preset number, not null. Is ‘0’ an option in Blue Iris for presets? if you put in zero it’d give null, which would cause that error. Let me know if I need to make it handle 0 please, I thought they started with 1.

If you don’t mind, can you test both selecting the camera from the list and also just typing it in, and provide the feedback and logs as you did again? Also, if you could try selecting more than one from the list in a third trial, that’d cover everything for local control anyway. Thanks for your help!

Hi jmz,

I set the return preset to 1. The goto preset at Trigger is position 6. And I am putting 15 seconds as the wait time for return. I’ll get back to you later with the new tests.

Ps. The presets in BI start with 1.

Here is the result of the latest test of the Tigger app in trying to get the ptz to return to a preset after trigger.
First, I set up the trigger using the typing of short name to select the camera. I set the trigger to move to preset 6, then return to preset 1 after 10 seconds, using a switch turning on to trigger from. The camera moved to preset 6 and began recording, but did not return as hoped for. Here is a screen snip from the log for the Trigger:

Good luck. I look forward to testing the next update.

I then rebuilt the same trigger using the Select From List option, and got pretty much the same result. ANd here is the Screen Snip of the log for that trigger:

I then selected 3 cameras at the same time to trigger off a switch with no ptz positioning selections, and the trigger seemed to work fine.

Thanks for the info and the test results! I’ll dig into it over the next few days hopefully and let you know. Looks like we made some really good progress on getting this to work as it should.

I’m looking forward to solving this last issue with your fine app. I now have all of the Bi Fusion options working correctly, accept for the return to preset function. I’m glad to do the tests, but I’m not a coder so can’t be of any help there. I appreciate your good work.

So maybe this has been tried already and I hate to sound like a broken record but I noticed in the Blue Iris camera functions there are options to setup flash media encoding or setup a windows media stream. Would it be possible to setup the cameras via that route for a live stream within the smartthings app more reliably?

Fantastic integration here, great work. I just have a small problem with the BI profile Name in the SmartApp. I’ve recently changed a profile name in BI but Smartthings doesn’t seem to be reflecting the change. Any ideas how i can get the SmartApp to update the profile names?

EDIT: Managed to get it to update by making some changes in the BI Fusion <=> Smartthings integration

1 Like

Not sure if anyone is interested, but I personally wanted a way to get a snapshot photo of all my cameras from BI. Since it appears the Device Handlers here don’t take photos, and ST won’t allow you to take multiple photos, I wrote a Device Handler which uses the index functionality of BI to do this. Can find it here:

Basically it’s a modified version of the generic video camera device handler but only takes 1 photo (which is a composite of all your cameras) and shows it. There’s no video streaming (as that would require LAN access).

The picture can be taken from anywhere as it just uses the local network to get the photo.

1 Like

Like many have posted Motion Triggers Work.
Live Video doesn’t.
I’ve seen posted that people have gotten it to work by changing resolution (and maybe frame rate).
For the people that have live video working, would you mind sharing what resolution you used to make this work?
Also is this BI 3 or BI 4?

I run my cameras at 15 FPS and 1080p resolution and they all stream live video through ST classic via BLue Iris 4.7.6.6. Although this is only the second time I’ve bothered to look at the streams there (the first was to see what function the integration provided) since you have to be connected to the same network for it to work anyway so why not just use the BI app and have more control anyway.

I do use the BI Fusion integration to let ST control the profile state for Home, Away, and Night however which works great!

1 Like

BI Fusion, BI Fusion - Trigger, and BI Server all updated! Thanks to @garhun for all your feedback and log files, I finally found the issue. Also, sorry for the delay, I moved! So I’m getting settled in and working on this stuff again. The files up uploaded in github for repository syncing.

Fixes: return to preset after trigger, custom server polling, mode and door knock based triggers, updated language in presets and minor bug fixes.

New features: added periodic notifications for when the server is offline. Technically all the preset moves are also new features now that they work… :flushed:

Note: please open up BI Fusion in smartapp settings on your phone and confirm your settings. The only one that you really need to check is the polling interval. I changed the entry type from number to a selection from a list. So if you don’t check it, it’ll just be the default 15 minutes (which is probably fine btw).

As usual, please let me know if you have any issues. I tested it all day today and think I caught all the bugs, but as those of you who’ve been around a while, I’m not perfect!!

Some overdue replies:
@rjone1, the camera streams to your Blue Iris computer cover everything you need. Are you suggesting the other options to get the stream in SmartThings? If so, the issue isn’t with Blue Iris, it’s with SmartThings. There are other device types out there that will do video, and you can install them with BI fusion too if you want the integration BI Fusion provides and the streaming. But the video support in SmartThings isn’t great, and I still strongly recommend getting the Blue Iris iOS/Android app because it’s the only thing that will give you full support for live stream, snapshots, and viewing your recorded videos and snapshots.

@audio, Glad you got it to work, anything I could make better in the app to prevent others from having the issue you had? If so, shot me the details of the issue and any suggestions and I’ll include them.

@automaton82, thanks for posting. Cool idea to use the index function. I’ll have to take a look and see if I can incorporate it (with your permission).

@ttocsr, I’ve only ever had Blue Iris v4, not sure if it’d work for v3. I don’t think it’s resolution based unless SmartThings has some limits on it, but I’m all for some troubleshooting. SmartThings doesn’t have complete video documentation, so there isn’t a lot I can do. Other options have had higher priority because the Blue Iris iOS/Android app has all the video/picture and live/recorded options that exist, and SmartThings just isn’t built to deliver it all. Plus, to see the video in SmartThings you have to open the app, navigate to the device, then tap on the video to start it, then wait for it to go. While with the Blue Iris app you just open the app and it’s all there. I’m not affiliated, but I tried the SmartThings video stream route and it sucks by comparison. Just mentioning it because I think the solution available now will be better than anything SmartThings will support even in the long term unless you use their cameras and drop Blue Iris, but I hope you get it something to work!

Yup!! (And glad it works great for you!)

@JMZ yes for sure you can use it

Morning!

Hope you can assist, I’m finally getting around to having a good play with my cam system after about 2 years hovering on my never-ending ToDo list!

Righto. I’ve managed to get it set to I can see the ‘baby monitor’ (“Willowcam”) as a device.

I have also successfully managed to create a virtual switch for testing purposes. When the switch is ‘on’, it works as a camera trigger which (Correctly) triggers the “BI CAM WILLOWCAM” to record.

I have verified this is working by sitting in front of my iris box, pressing the switch on my phone, and seeing the new clip created and the red dot showing cam is triggered.

So far so good! Can also watch the video stream via the BI CAM WILLOWCAM device on my phone and by pressing play.

My problem is that I can’t seem to use the ‘motion’ trigger’ part through smartthings. I.e. doesn’t matter what I seem to do, the left/right arrow pic always shows ‘no motion’. I’ve also tried setting a ‘notify me’ alert triggered by motion of wilowcam (in case it was possibly just the ui not updating to show it was in motion when it actually was). Nothing works! It’s doing my head in, hah.

Note that blue iris on it’s own, the actual camera, is definitely detecting motion at these points as I have it send an email alert. I just can’t get the integration to work. I’m assuming it’s something stupid I’m missing, so hoping someone may be able to shed some light.

Thanks for the app! If I can get this working I’ll be over the moon and shall doubtlessly send some beer money your way = )

Dunno if this helps, but here’s the code from the live logging…

-=edit=-
clearly I’ve got issues, because I uninstalled the lot, went from scratch, and now it seems to be working wonderfully. At work soon, so I’ll have a proper play another time and donate a beer or two. = )

-=/edit=-