Nope, still nothing.
What do you see in driver logs?
Can you post what is in the .registrations hidden file that is in your edgebridge directory?
The driver logs still say the same thing about incorrect settings.
Here’s the .registrations file. The hub address looks odd. Is that what I should be seeing?
{"devaddr": ["192.168.80.11", null], "edgeid": "e8a1xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "hubaddr": ["169.254.xxx.xxx", 34797]}
It looks like you have strange things happening with your IP addressing due to your unique network configuration.
Edgebridge is seeing a very different IP address for the hub. This is why no messages are getting to it.
Can you explain the handshake process? How does the edgebridge get to know the IP address of the ST hub?
The Edge driver on the hub initiates an HTTP Post to the edgebridge. The address that is seen by the edgebridge server application for the received HTTP message is what you’re seeing recorded in the registrations file. Both the IPV4 address and the port number of the originating source is later used to forward messages from the device application back to the Edge driver.
Okay, that gave me the idea to reboot the SmartThings hub since it seems to have gotten into limbo land with a weird IP. The registration now seems to be correct, but I’m still not getting the motion sensor to change. I’m still getting the same errors in CLI. And my test message from Blue Iris is saying, “Web: error: No stream: 12152”
{"devaddr": ["192.168.80.11", null], "edgeid": "e8a1xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "hubaddr": ["192.168.80.10", 58855]}
Do you have more than one LAN Motion device?
If your registrations file is correct then there can’t be an error happening in the driver.
You should see in the CLI log that registration was successful and then when blue iris sends a message you should see an edgebridge log showing it being forwarded to your hub and activity in the CLI log showing it received and processed.
Only one device. I’m going to try starting over by deleting the device and adding it back again.
Redone and I’m still not getting the motion alert from BI to ST to work.
The registration looks correct according to the CLI log.
2022-10-07T06:21:08.022887043+00:00 TRACE LAN Motion Device Driver Found DeviceLifecycleDispatcher handler in thisDriver
2022-10-07T06:21:08.028293043+00:00 DEBUG LAN Motion Device Driver Info changed handler invoked
2022-10-07T06:21:08.033430710+00:00 INFO LAN Motion Device Driver Bridge address changed to: 192.168.80.11:8088
2022-10-07T06:21:08.039202043+00:00 DEBUG LAN Motion Device Driver Registering: id=e8a1a0b7-32e4-4882-8d38-45a96ead543d, bridgeaddr=192.168.80.11:8088, deviceaddr=192.168.80.11
2022-10-07T06:21:08.091495377+00:00 INFO LAN Motion Device Driver Registration with Bridge Server successful
2022-10-07T06:21:08.096637710+00:00 DEBUG LAN Motion Device Driver LAN Motion Device device thread event handled
2022-10-07T06:21:09.797123378+00:00 DEBUG LAN Motion Device Driver driver device thread event handled
The .registrations file looks like this:
{"devaddr": {"192.168.80.11", null}, "edgeid": "e8a1xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "hubaddr": {"192.168.80.10", 49171}}
A test message from Blue Iris says, “Web: error: No stream: 12152” but I do see a GET request in the edgebridge.log that says:
GET request received from: ('192.168.80.11', 50072)
>>>>> Forwarding to SmartThings hub
And yet I see no status change for the device in the ST App.
Let me try checking the log from CLI again.
I’m really sorry you are having all this trouble. This is not supposed to be this difficult!! When all is said and done and you hopefully finally get this working, please make any recommendations on how I can improve this.
It’s certainly troubling that you are getting an error message on the Blue Iris side. But regardless of that you are still seeing a corresponding log message from edgebridge which appears to be forwarding the message on to the hub. At that point you should also see something in the CLI log showing a received message. If you aren’t, then the message is not reaching the hub, and I’m left wondering if this is still a networking issue.
One other thing you could do is to restart edgebridge with a ‘-d’ (‘debug’) command line parameter, which will show some more log details on the received and sent messages:
The other thing to watch for is in the CLI logs, when you initially configure the edgebridge address and the device starts connecting, there should be a log message stating that the server is started and it should show an IP:port address. This address should match whatever you see in the .registrations file for “hubaddr”.
I’m wondering if @netcsk or @Rodd62 might have any thoughts on the error you are seeing from Blue Iris.
Thanks for tagging me in. I would recommend shutting down the bridge server, deleting the registration file, then start the bridge server, then reboot via IDE the hub.
I don’t see anything in the logs that would explain the behavior other than the “hubaddr” being inaccurate.
Thanks –
I’ve followed the advice of you and @Rodd62 by deleting .registrations, restarting edgebridge in debug mode, rebooting the hub from the IDE, and starting the CLI, the registrations seem to get correctly added:
{"devaddr": ["192.168.80.11", null], "edgeid": "e8a1a0b7-32e4-4882-8d38-45a96ead543d", "hubaddr": ["192.168.80.10", 54713]}
Here’s what I see in the edgebridge console.
C:\EdgeBridge>edgebridge -d
Fri Oct 7 10:25:57 2022 INFO: No existing registrations
Fri Oct 7 10:25:57 2022 Forwarding Bridge Server v1.2221091750 (for SmartThings Edge)
Fri Oct 7 10:25:57 2022 > Serving HTTP on 192.168.80.11:8088
Fri Oct 7 10:31:03 2022 **********************************************************************************
Fri Oct 7 10:31:03 2022 POST request received from: ('192.168.80.10', 48200)
Fri Oct 7 10:31:03 2022 Endpoint: /api/register?devaddr=192.168.80.11&edgeid=e8a1a0b7-32e4-4882-8d38-45a96ead543d&hubaddr=192.168.80.10:54713
Fri Oct 7 10:31:03 2022 Request to register device at ('192.168.80.11', None)
Fri Oct 7 10:31:03 2022 Registration record ADDED
Fri Oct 7 10:31:03 2022 Response sent
Fri Oct 7 10:31:03 2022 Updated registrations: [{'devaddr': ('192.168.80.11', None), 'edgeid': 'e8a1a0b7-32e4-4882-8d38-45a96ead543d', 'hubaddr': ('192.168.80.10', 54713)}]
Fri Oct 7 10:32:18 2022 **********************************************************************************
Fri Oct 7 10:32:18 2022 GET request received from: ('192.168.80.11', 56597)
Fri Oct 7 10:32:18 2022 Endpoint: /doorway/motion/active
Fri Oct 7 10:32:18 2022 >>>>> Forwarding to SmartThings hub
----------------------------------------
Exception occurred during processing of request from ('192.168.80.11', 56597)
Traceback (most recent call last):
File "socketserver.py", line 316, in _handle_request_noblock
File "socketserver.py", line 347, in process_request
File "socketserver.py", line 360, in finish_request
File "http\server.py", line 653, in __init__
File "socketserver.py", line 720, in __init__
File "http\server.py", line 427, in handle
File "http\server.py", line 415, in handle_one_request
File "edgebridge.py", line 494, in do_GET
File "edgebridge.py", line 431, in proc_registered_requests
File "edgebridge.py", line 218, in passto_hub
TypeError: object of type 'NoneType' has no len()
----------------------------------------
Fri Oct 7 10:32:18 2022 **********************************************************************************
Fri Oct 7 10:32:18 2022 GET request received from: ('192.168.80.11', 56598)
Fri Oct 7 10:32:18 2022 Endpoint: /doorway/motion/active
Fri Oct 7 10:32:18 2022 >>>>> Forwarding to SmartThings hub
----------------------------------------
Exception occurred during processing of request from ('192.168.80.11', 56598)
Traceback (most recent call last):
File "socketserver.py", line 316, in _handle_request_noblock
File "socketserver.py", line 347, in process_request
File "socketserver.py", line 360, in finish_request
File "http\server.py", line 653, in __init__
File "socketserver.py", line 720, in __init__
File "http\server.py", line 427, in handle
File "http\server.py", line 415, in handle_one_request
File "edgebridge.py", line 494, in do_GET
File "edgebridge.py", line 431, in proc_registered_requests
File "edgebridge.py", line 218, in passto_hub
TypeError: object of type 'NoneType' has no len()
In the CLI, I don’t see any additional logging which would seem to indicate that the issue is on the edgebridge side of things and that it isn’t getting through correctly. Any idea what is causing this error?
From edgebridge.py (lines 489-496) it seems the server response doesn’t have content-length and that’s what causes the error later. I don’t know what that means, but maybe that will help narrow down the issue?
self.data_bytes = None
if 'Content-Length' in self.headers:
self.data_bytes = self.rfile.read(int(self.headers['Content-Length']))
#print ('Data:\n',self.data_bytes)
if not proc_registered_requests(self):
handle_requests(self, 'GET', self.path, self.client_address)
@TAustin, have you had a chance to look at the errors in my prior two posts yet?
I’m looking at it now. What version of edgebridge are you running? Is it the Windows executable?
Is it possible for you to change the request from Blue Iris from a get to a post?
I think this error is occurring because of the get and there being no data. Not sure why this behaving different but I think it has to do with body data present or not present. Regardless, I know how to fix it.