[ST Edge] Breaking boundaries: supporting Blue Iris motion alerts and Shelly wifi Motion Sensors

I have updated all three of my drivers that take advantage of my edgebridge app and all three are now available on my shared projects channel.

This update is intended to improve driver startup issues that have been recently reported .

If you had previously installed these drivers from my test channel, please be sure to switch over to my shared projects channel so your hub receives the updates.

To summarize the three drivers:

LAN Motion - enables any app on your LAN to send an http message to control a SmartThings motion device state (version 2022-08-24T01:24:40.024036401)

  • example: Blue Iris motion alerts / Shelly wifi motion sensors

LAN Presence - enables any app on your LAN to send an http message to control a SmartThings presence sensor device state (version 2022-08-19T23:29:46.548695725)

  • example: phone presence tracking or pinged device tracking

LAN Trigger - enables any app on your LAN to send an http message to trigger a SmartThings button device for purposes of triggering an automation (version 2022-08-24T00:53:30.342837124)

Each of these drivers requires my edgebridge app to be running on an always-on computer on your home network

1 Like

Thank you Tod! I greatly appreciate the call out with your two channels. I had not paid close attention previously and it was a good exercise to migrate.

Thanks again for all your work!

Edit: is there any way to use the LAN device monitor for the edgebridge server? It’s on a Windows 10 machine. I tried some basic research but can’t figure out how without UUID.

1 Like

Are updates pushed automatically or do I need to uninstall and reinstall the driver’s?
Issue returned for me with empty registration file

If your driver’s version matches my screen shot below, then yes it updated automatically (and as expected).

I mentioned this earlier in the thread but a reboot of the hub has fixed this issue for me in the past 100% of time.

I hope that helps!

Looking for a link with info or help on anyway possible to make use of this to trigger blueiris profile/schedule changes from Smartthings. Similar to blueiris fusion syncing smartthings modes to blueiris profiles.

What kind of API is needed to trigger Blueiris? Does it accept HTTP-type requests? If so, my webrequestor driver might be useful for that.

I’m not familiar enough to say really. I know it was possible with the blueiris fusion app. I’ve also been searching and found mention of some sort of JSON interface you can run admin commands to blueiris through.
Blueiris has geofencing but it’s hit and miss for me. Why I’m looking to integrate that portion into smartthigns somehow. By the way, your lan motion driver and the bridge server work great! Thanks for that!

Yes, webrequestor works great for it.
Note, I’m no longer using this method to change my modes, but BI does respond to http commands. See the link where I discussed it’s use. The blue iris help file is key - it lays out all the commands quite nicely.

Thanks! This helped a lot. I ended up figuring out how to “whitelist” the smartthings hub which I have set on a fixed IP address within blueiris to allow webrequestor to send admin commands. This allowed me not to have to disable the “use secure session keys” option in blueiris.
Web requestor is now successfully changing blueiris schedules for me. Thank you!

2 Likes

Could you say what you did to whitelist? I was never able to get it to work right and would certainly prefer to, even without a port open.

Found it in the help file
In the list of “Limit IP addresses” counterintuitively it’s used to limit and grant.
If you use the “^” symbol followed by the IPaddress of your choosing it will grant it access without authentication.
So I used that with the IP of my hub.
“^192.168.xxx.yyy”

1 Like

Hi, just signed up to reply here.

I first tried out your vEdgecreator, awesome, then went ahead with BlueIris and link triggers to presence sensors, also awesome.
But then I fiddled a bit with my network, new router and things. Since I was still trying things out, disabled all your devices and closed the bridge.

Now everything is up and running how I wanted to, I try to open the bridge (Win10), it opens a window, stuff happens within a second and it closes.

I tried downloading again and the deleting the files, but it does the same every time. Any idea/help?

I ran it in command prompt, this is what it says:

O/s = Windows
INFO: No existing registration
Traceback (most recent call last):
File "“edgebridge.py”, line 444, in
File “socketserver.py”, line 452, in init
File “http\server.py”, line 138, in server_bind
File “socketserver.py”, line 466, in server_bind
OSError: [WinError 10013] (this part is in Dutch, so loosely translated:) there was an attempt to access a socket in a way accesprotocols do not allow [5700] Failed to execute script ‘edgebridge’ due to unhandled exception!

