Reports - Device list with MAC address, IP address, protocol

Is there a means to produce/export a device listing with protocol (WiFi, Zigbee, Z-wave), IP address, MAC address, name, type, etc?

The device list is somewhat helpful, but I would like more information. Perhaps a reporting function?

YapFlapper

Writing a quick app to give protocol, and some other information wouldn't be a big issue, but MAC and IP generally aren't part of the information that the device shares with HE.

1 Like

I noticed on the Device page for my Wemo WiFi devices that the "Data" section shows the port, MAC, and IP address:
Data

  • port: c002
  • mac: 30230345A075
  • ip: 0A001E20

I am just not skilled or knowledgeable enough to parse the device list and pull this from the device data. Ditto on converting the IP address to standard format.

YapFlapper

The issue will be that the data attribute doesn't, to the best of my knowledge, have a standard format requirement so a device can push any number of things there (Z-Wave and Zigbee often have fingerprints and control information along with FW versions). In your example, IP is a straight hex array, i.e. 0A001E20 → A0.00.1E.20 → 10.0.30.32 , MAC is also a hex array 30230345A075 → 30:23:03:45:A0:75, and port looks to be a straight 4 byte hex string → 49154.

Let me look at this a little and see if I can get a meaningful pattern from the Z-Wave / Zigbee side or if this just needs to be a one off for Wemo.

2 Likes

@YapFlapper

Stil rough, but take a look at:

https://raw.githubusercontent.com/thebearmay/hubitat/main/apps/deviceCharacteristics.groovy

In particular the Device Report Page. It will display it in screen as well as open a new page (may need to authorize it in your browser if you have popup blocking enabled). Took a guess at the exact format the IP, MAC, and port are stored in as I don't have any devices that report out those in the data block.

The ip, port (if reported), and MAC data will have different names in the various custom device handlers. IP may be ip, deviceIp, device_ip, etc. and could be hex or dec. Same with other elements. Hubitat has no style guide nor naming conventions for these elements.

Yeah, figure this is basically a one off as the data block is pretty much a free-for-all from what I’ve seen

But you could report name, type, label, dni and then the data block as a JSON output to be interpreted by the user. That is really all you can do.

Umm. What do I do with this? I see it is groovy script, but do I load this as I would a driver or app?

You would add it under Apps Code, and then go to the Apps tab and add a new user app…

Doh! Thanks my friend.