anchor.diff:  init([]) ->
       Self = self(),
       Mqtt = mqtt_client:connect(),
  -    mqtt_client:subscribe(Mqtt, "#", fun(Topic, Message) ->
  +    mqtt_client:subscribe(Mqtt, "zwave/get/#", fun(Topic, Message) ->
           gen_server:cast(Self, {from_mqtt, Topic, Message})
       end),
  +    ehome_dispatcher:subscribe([mqtt, set, all], self(),
  +        fun([mqtt, set | Topic], Value) ->
  +            gen_server:cast(Self, {to_mqtt, Topic, Value})
  +        end),
       {ok, #state{mqtt = Mqtt}}.
   
   %%--------------------------------------------------------------------
  
positive.code:     {stop, Reason :: term(), NewState :: #state{}}).
  handle_cast({from_mqtt, TopicRaw, MessageRaw}, State) ->
      Topic = split_topic_name(TopicRaw),
      Message = convert_value(MessageRaw),
      {noreply, from_mqtt(Topic, Message, State)};
  handle_cast(dump, #state{root = Root} = State) ->
      dump(Root, ""),
      {noreply, State};
  handle_cast(_Request, State) ->
      {noreply, State}.
  
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code: -include_lib("eunit/include/eunit.hrl").
  
  learn_test() ->
      {T1, true} = learn([a,b,c], 1, #node{}),
      {T2, true} = learn([a,b,d], 2, T1),
      {_, false} = learn([a,b,d], 2, T2),
      #node{subs =
          #{a := #node{subs =
              #{b := #node{subs =
  