
https://github.com/jeedom/plugin-openzwave/blob/beta/resources/openzwaved/ozwave/node_utils.py#L178


NOTIFICATIONS:
https://github.com/tobiasgraf/open-zwave/blob/70e5f6712cc5b92818a4c7425d3441b2d1607866/cpp/src/Notification.cpp

>>> def killit(nid):
...     tree = etree.parse("zwcfg_0xf5b17667.xml")
...     namespace = tree.getroot().tag[1:].split("}")[0]
...     cc = (tree.find("{%s}Node[@id='%s']" % (namespace, nid, ))).find(".//{%s}CommandClasses" % namespace)
...     print(cc)
...     for command_Class in cc.findall(".//{%s}CommandClass" % namespace):
...             if int(command_Class.get("id")[:7]) == 132:
...                     cc.remove(command_Class)
...                     return True
...     return False


- Bugs:
--------------------------------------

  - removing failed battery devices: (IN PROGRESS)
		- (1) start ctrl with: AssumeAwake option, force onto failed list, remove node, restart...
		- (2) stop ctrl, remove commandclass 132 (wakeup-device) from xml inside failed node, node will be flagged as dead, -> remove failed device
		- (3) ???
		- (4) now how about a "proper" way???


	- sometimes some config values and user values are doubled,
		- also here put things together by command classes

	- jsgrid is not always updating certain data:
		- e.g., query stage, well seems none of them is updated ?
		- ....

	- allow filtering in log window, or other configurations (list len, etc...)

  - association tables are buggy with multiple tables/assocs (see RGBW)

  - adding new node, does not add the node to the jsgrid, see log:

