UniversalDevicesInc / polyglot-v2

Polyglot Version 2 for use with the ISY 994i 5.0+
MIT License
30 stars 18 forks source link

Node restart required after deleting a node #13

Open jimboca opened 6 years ago

jimboca commented 6 years ago

I delete a node in my nodeserver from the Polyglot UI and then rerun discover for my nodeserver but the deleted node doesn't come back. I have to restart the nodeserver to get the deleted node to add.

exking commented 6 years ago

You mean restart the node server? Nodeserver must still have node address in self.nodes so addNode() is not called?

jimboca commented 6 years ago

Yes, that's what I said :-) and yes, it must still be in self.nodes, it may work if I set update=True, but the nodeserver has no way of knowing that.

exking commented 6 years ago

Sounds like an enhancement, Polyglot must send a "node deleted" MQTT event down to polyinterface and polyinterface must remove address from self.nodes.

Einstein42 commented 6 years ago

Polyglot does send a config() down the pipe to nodeserver on deletion which in turn updates the self._nodes dictionary. Is this a polyglot issue or a polyinterface issue?