Is there any clearance I need to re-enable? The changes to my network was mainly adding a TP-link ER605 VPN router behind my isp router, but with its own wan address. There were no changes on the pc.

Sorry guys, fixed it with some googling.

This happens when another service/app is using the same port. With a little bit of searching I found Java is listening at the same port and was blocking it. Shut down Java for a bit and it went up and running again!

Edit: that breaks the Omada software controller, shoot :sweat_smile:

Already a master of edits:
I’m a full on networking noob. I read I can change the ports Omada uses for login and software controlling and those are indeed at 8043 and 8088. So guess that’s the conflict.

Now a question going a bit off topic now, does it matter what I change it to, as long as I know of course? Like 8243 and 8288?

Hi- glad you figured that out. I’d like to see if I can capture that error in the app and give a more useful error message, but I’ll have to see. Your error message is helpful towards that end so thank you.

You can use the edgebridge configuration file to change the port it uses. It doesn’t care what you use. Just remember to update your SmartThings device preferences settings to reflect the new port number.

EDIT: From the readme file on github:


Configuration file (optional)

If you want to change the default port number of the server (8088), you can do so by creating a configuration file which will be read when the server is started. This config file can also be used to provide your SmartThings Bearer Token if you plan to do any SmartThings API calls. The format of the file is as follows:

[config]
Server_Port = nnnnn
SmartThings_Bearer_Token = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

This configuration file is optional.


1 Like

All - I’ve created a new, separate topic specifically for the Edgebridge application, since it wasn’t obvious that this topic was covering it! Please post your comments regarding edgebridge there.

Thank you.

@TAustin I had a few questions on how to set this up for Blue Iris.

  1. I’ve got Blue Iris set to start as a service. What do I need to do to get the Forwarding Bridge Server to also run automatically (even if a user isn’t logged on to the PC)? I’ve tried adding a shortcut to my Startup, but that seems to only run after I log in.
  2. What visibility is needed between the SmartThings hub and the Blue Iris machine on the LAN. At the moment, I have the ST hub in an IoT VLAN and the Blue Iris machine in a Server VLAN. Both have internet access and the Server LAN can talk to the IoT VLAN. The IoT VLAN isn’t allowed to access the Server LAN (except if contacted first). Should this matter?
  3. I’ve added the LAN Motion edge driver and did a scan. I can see a LAN Motion Device but currently the ‘Driver’ is showing as grayed out. I did enroll and select the driver correctly. Do I need to wait?
  4. In the LAN Motion device settings, I’ve set the LAN Device Address and the Bridge Address to the same IP (of the BI server). But I’m being told it is offline. I’m seeing no activity in the console or log.

It depends what platform you are using, but if you happen to have a Raspberry Pi, I have posted some instructions for how to do this in the edgebridge readme.

The hub and Blue iris won’t talk directly to each other - only through edgebridge. So it may matter what VLAN you have edgebridge running on. It needs to be able to receive http requests from Blue Iris, and forward those to the hub. The hub also needs to be able to initiate http requests directly to edgebridge.

It will be until it can establish a link with edgebridge server.

They will need to have unique port numbers, right?

I’m running the ‘edgebridge.exe’ on the Blue Iris server (Windows 10).

As for the talking back and forth, the Blue Iris / Edge Bridge PC can talk to the VLAN with the ST Hub. Currently the opposite isn’t true because the IoT VLAN is isolated from seeing the rest of the LAN. It sounds like I’ll need to make some firewall changes.

As for the LAN Device Address, it was just the IP without a port for the Blue Iris machine. And the port number for the Bridge is the same IP, but with port 8088.

OK, that’s why your SmartThings LAN Motion device isn’t able to talk to edgebridge and its greyed-out. Once you make your network changes, then things should work. It’s ok to leave the port number off your LAN Device Address in settings for now.

I’m a little rusty on how to autostart things on Windows. I’m sure a Google search will tell you want you need to do. Just be sure that whatever mechanism you use, that you are able to specify the “working directory” so that edgebridge can find its configuration file.

For the edge bridge startup on windows, I had good luck using NonSucking Service Manager (NSSM). It is a light weight standalone executable that will turn an exe into a windows service. Then you can manage the service in windows to start at boot, with the benefit of being able to restart if it crashes.

1 Like