Is there a way to see logs of devices sending to port 39501

C7; I have a Weewx instance that is running on a system with a new MAC addr. Because of this, the Weewx Hubitat app isn't working as it's expecting data from my old Device ID. I updated with new partial mac of the new server, but it's still not working.

How can I see logs of things that are hitting 39501 and not matching a device ID? I suspect I have other things that may be hitting 39501 and not "working" because the device ID may be off. How can I see these mysterious logs?

Yes, this is reported under the “Hub” device in live and past logs. You’ll see a "no matching device found" message along with its IP.

Example:

sys:12025-12-31 07:25:25.453 AMwarnReceived data from 192.168.1.58, no matching device found for 192.168.1.58, FAB8C03A:8174, FABBCDC79397 or FAB8C03A.
sys:12025-12-31 07:25:25.335 AMwarnReceived data from 192.168.1.56, no matching device found for 192.168.1.56, FAB8C038:89E6, FABB6C14A639 or FAB8C038.
4 Likes

I don't have a Hub device in Past logs. Shouldn't I be able to hit 'curl http://192.168.1.xx:39501 and see an unknown event?

Is the extra period between the 1 and the : a typo? It shouldn't be there.

Edit: Actually, you are missing the last octet.

Doh fixed that.

By definition for a device to respond to port 39501 its DNI needs to match the IP address of the sending host. Normally the IP for the DNI is converted to a hex string using something like:

def getHostAddress(ip=''){
    if(!ip)
        ipTokens = location.hub.localIP.split('\\.')
    else
        ipTokens = ip.split('\\.')     
    hexStr=''
    ipTokens.each{
        wStr=Integer.toString(it.toInteger(),16).toUpperCase()
        if(wStr.size() == 1)
            hexStr+="0$wStr"
        else
            hexStr+="$wStr"        
    }
    
    return hexStr
}

Having calculated that then it's a simple search of device DNIs for that string or the MAC hex without any separators. (You'll want to use the old device's MAC/IP for the search).

1 Like

Quick search app that may help:
https://raw.githubusercontent.com/thebearmay/hubitat/refs/heads/main/apps/dniSearch.groovy

1 Like