anchor.diff:  up(current_state, _From, #state{heartbeat_rate=HRate}=State) ->
       {reply, {up, push_ema:value(HRate)}, up, State}.
   
  -crashed(current_state, _From, #state{heartbeat_rate=HRate}=State) ->
  -    {reply, {crashed, push_ema:value(HRate)}, crashed, State}.
  -
  -restarting(current_state, _From, #state{heartbeat_rate=HRate}=State) ->
  -    {reply, {restarting, push_ema:value(HRate)}, restarting, State}.
  +down(current_state, _From, #state{heartbeat_rate=HRate}=State) ->
  +    {reply, {down, push_ema:value(HRate)}, down, State}.
   
   %%
   %% These events are handled the same for every state
  
positive.code:     StateData2 = StateData#state{
                     current_status = down % TODO Fetch this from the db someday
                     },
      {next_state, down, reset_timer(create_status_record(?SAVE_MODE, down, StateData2))}.
  
  %%%
  %%% State machine internals
  
negative.code: 
  %% Internal functions
  
  create_status_record(Status, #state{name=Name}=State) ->
      notify_status_change(Status, State),
      pushy_node_status_updater:create(?POC_ORG_ID, Name, ?POC_ACTOR_ID, Status),
      State.
  
  update_status(Status, #state{name=Name}=State) ->
      notify_status_change(Status, State),
      pushy_node_status_updater:update(?POC_ORG_ID, Name, ?POC_ACTOR_ID, Status),
      State.
  
  notify_status_change(Status, #state{name=Name,observers=Observers}) ->
      lager:info("Status change for ~s : ~s", [Name, Status]),
      [ Observer ! { node_heartbeat_event, Name, Status } || Observer <- Observers ].
  
  nlog(normal, Format, Args) ->
      lager:debug(Format, Args);
  nlog(verbose, Format, Args) ->
      lager:info(Format, Args).
  
  