ganti ip http://172.17.172.17:8080
This commit is contained in:
@@ -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 }),
|
||||
|
||||
Reference in New Issue
Block a user