01:31:07::066	Controller Command	ctrl_node_id: 1 node: n/a node_id: n/a state_int: 7 state: Completed state_full: The command has completed successfully. error_int: 0 error: n/a error_full: n/a
01:31:07::706	Controller Command	ctrl_node_id: 1 node: n/a node_id: n/a state_int: 6 state: InProgress state_full: The controller is communicating with the other device to carry out the command. error_int: 0 error: n/a error_full: n/a
01:31:07::803	Controller Command	ctrl_node_id: 1 node: n/a node_id: n/a state_int: 1 state: Starting state_full: The command is starting. error_int: 0 error: n/a error_full: n/a
01:31:07::455	Value Changed	node_id: 74 value_id: 72057595294220327 value_data: 2.02
01:31:07::625	Value Changed	node_id: 74 value_id: 72057595294220311 value_data: 3.52
01:31:07::578	Value Changed	node_id: 74 value_id: 72057595294220295 value_data: 3
01:31:07::317	Value Changed	node_id: 74 value_id: 72057595294220327 value_data: 2.02
01:31:07::545	Value Changed	node_id: 74 value_id: 72057595294220311 value_data: 3.52
01:31:07::987	Value Changed	node_id: 74 value_id: 72057595294220295 value_data: 3
01:31:07::446	Value Added	node_id: 74 value_id: 144115189322170368 value_data: false
01:31:07::839	Value Added	node_id: 74 value_id: 72057595289666228 value_data: ALARM RELAY ON - relay will turn ON upon receipt of alarm frame
01:31:07::428	Value Added	node_id: 74 value_id: 72057595289666212 value_data: ALARM FLASHING - relay will turn ON and OFF periodically (see param.39)
01:31:07::465	Value Added	node_id: 74 value_id: 72057595289666196 value_data: ALARM RELAY OFF - relay will turn OFF upon receipt of alarm frame
01:31:07::491	Value Added	node_id: 74 value_id: 72057595289666180 value_data: ALARM FLASHING - relay will turn ON and OFF periodically (see param.39)
01:31:07::568	Value Added	node_id: 74 value_id: 72057595289666166 value_data: 600
01:31:07::576	Value Added	node_id: 74 value_id: 72057595289666068 value_data: ALARM RELAY ON - relay will turn ON upon receipt of alarm frame
01:31:07::022	Value Added	node_id: 74 value_id: 72057595289666052 value_data: ALARM FLASHING - relay will turn ON and OFF periodically (see param.39)
01:31:07::258	Value Added	node_id: 74 value_id: 72057595289666036 value_data: ALARM RELAY OFF - relay will turn OFF upon receipt of alarm frame
01:31:07::432	Value Added	node_id: 74 value_id: 72057595289666020 value_data: ALARM FLASHING - relay will turn ON and OFF periodically (see param.39)
01:31:07::136	Value Added	node_id: 74 value_id: 72057595289665796 value_data: State saved at power failure, all outputs are set to previous state upon power restore
01:31:07::425	Value Added	node_id: 74 value_id: 72057595289665780 value_data: Disable Dimmer/Roller shutter control
01:31:07::466	Value Added	node_id: 74 value_id: 72057595289665764 value_data: Bi-stable input (switch)
01:31:07::514	Value Added	node_id: 74 value_id: 72057595289665748 value_data: Toggle
01:31:07::439	Value Added	node_id: 74 value_id: 72057595289665652 value_data: Device status is checked
01:31:07::647	Value Added	node_id: 74 value_id: 72057595289665636 value_data: Map status to all devices in group 1 (default)
01:31:07::536	Value Added	node_id: 74 value_id: 72057595289665622 value_data: 0
01:31:07::062	Value Added	node_id: 74 value_id: 72057595289665606 value_data: 0
01:31:07::573	Value Added	node_id: 74 value_id: 72057595289665588 value_data: Manual override disabled
01:31:07::113	Value Added	node_id: 74 value_id: 72057595289665556 value_data: ALL ON active / ALL OFF active
01:31:07::773	Node Naming	node_id: 74
01:31:07::795	Notification	args: {'notificationType': 'Notification', 'homeId': 4122048103, 'nodeId': 74, 'notificationCode': 2}
01:31:07::849	Controller Command	ctrl_node_id: 1 node: n/a node_id: n/a state_int: 7 state: Completed state_full: The command has completed successfully. error_int: 0 error: n/a error_full: n/a
01:31:07::908	Value Added	node_id: 74 value_id: 72057595293909142 value_data: 0
01:31:07::763	Value Added	node_id: 74 value_id: 72057595293909124 value_data: Failed
01:31:07::752	Value Added	node_id: 74 value_id: 72057595293909112 value_data: false
01:31:07::428	Value Added	node_id: 74 value_id: 72057595293909096 value_data: false
01:31:07::386	Value Added	node_id: 74 value_id: 72057595293909078 value_data: 0
01:31:07::282	Value Added	node_id: 74 value_id: 72057595293909060 value_data: Normal
01:31:07::106	Value Added	node_id: 74 value_id: 72057595293909041 value_data: 0
01:31:07::897	Value Added	node_id: 74 value_id: 72057595293909032 value_data: false
01:31:07::533	Value Added	node_id: 74 value_id: 72057595293909009 value_data: 0
01:31:07::612	Value Added	node_id: 74 value_id: 72057595293908996 value_data: Normal
01:31:07::644	Value Added	node_id: 74 value_id: 72057595294220327 value_data: Unknown
01:31:07::443	Value Added	node_id: 74 value_id: 72057595294220311 value_data: Unknown
01:31:07::842	Value Added	node_id: 74 value_id: 72057595294220295 value_data: Unknown
01:31:07::828	Value Added	node_id: 74 value_id: 72057595292663812 value_data: Disabled
01:31:07::698	Value Added	node_id: 74 value_id: 72057595284242432 value_data: false
01:31:07::517	Node Protocol Info	node_id: 74
01:31:07::585	Node Added	node_id: 74
01:31:07::042	Controller Command	ctrl_node_id: 1 node: n/a node_id: n/a state_int: 6 state: InProgress state_full: The controller is communicating with the other device to carry out the command. error_int: 0 error: n/a error_full: n/a



