nutechsoftware / alarmdecoder-smartthings

AlarmDecoder webapp support for the SmartThings home automation platform.
Apache License 2.0
25 stars 43 forks source link

Change of MAC address or IP address of AD2PI Appliance requires reinstalling #46

Closed f34rdotcom closed 3 years ago

f34rdotcom commented 4 years ago

If the MAC address changes the code currently will ignore the AD2Pi Web appliance PUSH messages. It is still possible to PULL(refresh) to update the phone app.

locationHandler is where some code exists that was designed to repair a changing IP address but no case for a change of MAC address and the IP change code is questionable. I have been looking at this code and reading various security white papers and it seems the only reasonable way to deal with this is to allow the user to re-link the AD2Pi Web appliance manually. This leaves the security to the user to pick the correct device on the network.

I will be adding a new screen to update the data section of the AlarmDecoder UI device by allowing a UPNP scan on the network to detect the active AD2* devices on the network and let the user select one and update with that selections details.

I am willing to keep the DNI update code for now with better logging but IMHO that seems like a security issue as well. Best to better document that it is expect that the device have a fixed ip or a reservation on DHCP.

The current data stored in the device. ssdpPath ex /static/device_description.xml urn ex 192.168.1.2:5000 ssdpUSN ex uuid:11a5f1f0-c510-12e3-9547-b827fb40c401 mac ex AABBCCDDEEFF

f34rdotcom commented 4 years ago

Patch now available in dev.