faris Aljohari
274cdf741f
refactor: streamline Booking module and service by removing unused imports and consolidating space validation logic
2025-06-18 01:49:00 -06:00
faris Aljohari
df59e9a4a3
refactor: update BookableSpaceEntity relationship to OneToOne with SpaceEntity
2025-06-18 01:48:46 -06:00
faris Aljohari
8c34c68ba6
refactor: remove BookableSpaceDto and its index export
2025-06-18 01:48:35 -06:00
faris Aljohari
332b2f5851
feat: implement Booking module with BookableSpace entity, controller, service, and DTOs for managing bookable spaces
2025-06-17 22:02:13 -06:00
faris Aljohari
8d44b66dd3
feat: add BookableSpace entity, DTO, repository, and integrate with Space entity
2025-06-17 22:02:08 -06:00
faris Aljohari
f2ed04f206
feat: add SpaceDailyOccupancyDuration entity, DTO, and repository for occupancy tracking
2025-06-12 02:49:59 -06:00
faris Aljohari
2cb77504ca
Add PollutantType enum and update AQI-related entities and services to use it
2025-06-11 00:28:00 -06:00
faris Aljohari
c86be27576
Add AQI module and related services, controllers, and DTOs
...
- Introduced AqiModule with AqiService and AqiController for handling AQI data.
- Added DTOs for AQI requests: GetAqiDailyBySpaceDto and GetAqiPollutantBySpaceDto.
- Implemented AqiDataService for managing AQI sensor historical data.
- Updated existing modules to include AqiDataService where necessary.
- Defined new routes for AQI data retrieval in ControllerRoute.
2025-06-10 18:19:34 -06:00
faris Aljohari
3a08f9f258
Merge branch 'dev' into aqi-test
2025-06-10 17:08:06 -06:00
faris Aljohari
97e14e70f7
Refactor DeviceStatusLogEntity: expand unique constraint to include code and value
2025-06-10 01:41:41 -06:00
faris Aljohari
0793441e06
Refactor DeviceStatusLogEntity: correct unique constraint name for event time and device ID
2025-06-10 01:24:33 -06:00
faris Aljohari
b6321c2530
Refactor DeviceStatusLogEntity: update unique constraint to include deviceId
2025-06-10 01:18:58 -06:00
faris Aljohari
7eb13088ac
Refactor DeviceStatusLogEntity: update unique constraint and primary key definition
2025-06-09 04:50:58 -06:00
faris Aljohari
0d6de2df43
Refactor AqiSpaceDailyPollutantStatsEntity: update unique constraint and rename event fields for clarity
2025-06-04 15:24:13 -06:00
faris Aljohari
43dfaaa90d
fix: utilize WEATHER_API_URL in WeatherService for dynamic API endpoint
2025-06-04 01:32:01 -06:00
faris Aljohari
ea021ad228
fix: update error message for invalid latitude and longitude in fetchWeatherDetails method
2025-06-04 01:09:49 -06:00
faris Aljohari
cd3e9016f2
fix: improve error handling in fetchWeatherDetails method
2025-06-04 01:08:33 -06:00
faris Aljohari
ef2245eae1
Add AQI space daily pollutant stats module and related entities, DTOs, and repositories
2025-06-03 23:37:52 -06:00
faris Aljohari
c39129f75b
Add Weather module with controller, service, and DTO for fetching weather details
2025-06-03 02:38:44 -06:00
faris Aljohari
0fe6c80731
Add utility function to associate space UUID with devices in community and device services
2025-06-01 21:56:08 -06:00
faris Aljohari
81e017430e
Merge pull request #392 from SyncrowIOT/temp-product-relation-fixes
...
Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity
2025-06-02 06:20:03 +03:00
faris Aljohari
191d0dfaf6
Remove unique constraint on subspace and product in SubspaceProductAllocationEntity; update product relation to nullable in NewTagEntity
2025-06-01 21:16:51 -06:00
faris Aljohari
180d16eeb1
feat: add occupancy duration data retrieval and update procedures
2025-05-18 17:40:41 +03:00
faris Aljohari
8750da7e62
feat: optimize getAllDevicesByCommunity to prevent duplicate space processing
2025-05-15 10:09:29 +03:00
faris Aljohari
e253d1ca03
refactor: optimize device retrieval by avoiding duplicate space visits in getAllDevicesByCommunity
2025-05-15 10:08:02 +03:00
faris Aljohari
67331aa92a
feat: update DEVICE_SPACE_COMMUNITY route and add validation for spaceUuid and communityUuid in DTO
2025-05-14 13:00:09 +03:00
faris Aljohari
4aa3d04478
feat: update device and space services to use productType instead of deviceType and add query support for device retrieval by product type
2025-05-13 03:19:21 +03:00
faris Aljohari
799fcb6fb9
feat: add DEVICE_SPACE_COMMUNITY route and controller for device retrieval by space or community
2025-05-13 03:06:43 +03:00
faris Aljohari
7ec4171e1a
feat: add occupancy module with controller, service, and related DTOs for heat map data retrieval
2025-05-12 02:15:57 +03:00
faris Aljohari
fb5084ba3a
feat: add groupByDevice option to GetPowerClampBySpaceDto and update service logic
2025-05-11 01:59:26 +03:00
faris Aljohari
8030644fee
refactor: rename presence sensor entities and update related references
2025-05-09 13:11:14 +03:00
faris Aljohari
45b8cdcaae
Add endpoints and logic for fetching power clamp data by community or space
...
- Introduced new API endpoints to retrieve power clamp historical data based on community or space UUID.
- Updated PowerClampController to handle requests with optional parameters for community and space.
- Enhanced PowerClampService to validate input and fetch devices accordingly.
- Created ResourceParamsDto to manage request parameters.
- Updated ControllerRoute with new action summaries and descriptions.
2025-05-07 23:09:01 +03:00
faris Aljohari
91abfb41ab
Implement month-based date formatting and filtering in PowerClamp service
2025-05-07 12:17:17 +03:00
faris Aljohari
d40fb7a762
Merge branch 'dev' into SP-1551-be-implement-total-energy-consumption-api-for-analytics-dashboard
2025-05-07 10:59:42 +03:00
faris Aljohari
d197bf2bb4
feat: implement date formatting function and enhance PowerClampService with space-based data retrieval
2025-05-04 22:28:38 +03:00
faris Aljohari
2a1f1f52f6
feat: add presence sensor module with entity, DTO, and repository
2025-05-04 19:11:14 +03:00
faris Aljohari
0fcd974af2
refactor: update winston logger configuration for environment-based logging
2025-05-02 02:28:01 +03:00
faris Aljohari
aee6b8df69
refactor: update procedure names in PowerClampService for clarity
2025-05-02 01:57:12 +03:00
faris Aljohari
8040594dc6
refactor: enhance PowerClampController with additional ApiParam for powerClampUuid
2025-04-28 10:18:07 +03:00
faris Aljohari
588d4cb98e
refactor: update PowerClampController and service to use PowerClampParamsDto for parameter handling
2025-04-28 01:37:04 +03:00
faris Aljohari
72e65882b1
feat: update PowerClamp routes to support historical data retrieval
2025-04-24 15:08:54 +03:00
faris Aljohari
1bdb13846f
Merge branch 'dev' into SP-1355-powr-clap-historical-data
2025-04-24 15:04:11 +03:00
faris Aljohari
0ee26698ff
feat: enhance PowerClamp service and controller to support filtering by date, month, and year
2025-04-24 12:46:24 +03:00
faris Aljohari
45eec4bb30
Merge branch 'dev' into fix-add-device-issue
2025-04-24 11:08:38 +03:00
faris Aljohari
51bf4c0170
fix: update connection timeout value in database module
2025-04-24 11:06:47 +03:00
faris Aljohari
fa3f49af18
fix: handle potential undefined deviceDetails in getDeviceByDeviceUuid
2025-04-24 11:06:41 +03:00
faris Aljohari
881618a4ee
feat: enhance PowerClamp service with energy consumption procedures and enums
2025-04-24 03:14:03 +03:00
faris Aljohari
f3fd6646a1
feat: add SqlLoaderService to multiple modules for improved SQL data handling
2025-04-24 02:31:35 +03:00
faris Aljohari
3c5b97f2f9
feat: add SQL procedures for daily, hourly, and monthly energy consumption data
2025-04-24 02:22:13 +03:00
faris Aljohari
7249a0badb
Merge branch 'dev' into SP-1355-powr-clap-historical-data
2025-04-24 02:16:22 +03:00
faris Aljohari
92f908c0fb
feat: implement PowerClampService for managing hourly energy consumption data
2025-04-24 02:15:45 +03:00
faris Aljohari
7f43ef5de5
feat: integrate PowerClamp service and repositories across multiple modules
2025-04-24 02:14:58 +03:00
faris Aljohari
61a7e1c742
remove unused client and space DTOs and repository module
2025-04-23 16:58:42 +03:00
faris Aljohari
5490b5781d
fix deployment error
2025-04-23 16:55:57 +03:00
faris Aljohari
531f93d42c
fix: enhance log output in device status to include UUID and timestamp
2025-04-23 16:52:54 +03:00
faris Aljohari
fde34dcf9c
fix: update log output in energy status check for better debugging
2025-04-23 15:13:53 +03:00
faris Aljohari
8228ccc293
feat: add power clamp entities, DTOs, and repository for energy consumption tracking
2025-04-23 15:08:51 +03:00
faris Aljohari
6bc068c5e6
add SQL query for hourly energy consumption analysis
2025-04-23 13:06:42 +03:00
faris Aljohari
d1bc723834
fix: include productName in device details response
2025-04-23 12:51:24 +03:00
faris Aljohari
dabf234349
refactor: clean up unused variable and update destructuring in device service
2025-04-22 13:54:12 +03:00
faris Aljohari
1b3eb08fcb
fix: set name column to non-nullable in DeviceEntity
2025-04-22 01:58:31 +03:00
faris Aljohari
069cdf6f75
feat: add device name to actions and conditions in Automation and Scene services
2025-04-22 01:53:10 +03:00
faris Aljohari
2f12189eef
feat: add device name field to DeviceEntity and update related DTOs and services
2025-04-22 01:53:03 +03:00
faris Aljohari
2b449e61ea
add OTP email sending functionality and integrate with user authentication flow
2025-04-20 22:19:08 +03:00
faris Aljohari
1e6503c072
Merge pull request #337 from SyncrowIOT/SP-1346-be-sos-button-real-time-sync-issue
2025-04-18 09:21:24 +03:00
faris Aljohari
d341c47286
add SosHandlerService and integrate SOS handling in TuyaWebSocketService
2025-04-17 16:58:34 +03:00
faris Aljohari
32112930c8
Implement product creation functionality with DTO and permissions
2025-04-15 13:26:56 +03:00
faris Aljohari
30dd8318e3
Add SQL queries for hourly energy consumption tracking and refactor daily energy consumed query
2025-04-15 12:20:37 +03:00
faris Aljohari
f723b63a91
Merge branch 'dev' into fix-some-issues-wehn-add-new-device
2025-04-14 14:26:13 +03:00
faris Aljohari
7be4e4eeef
Refactor SQL queries for device presence detection: rename missing_date to date, enhance motion detection logic, and update aggregation for total presence counts.
2025-04-14 14:17:48 +03:00
faris Aljohari
f71279ea30
Fix SQL query in getPowerClampData method to use 'fact_daily_energy_consumed'
2025-04-14 13:47:40 +03:00
faris Aljohari
303ea696cb
Add SQL queries for device logs, energy consumption, presence detection, and product category definitions
2025-04-14 13:47:32 +03:00
faris Aljohari
777105fc28
refactor: improve error handling for missing space in device listing
2025-04-14 13:24:40 +03:00
faris Aljohari
3745962827
Add PowerClamp module with controller and service for energy data retrieval
2025-04-14 12:17:44 +03:00
faris Aljohari
a3001c8bb8
feat: add DEVICE_ADD permission and update device handling logic
2025-04-13 20:19:21 +03:00
faris Aljohari
22d98fa177
feat: add user UUID to project creation and validate user existence
2025-04-03 12:27:36 +03:00
faris Aljohari
c7fc4e3a5d
refactor: enhance TuyaWebSocketService to handle environment-specific message extraction
2025-03-28 03:34:30 +03:00
faris Aljohari
cf8cf08bdc
add client relation btw user and client
2025-03-27 01:55:26 +03:00
faris Aljohari
cbd3f5028b
finished client endpoints
2025-03-27 01:28:40 +03:00
faris Aljohari
cd05c9906d
convert the api from post to put
2025-03-25 10:25:13 +03:00
faris Aljohari
ef9cf6ad28
convert the route to devices
2025-03-25 10:24:52 +03:00
faris Aljohari
c5dac6c564
add register client api
2025-03-25 10:10:08 +03:00
faris Aljohari
a4b743eb58
add client entity
2025-03-25 02:29:00 +03:00
faris Aljohari
6785fb2b1e
finished refactor vistitor password device
2025-03-24 03:28:26 +03:00
faris Aljohari
8efd8cfba2
finished refactor devices module
2025-03-24 02:32:44 +03:00
faris Aljohari
2712ce673a
Merge pull request #322 from SyncrowIOT/edit-visitor-passwords-route
...
finished edit visitor passwords route
2025-03-21 09:57:24 +03:00
faris Aljohari
794e12d5d3
finished edit visitor passwords route
2025-03-21 09:56:13 +03:00
faris Aljohari
fb2e0c6cba
Merge pull request #321 from SyncrowIOT/add-community-in-get-scenes-and-automation
...
finished add community data in scene and automation
2025-03-21 09:46:02 +03:00
faris Aljohari
338b73ac7a
Merge pull request #320 from SyncrowIOT/SP-1309-be-create-custom-nestjs-guard-for-project-validation-and-SP-1242
...
Sp 1309 be create custom nestjs guard for project validation and sp 1242
2025-03-21 09:45:35 +03:00
faris Aljohari
d09bdd1f6e
finished add community data in scene and automation
2025-03-20 11:12:37 +03:00
faris Aljohari
dd1229db9c
add password as optional
2025-03-20 10:50:35 +03:00
faris Aljohari
9bc763bad3
refactor visitor passwords apis
2025-03-20 09:42:54 +03:00
faris Aljohari
b5469cb316
add project in the token
2025-03-20 09:42:28 +03:00
faris Aljohari
670c026cfd
Merge pull request #317 from SyncrowIOT/SP-1331-be-return-space-name-in-get-scene-and-get-automation-by-space-apis
...
SP-1331-be-return-space-name-in-get-scene-and-get-automation-by-space-apis
2025-03-19 11:05:53 +03:00
faris Aljohari
611cee79b3
Merge pull request #318 from SyncrowIOT/SP-1332-be-return-the-last-three-parent-for-spaces-that-have-devices
...
finished return the last three parents
2025-03-19 11:04:43 +03:00
faris Aljohari
1a313c103d
finished return the last three parents
2025-03-19 00:50:24 +03:00
faris Aljohari
770d08ce08
add space name to get scenes endpoint
2025-03-18 13:35:49 +03:00
faris Aljohari
770ece21b3
add space name to get automations endpoint
2025-03-18 13:35:09 +03:00
faris Aljohari
ec851eda9d
Merge pull request #316 from SyncrowIOT/SP-1321-be-return-the-spaces-in-get-communities-by-project-api
...
finished return the spaces in get community
2025-03-18 10:18:37 +03:00
faris Aljohari
39ac2e6860
add includeSpaces in the query param
2025-03-18 10:17:29 +03:00