diff --git a/run.php b/run.php index 6f8a3eb..1bdecc5 100755 --- a/run.php +++ b/run.php @@ -42,10 +42,10 @@ $c->subscribe(DOOR_TOPIC, 2); $c->onMessage(function (Message $message) { switch ($message->topic) { - case getenv("ENERGY_COUNTER_TOPIC"): + case ENERGY_METER_TOPIC: energy($message->payload); break; - case getenv("DOOR_TOPIC"): + case DOOR_TOPIC: door($message->payload); break; }