How can I connect to hub to check if data is getting there from sensor?

How can I connect to hub to check if data is getting there from sensor? Seem like there should be some way to connect to check this.

Mike

Set up your station and see if data is showing in the app.

You can monitor the UDP packets with an application on your phone. Are you Android or Apple?

1 Like

Hi @GaryFunk,
Which App would you suggest for an Android?
cheers Ian :slight_smile:

I use an app on android named “TCP/UDP TEST” to listen to udp packets and listen to port 50222

2 Likes

I’ve been using this since I got the first station.

2 Likes

I suspect the OP literally wants to log in to the hub and see the traffic coming from the device. Monitoring the udp packets is downstream and thus has more dependencies and points of failure in between.

That being said, if monitoring the UDP is what is wanted, in addition to the aforementioned phone app, if you have a linux box or something that can run tcpdump, then it’s pretty trivial.

sudo tcpdump -A -i eth0 ‘port 50222’

Example output:

$ sudo tcpdump -A -i eth0 'port 50222'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
17:24:05.629005 IP WeatherFlow.mixdivr.com.50222 > 255.255.255.255.50222:   UDP, length 105
E..."..........l.........q.C{"serial_number":"ST-00008534","type":"light_debug","hub_sn":"HB-00029332","ob":[1602116644,1142,67,0,0]}
17:24:05.673322 IP WeatherFlow.mixdivr.com.50222 > 255.255.255.255.50222: UDP, length 100
E..."..........l.........l.P{"serial_number":"ST-00008534","type":"rapid_wind","hub_sn":"HB-00029332","ob":[1602116644,2.29,44]}
2 Likes

To get nicer looking output on Linux, instead of tcpdump, using netcat (or nc), awk, and jq try this:

netcat -ukl 50222 | awk -v RS="}" '{print $1 "}"| "jq"}'

Here’s some sample output:

$ netcat -ukl 50222 | awk -v RS="}" '{print $1 "}"| "jq"}'  
{
  "serial_number": "ST-00012150",
  "type": "rapid_wind",
  "hub_sn": "HB-00029169",
  "ob": [
    1602203601,
    1.07,
    328
  ]
}
{
  "serial_number": "ST-00012150",
  "type": "rapid_wind",
  "hub_sn": "HB-00029169",
  "ob": [
    1602203604,
    1.21,
    337
  ]
}

You might need to install netcat and jq, but awk should be on your machine.

4 Likes