do some vetting of the packet to be processed to avoid processing a bad packet
set ready and state log levels for pushed or sent ready packets for easier debugging
processing.js
add ready command to consumer for pushes
emitting entire packet
base.js
added ready all subcriber that sends/push when ready
adds ready packet to conPackets for all s socket types
change observer names to include sufixes :socket, :consumer, :process, :device
add method to easily create an observer of connecting consumer(s)
processing.js
added default ready command for socket
removed arrow functions from socket cmd functions must Always be regular functions for setting context
base.js
better validation and defaults for options to registerSocket
add by default a ready observer for when socket starts listening
base:
add ready observer class instance
adds a ready observer for each consumer (only) registered
refactored default namespace processing a bit
refactored _packetProcess the default/main processor
now can register before,command, and after processors
uses a single _process function to remove near reptition
does a better job of maintaining/merging the packet from step to step
processing:
change processor to cmdProcessor
refactor default consumer processing
refactored amend methods
added transport validation
changed default name spaces to all start with _ to avoid accidential namespace issues
refactored examples to showcase all possibilities with a four in one (fio) example
refactored ha hooks
added matching websocket client
all works changes made by one socket are pushed to all sockets where they do their updates including home assistant
added a home assistant package file including lovelace yaml for matching HA interface.
changed default commands handling, removed _default namespace
changed s and c name spaces to use ._c, and _s as default name spaces
amend commands work with above ._c and ._s props
changed .socket to ._socket to avoid namespace issues with instances using .socket. Instances should use the getSocket method!
copied host and port options to connect. for mqtt socket to make setting those more standard
cleaned up logging
Add hooking for before send, and before and after process
Improved/cleaned preempting default processing
by default removed root namespace checking must now set useRootNS to true to access command functions there. This to avoid issuess like an 'on' function clashing with an emitter listerner.