This PR introduces logic to ensure (as well as possible) idempotency of devices. It does this by utilizing a new uuid attribute on each device and ensuring that as new mdns or ssdp data arrives that the corresponding device simply has it's attributes updated if/when appropriate vs creating a new entry.
Various other features are peppered throughout:
3 additional properties on each device: manufacturer, modelName, and lastSeen
devices can now be garbage collected (based on lastSeen attribute)
non-google devices are now properly discovered (ie: android tvs, etc)
new events for device_online and device_offline (garbage collected) and device_updated
existing device event behaves in a backwards-compatible way
more robust change detection logic has been put in place to prevent sending useless (actual noops) events
http.get usage now has proper error handling
http.get now has a configurable timeout setting to prevent hangs
streamType can be set when sending media
rinfo is used by default to detect mdns discovered host (vs parsing the foo.local address from DNS data)
added dev dependencies to support modern js formatting and linting
This PR introduces logic to ensure (as well as possible) idempotency of
devices
. It does this by utilizing a newuuid
attribute on each device and ensuring that as newmdns
orssdp
data arrives that the correspondingdevice
simply has it's attributes updated if/when appropriate vs creating a new entry.Various other features are peppered throughout:
manufacturer
,modelName
, andlastSeen
lastSeen
attribute)device_online
anddevice_offline
(garbage collected) anddevice_updated
device
event behaves in a backwards-compatible wayhttp.get
usage now has proper error handlinghttp.get
now has a configurabletimeout
setting to prevent hangsstreamType
can be set when sending mediarinfo
is used by default to detectmdns
discoveredhost
(vs parsing thefoo.local
address from DNS data)