- OZWCP replacement (top top top prio)
--------------------------------------
	- use this: http://www.openzwave.com/knowledge-base/devicebugs to create mapping for
		"MessageID" to "Human readable error message"

  - Realize command class dependent behavior on frontend side, e.g., wake up time (132)
		and any others ...

	- urgently need this to be ready to maintain the network without all the HA overhead
	- target nearly reached, some "actions" from the controller are missing
		- leave the hard/soft reset stuff away first, don't think something can happen
			but just for a more secure feeling, either way we need some mechanism to avoid
			accidental clicking/activation (or have this activated by some config)
			greetings to the openhab UI designers :)
	- missing:
		[controller] secure inclusion, exclusion, remove failed node, create_new_primary,
								 delete_all_return_routes, has_node_failed, is_bridge_controller, is_locked,
								 is_primary_controller, is_static_update_controller, receive_configuration,
								 remove_node, replication_send, send_queue_count(!), ctrl-stats,
								 transfer_primary_role
		[node+value] nearly 100% I guess, some config values do not save, do we really need: set_config()?
		[network   ] mostly done!
		[group     ] nothing done, but easy and fast
		[scenes    ] very low prio, is it actually used?
		[mmh, yes? ] do_poll_statistics()?, get_stats_label(), poll_stats(?), request_network_update,
							   request_node_neighbor_update, send_node_information,
								 (most are just the 1:N versions of the node specific ones)
		[not now:  ] hard_reset, soft-reset (once we feel like in a "beta", I would pull them in)

	- looks quite a lot, but most are actually already there, there is just no "button" for it
		REST-api already is generic enough to support all of them...

- MQTT (top prio - once ozwcp can be replaced)
----------------------------------------------
	- need a "database", how about yaml ?
	- the database contains a mapping from value(s) to topics and any additional information
	- overall I see no need for subscriptions, just act as a publisher as client
	- the mapping can easily be realized within the gui, in fact:
		- 1st view: selection/naming of the topic
		- 2nd view: selection of value(s) to be mapped to this topic(s)
		- 3rd view: additional information: polling, QoS and allow a one-liner python
								to merge/filter operations on the data
	- finally also include a broker, what might lead to a challenge, due to the whole async story
		HBMQTT shall be the designated MQTT client/broker

- Robustness / Feature Completion (2nd prio)
--------------------------------------------
	- feedback for missing permissions on zwave device

	- check and correct errorcode on python server side
		-> come up with a defined set of errorcodes and their description

- Anything else (for 10mins fun ;D)
-----------------------------------
	- for ANY creation of elements use: (33% faster)
	  - $(document.createElement('div'));

	- in relation to the topic below: maybe accept any value_id at least with a "weak" reference, or
		some kind of "value"-queue, because likely there are some situations in which these may be
		too early or the node was not yet fully included into our data-structures, mmmh

	- generally consume the ControllerCommant event types properly and make them available to the user
		- after an inclusion, directly get all node information about the newly included device

	- states(s) generated by the Ajax()-builder class are not yet properly populated and consumed
		on frontend side

	- while using the frontend, use window.history.pushState("name", "title", "/frontend/show/x")
		for e.g., detail views from nodes in order to be "re-load-able"

	- newly included device shall directly be added to the node-jsgrid

	- overall it's time to do some proper event parsing and handling, right?

----- HomeAssistant:

- update entity registry via websocket, somehow hook to this and automate refactoring of all other files according to entity_id change....

{type: "config/entity_registry/update", entity_id: "zwave.aussen_vorne_seite_unten_oben1", name: null,…}
entity_id: "zwave.aussen_vorne_seite_unten_oben1"
id: 19
name: null
new_entity_id: "zwave.aussen_vorne_seite_unten_oben"
type: "config/entity_registry/update"


https://github.com/home-assistant/home-assistant/blob/ca86755409a26c32dd5eb7ad513d6e6fb99fbc4e/homeassistant/helpers/entity_registry.py#L177
