- Fixed
TriggerEventCommand
not being serialized properly forTriggerEvent()
method (since v1.47.0). (@2675613b) - Changed
TriggerEventStates
dictionary type to<string, string>
becausetriggerEvent.states
values must be of string type. (@dab4d6e0) - All
ITouchPortalEventHandler
method implementations are now optional in plugin code. (@e6f2385d) - Exposed
ICommandHandler.SendCommand()
method as public inTouchPortalClient
. (@134268b5) - Actual JSON message being sent is now logged (at Debug level) instead of just success status. (@0e954f08)
Updates for Touch Portal API versions 7-10. (@69beeb19)
- Added
TriggerEvent(string eventId, Dictionary<string, object> states)
method &TriggerEventCommand
type. - Added
StateListUpdate(string stateId, string[] values)
method &StateListUpdateCommand
type. - Added
forceUpdate
option toCreateState()
method andCreateStateCommand.ForceUpdate
member. - Added
ListChangeEvent.Values
property forlistChangeEvent
incoming message. This is aDictionary<string, string>
type. - Added
InfoEvent.CurrentPagePathMainDevice
andInfoIevent.CurrentPagePathSecondaryDevices
properties forinfo
incoming message type. - Added
PreviousPageName
,DeviceIP
,DeviceName
, andDeviceID
toBroadcastEvent
incoming message type. - Added & improved some documentation comments.
- Updated for .NET8 and dropped .NET5 support.
- Updated dependencies to 8.x versions (also fixes a security issue in the
System.Text.Json
library).
- Optimized TP message output by skipping a byte array copy step for appending the terminating newline after each JSON struct.
- Published .NET6 and .NET7 builds.
Both changes affect the feature which parses the "Long" connector ID from the short ID notification events into individual key/value fields (see notes for v0.43.0-mp below).
- Connector data key names are now truncated if
TouchPortalOptions.ActionDataIdSeparator
is set, just like action/connector data keys. - Fix that the "pc_plugin-name_" part wasn't properly stripped from the "actual" connector ID.
- Add TP API v6
parentGroup
parameter for dynamic state creation. - Add static
TouchPortalOptions.ValidateCommandParameters
setting to bypass all parameter validation when creating new Command types.
- BREAKING: Convert the action/connector
Data
type into a dictionary of id=value pairs. See the SamplePllugin.cs changes on this commit TouchPortalClient
now sends theOnCloseEvent()
to the plugin before disconnecting, so the plugin can send any final data updates, etc (unless TP just crashed or quit, of course).- Add static
TouchPortalOptions.ActionDataIdSeparator
option to split action data IDs on a character and only store the last part in the dictionary key (eg. for IDs like<plugin>.<category>.<action>.<data1>
one could split on the period and have much shorter/simpler key lookups). @89a81c42 ShortConnectorIdNotificationEvent.Data
property will parse all the|setting1=testvalue|setting2=anothervalue
action data pairs from the longconnectorId
string into aDictionary<string, string>
. Also theActualConnectorId
property is available to get the actual connector ID part (before any data=value pairs). @2238db9d
Changes since v0.30.0-beta (original @oddbear version @1f431d05)
Performance and efficiency improvements: (@63e886c0)
- Does not crash on shutdown. Your plugin code can clean up and shut down properly.
- Benchmarked at around 30-50% better performance/throughput in several areas like JSON de-serialization and actual socket efficiency (removes 2 layers of buffers and reads/writes UTF8 JSON bytes directly).
- Log verbosity at the Info level greatly reduced. Logging in general improved and made more consistent, especially at Debug level.
- Added
ConnectorChangeEvent.Data
property to get Connector data members (structure is identical to Actions).ConnectorChangeEvent
andActionEvent
now have a common base classDataContainerEventBase
. commit - Added
OnShortConnectorIdNotification
event. commit - Added
ConnectorUpdateShort()
command to send connector updates based on theirshortId
(from the above notification event). commit sample - Added
TouchPortalClient.IsConnected
property.