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

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

That’s what I also found! :grinning:

Okay, I’ve placed Blue Iris and SmartThings in the same VLAN so they see each other. SmartThings has a static IP of #.#.#.10. Blue Iris has a static IP of #.#.#.11 and is running edgebridge as a service using NSSM. In the log, I saw the SmartThings hub at #.#.#.10 get correctly registered to edgebridge.

When a person is detected at the doorway, I send an email and then a separate http request to #.#.#.11:8088/doorway/motion/active. The email goes through. And the http request generates the message “Forwarding to SmartThings hub” in the edgebridge.log.

In the LAN Motion Device, I’ve got auto-revert enabled with a delay of 5. the LAN device name is doorway. The LAN Device Address is #.#.#.11 and the Bridge Address is #.#.#.11:8088.

So everything seems correct but I never get any motion events on the device or in the history. Any idea what is going on and what I can do to diagnose this further?

It sounds like you have everything right from what you described.

The next thing I would check is the driver logs to confirm if the messages are being received from edgebridge and if there are any problems. Do you have the CLI? If not would it be possible for you to install it on a computer. A windows laptop is easiest - here is the link for the .msi file to download and install it. There are other files for Linux or Mac.

Let me know once you have it. What you’ll want to do is use the CLI to start logging with this command:

smartthings edge:drivers:logcat

You’ll choose your hub and driver when prompted. Once logging is running, try to initiate another message and see what you get. If you paste the log here, please surround the log text with triple backquotes (```) for best formatting.

It looks like it’s not actually getting registered. I thought I saw it in the log once. Hmm…

2022-10-07T01:13:32.412758686+00:00 WARN LAN Motion Device Driver  Valid Bridge server address not configured
2022-10-07T01:13:32.419213352+00:00 ERROR LAN Motion Device Driver  Registration with Bridge Server failed for  LAN Motion Device
2022-10-07T01:13:32.427616352+00:00 INFO LAN Motion Device Driver  Scheduling registration retry
2022-10-07T01:13:32.438922352+00:00 DEBUG LAN Motion Device Driver  driver device thread event handled
2022-10-07T01:13:32.446663352+00:00 DEBUG LAN Motion Device Driver  driver device thread event handled

Paste in a screenshot of your device settings.

Any chance there is an inadvertent extra space at the end if the bridge address?

Try changing it to something else and then back again. You may need to do the same to the device address to force the driver to try a reconnect.

No spaces, but I changed them and then changed them back. Same messages in the log.