victronenergy / node-red-contrib-victron

MIT License
90 stars 18 forks source link

Show connection status messages on nodes #7

Closed pkronstrom closed 5 years ago

pkronstrom commented 5 years ago

Node-RED supports showing connection status below the nodes. Show a red 'disconnected' or green 'connected' circle below the node based on the dbus connection status.

mpvader commented 5 years ago

A connection loss to D-Bus entirely is not a use case to cater for; as discussed in #11.

But; a loss of connection to one of the devices could be a viable option. Consider this use case:

  1. User configures a system; with a battery on VE.Direct Port 1.
  2. Saves/deployes/stores/or-how-ever-thats-called-in-node-red-speak it
  3. Modifies if (plugs the BMV to VE.Direct port 2; which changes the device instance).
  4. Opens the node-red ui again

Now, in the flow, it would be great that the items he has in his flow show a connection status below the nodes.

pkronstrom commented 5 years ago

Implementation in commit https://github.com/victronenergy/node-red-contrib-victron/commit/14a9ff4ff907ee99d312672a9af8b57ecbe536f2

The node connection status is shown for the currently selected service (and path). When a service disconnects or a service comes back online, the node status is updated accordingly.

screenshot 2019-01-23 at 16 04 23