Color Nodes by Device Address in Gateway Traffic

Suggestion for the Gateway Traffic log:

With the Device Address added as data-attribute on the LI tag

We could use simple CSS (Using the Stylish extension, or any of the dozen CSS extensions)

To style the page, showing my own Nodes and “foreign” Nodes

While the team adds this; maybe add Airtime and payload size as data-attributes on the LI tag as well, then CSS can be used to filter out anomalies.

More advanced would be to add Color as Device metadata (same CSS selectors can be created by TTN then)

I now run a (setInterval) monkey script to stick the data-attribute on every new LI

[...document.querySelectorAll('li:not([data-deviceaddress]) span[class=""]')]
   .map((span)=>{
         var LI=span.parentNode.parentNode.parentNode.parentNode.parentNode;
         LI.setAttribute("data-deviceaddress",span.innerText);
   });

and the above CSS in a Stylish script

9 Likes

like the idea :sunglasses:

But soft background colors please that are easy on the eye. :slightly_smiling_face:
(Not hard primary colors that make it more difficult to read the text).

A little more use of ‘responsive design’ would also be welcome.
Only 40% of my browser width is used (when I maximize it) for showing traffic which is a lot of unused screen estate.

Using more width would also allow to add RSSI and SNR to the first line so they can be read at a glance without having to unfold the contents first.

1 Like

The above (using Device Address) breaks because that Device Address is dynamic…

When using an extension for that, one could also use some Greasemonkey script to find the elements, without TTN making any changes. But then one’d still need to configure the list of DevAddr’s one’s interested in. (Assuming that’s what the “aha moment” was about?)

As an aside: note that the search box on top already allows for filtering a single DevAddr.

(I haven’t yet finished week 1 of the online course)

What is the point of that DeviceAddress ? (replacing the batteries causes a new Address)

If this list item gets the DeviceEUI all is good

See https://www.thethingsnetwork.org/wiki/LoRaWAN/Address-Space

Then you’re using OTAA, which is good but indeed the address will change.

I doubt TTN will do that, as the gateway does not know anything about that. So far, the gateway’s Traffic page merely shows the unencrypted parts of the LoRaWAN packet, and gateway meta data, just like a gateway’s log could show you. (Plus debug info in the trace…)

Got it,

I’ll see if I can extend my current Monkey script (which already extracts Application and Device info)

Great idea!