FlowFuse / device-agent

An agent to run FlowFuse managed instances of Node-RED on devices
Apache License 2.0
15 stars 8 forks source link

Permit Device Agent to automatically re-establish Editor Tunnel after a restart #220

Closed Steve-Mcl closed 8 months ago

Steve-Mcl commented 8 months ago

closes #147

Description

Stores the tunnel token and re-establishes the editor tunnel when restarting

Adds tests:

Agent
  loadsProject
    loads project file with a tunnel token
  setState
    Clears editorToken when switching off developer mode
  developer mode
    editor tunnel
      reconnects tunnel in developer mode when editorToken is set
      does not attempt to reconnect tunnel if not in developer mode (even if editorToken is set)
MQTT Comms
  Calls save token when commanded to startEditor

Updates tests:

Agent
  loadsProject
    saves project set for developer mode

Related Issue(s)

147

Checklist

Labels

knolleary commented 8 months ago

Hmm - some github oddness happening. I've merged this PR, but it remains in open state saying there are conflicts... but as far as I can tell, the commits are already in main.