xPL-Arduino uses a fixed IP address (192.168.4.133) when sending the heartbeat

xPL-Arduino uses a fixed IP address (192.168.4.133) when sending the heartbeat messages.
This is in the xPL::SendHBeat() routine at about line 180 of xPL.cpp.
To change this to report the Arduino’s IP address, please make the following changes;
Add Ethernet.h to the includes viz;

#include "xPL.h"
#include <Ethernet.h>

Then replace the sprintf line that contains the fixed IP address in the xPL::SendHBeat() routine with the following;

  byte ip[4];
  for (byte thisByte = 0; thisByte < 4; thisByte++) {   
    ip[thisByte] = Ethernet.localIP()[thisByte];   // print each byte of the IP address:
  }
    sprintf_P(buffer, PSTR("xpl-stat\n{\nhop=1\nsource=%s-%s.%s\ntarget=*\n}\n%s.%s\n{\ninterval=%d\nport=3865\nremote-ip=%03d.%03d.%03d.%03d\nversion=1.0\n}\n"), source.vendor_id, source.device_id, source.instance_id, XPL_HBEAT_ANSWER_CLASS_ID, XPL_HBEAT_ANSWER_TYPE_ID, hbeat_interval, ip[0], ip[1], ip[2], ip[3]);