Device name Changes with displayName


#1

UPDATE: My original post below is misleading in that it may suggest a problem with the app Send Events to EventGhost. Nothing to do with this app. The problem is retrieving the value evt.displayName for devices, 7 Aeon open/close sensors (gen 5) in total. Any smartapp I create which would fetch the displayName will demonstrate the problem.
i.e

def myDevName=evt.displayName
log.debug "$myDevName" 

The log will either print the new name I assigned or the original name ST assigned when it was included in the network.
Below is a screenshot of the “Recently” events recorded by the ST on my mobile.

---------- Original Post -----------
I have been using a ST app (Send Events to EventGhost by aderusha) well over one year with no code changes for almost the same time. Basically it sends ST events to my server. No problems ever until today. The name of the device/event can randomly change. For example a typical set of events event for a door sensor might be
HTTP.ST.Furnace Room Open/Close Sensor.contact.opened
HTTP.ST.Furnace Room Open/Close Sensor.contact.closed
Today either of the above may change to

HTTP.ST.Aeon Labs Door/Window Sensor (Gen 5) .contact.opened.
HTTP.ST.Aeon Labs Door/Window Sensor (Gen 5) .contact.closed.

or maybe this
HTTP.ST.Furnace Room Open/Close Sensor.contact.opened
HTTP.ST.Aeon Labs Door/Window Sensor (Gen 5) .contact.closed.

or
HTTP.ST.Aeon Labs Door/Window Sensor (Gen 5) .contact.opened.
HTTP.ST.Furnace Room Open/Close Sensor.contact.closed

No rhyme or reason for it. I tried rebooting the hub and even removing/reinstalling the device(s) but the results are always the same. Sometimes good other time bad. What is going on??


#2

Just to add to the above. The problem lies with the event attribute displayName. Here is some of the code

def eventHandlerBinary(evt) {
	runNotifyAt()
	def egHost = "${settings.egServer}:${settings.egPort}"
	def egRawCommand = "${settings.egPrefix}.${evt.displayName}.${evt.name}.${evt.value}"
    log.debug "egRawCommand:  $egRawCommand"

in the above evt.displayName may return Furnace Room Open/Close Sensor The real display name or replace it randomly with Aeon Labs Door/Window Sensor (Gen 5) the original name ST assigned it during the inclusion of the device. And, yes, I changed both name and label attribute in the IDE for these devices.