Monitoring Sensor

@if(auth()->user()->profile_photo) @else
{{ auth()->user()->initials }}
@endif

Gerakan (24 jam)

{{ $pirCount24h }}

Getaran (24 jam)

{{ $vibrationCount24h }}

Rak Dibuka (24 jam)

{{ $reedCount24h }}

Sensor PIR

Motion Detection

@if($pirSensor && $pirSensor->status === 'active') Aktif @else Tidak Aktif @endif
@if($pirLatest)

{{ $pirLatest->motion_detected ? '⚠ Gerakan' : '✓ Aman' }}

Intensitas: {{ $pirLatest->motion_intensity ?? 0 }}% · Durasi: {{ $pirLatest->duration_seconds ?? 0 }}s

Update: {{ $pirLatest->recorded_at->diffForHumans() }}
@else

Belum Ada Data

Menunggu data dari sensor...

@endif

Sensor Getar

SW-420 Vibration

@if($vibrationSensor && $vibrationSensor->status === 'active') Aktif @else Tidak Aktif @endif
@if($vibrationLatest)

{{ $vibrationLatest->is_abnormal ? '⚠ Abnormal' : '✓ Stabil' }}

Magnitude: {{ number_format($vibrationLatest->magnitude ?? 0, 2) }} · Status: {{ ucfirst($vibrationLatest->status ?? '-') }}

Update: {{ $vibrationLatest->recorded_at->diffForHumans() }}
@else

Belum Ada Data

Menunggu data dari sensor...

@endif

Reed Switch

Door/Lock Status

@if($reedSensor && $reedSensor->status === 'active') Aktif @else Tidak Aktif @endif
@if($reedLatest) @php $reedOpen = $reedLatest->door_opened ?? $reedLatest->door_open ?? false; @endphp

{{ $reedOpen ? '⚠ Terbuka' : '✓ Tertutup' }}

Tipe: {{ ucfirst($reedLatest->access_type ?? $reedLatest->access_level ?? 'manual') }} · Durasi: {{ $reedLatest->duration_seconds ?? $reedLatest->open_duration_seconds ?? 0 }}s

Update: {{ $reedLatest->recorded_at->diffForHumans() }}
@else

Belum Ada Data

Menunggu data dari sensor...

@endif

Riwayat PIR

@forelse($pirHistory as $pir)

{{ $pir->motion_detected ? 'Gerakan' : 'Aman' }} @if($pir->motion_detected) — {{ $pir->motion_intensity }}% @endif

{{ $pir->recorded_at->format('d M H:i:s') }}

@empty

Belum ada data

@endforelse

Riwayat Getaran

@forelse($vibrationHistory as $vib)

{{ ucfirst($vib->status) }} — {{ number_format($vib->magnitude, 2) }}

{{ $vib->recorded_at->format('d M H:i:s') }}

@empty

Belum ada data

@endforelse

Riwayat Reed Switch

@forelse($reedHistory as $reed) @php $reedOpen = $reed->door_opened ?? $reed->door_open ?? false; @endphp

{{ $reedOpen ? 'Terbuka' : 'Tertutup' }} — {{ ucfirst($reed->access_type ?? $reed->access_level ?? 'manual') }}

{{ $reed->recorded_at->format('d M H:i:s') }}

@empty

Belum ada data

@endforelse

Status Sistem

Kondisi operasional monitoring

Sensor aktif

{{ \App\Models\Sensor::where('status','active')->count() }}/{{ \App\Models\Sensor::count() }} sensor online

Komunikasi LoRa

Signal: {{ $device?->signal_strength ?? '-' }}%

Update terakhir

{{ $lastUpdate ? $lastUpdate->diffForHumans() : 'Belum ada data' }}