29 Mei 2026

This commit is contained in:
[Valentino Heman Budiarto]
2026-05-29 18:55:54 +07:00
parent d2c6fb0d69
commit 5e005e8524
12 changed files with 29 additions and 23 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ export default function PowerMonitoringPage() {
const fetchPowerStatus = async () => {
try {
const response = await fetch("http://localhost:8080/api/hardware/power-status");
const response = await fetch("http://172.17.110.6:8080/api/hardware/power-status");
const data = await response.json();
// Asumsikan data dari HA berupa string angka, kita update ke room D101
@@ -74,7 +74,7 @@ useEffect(() => {
try {
// Tembak API Golang (Ganti dengan endpoint aslimu jika berbeda)
const response = await fetch("http://localhost:8080/api/hardware/control", {
const response = await fetch("http://172.17.110.6:8080/api/hardware/control", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ device: backendDevice, action: actionType }),