fix using SIOT_AUTH_TOKEN for -logNats command line option
upgrade to NATS 2.2.2. Increases SIOT binary by about 2MB (uncompressed), 1MB
(compressed)
disable badger for now β can be re-enabled in db/genji.go. Bolt seems to work
better for the current SIOT use cases and Badger just adds bloat to the
binary.
Quite a bit of effort went into making this work as we display the times in local time in the browser, but store them in UTC in the database. This allows consistent operation no matter what time zone the user is in.
improve rule condition processing to process all conditions/points rather than just first match
Main feature in this release is caching which greatly improves the performance of handling node point updates.
handle audio playback where file bitrate does not match default of audio
device (#240)
support rule actions that trigger when rule goes inactive (instead of active).
This allows a rule to do something with the run goes active as well as
inactive and in some cases saves us from writing two rules (#241).
fix issue with setup where you sometimes get error: elm: Text file busy
cleanup simpleiot.Start() so it actually returns
See this example for ideas on how to
Note, the simpleiot.Start() function cannot be used directly because we donβt checkin the frontend assets for the SIOT web ui. See this example for how you can embed SIOT in your project by adding it as a submodule. The go modules replace directive allows you to do some pretty neat stuff.
move HTTP API to get nodes for user to use NATS instead of direct call into
database (#327)
BREAKING API CHANGE: the Nats node.<id> subject now returns an array of data.NodeEdge structs instead of a single node. Both instances of an
upstream connection must be upgraded.
donβt send deleted nodes to frontend β may fix #259
default to nats/websocket being enabled on port 9222
with v0.0.40, if upstream URI was specified as ws://myserver.com without the
port being specified, the NATS Go client assumed the port was 4222. If this
port is not specified for ws or wss protocols, SIOT now sets the port to :80
or :443. This makes the behavior more predictable, as these kinds of problems
are very hard to debug. #315
if upstream config changes, restart upstream connection. #258
support for NATS over WS connections to upstream. This is handy for cases
where the edge network may block outgoing connections on the port NATS is
using. HTTP(s) almost always works. In the upstream config, simply change the
URL to something like: ws://my.service.com.
fix issue where app exits if upstream auth is incorrect (#298)
fix issues with orphaned device nodes in upstreams. We now make sure devices
in upstream have upstream edges or are not deleted if the device is still
receiving points. (#299)
only report nats stats every 1m. This makes upstream work better as these
currently are run in sync.
UI: fix bug where copy node crashes UI if not on secure URL or localhost (#341)
support clone/duplicate node (as well as mirror) operation (#312). Now when
you copy and paste a node, you will be presented with a list of options as
shown below. The new duplicate option allows you to easily replicate complex
setups (for instance a bunch of modbus points) from an existing site to a new
site.
store and display App Version in root node (see screenshot below). This value
is extracted by the SIOT build using the git describe command. See envsetup.sh. #192, #349
store and display OS version in root node (see screenshot below). On Linux,
this value is extracted from the VERSION field in /etc/os-release. The
field can be changed using the
OS_VERSION_FIELD environment variable. #324, #353
update go.bug.st/serial from v1.1.3 β v1.3.5
sort nodes in UI a little nicer, conditions before actions, move more often
used nodes to the top, etc. #355, #337
add NATS user auth API and change HTTP auth to use that. #326, #356
fix bug where deleted nodes where still considered for user auth
add SIOT JS library using NATS over WebSockets (#357)
This release improves the process of linking nodes to rule actions or conditions. In the past, the system clipboard was used and you had to paste the system clipboard contents into the Node ID field of rule conditions and actions.
Now, when you a copy a node, the SIOT frontend has its own clipboard and a past button is displayed below the Node ID fields for easy pasting the node ID. Additionally, the node description is displayed below the Node ID field so you can easily tell which node the ID is referring to.
A video is available which illustrates how node IDs can now be copied and pasted.
implemented struct <-> type encode/decode
functions.
improved the lifecycle management of the application so we can cleanly shut it
down. This allows us to test the application more easily (spin up version for
test, shutdown, repeat).
implemented a test.Server() function to create a test server to be used in
tests.
Go API Change: the nats package has been renamed to client.
defined a new Client interface and a client Manager that watches for node
changes and creates/updates clients and sends any points changes.