This commit is contained in:
[Valentino Heman Budiarto]
2026-05-29 20:46:04 +07:00
parent d899558e12
commit e808f77248
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ export default function PowerMonitoringPage() {
const fetchPowerStatus = async () => {
try {
const response = await fetch("http://172.17.110.6:8080/api/hardware/power-status");
const response = await fetch("http://172.17.172.17: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://172.17.110.6:8080/api/hardware/control", {
const response = await fetch("http://172.17.172.17:8080/api/hardware/control", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ device: backendDevice, action: actionType }),