From: Benjamin Braatz Date: Wed, 20 Oct 2021 14:26:23 +0000 (+0200) Subject: Push 'connection opened' message to graph. X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=f845898768503105c413a549dd6371aa1eb094d6;p=graphit%2Fcontrolpi-graph.git Push 'connection opened' message to graph. --- diff --git a/controlpi_plugins/graph.py b/controlpi_plugins/graph.py index b10d33e..9071f84 100644 --- a/controlpi_plugins/graph.py +++ b/controlpi_plugins/graph.py @@ -111,4 +111,13 @@ class Graph(BasePlugin): self._coroot_guid = await self._call('attributsknoten', ['coroot_name', self.conf['name']]) + comessage_guid = await self._call('erzeuge', ['comessage']) + if comessage_guid: + await self._call('verknuepfe', [comessage_guid, + self._coroot_guid]) + messages = [Message(self.name, {'event': 'connection opened'})] + await self._call('setze', [comessage_guid, 'comessage_json', + json.dumps(messages)]) + await self._call('setze', [comessage_guid, 'comessage_ready', + True]) await self._close()