Commit graph

239 commits

Author SHA1 Message Date
Claudio Maggioni (maggicl)
68f9b352cd Updaed websocket to perform batch updates 2020-04-12 17:47:03 +02:00
Claudio Maggioni (maggicl)
8629c1f6b4 Adapted websocket code to new redux specification 2020-04-12 15:58:40 +02:00
britea
ad4a5a9c17 Added intensity to knob-dimmer 2020-04-11 18:30:47 +02:00
e46ac02da5 Input output connection routes now accept array of outputs 2020-04-11 17:24:23 +02:00
omenem
0872d7654f 4 attempt to pass pipeline 2020-04-09 15:38:03 +02:00
7bda571a27 thermostat in an entity now 2020-04-09 15:25:34 +02:00
omenem
79b39de6bb 3 attempt to pass pipeline 2020-04-09 15:25:17 +02:00
Jacob Salvi
831a2d07c6 removed id from Curtains.java 2020-04-09 15:17:20 +02:00
omenem
83c2554f29 2 attempt to fix pipeline 2020-04-09 15:12:25 +02:00
Jacob Salvi
7f34e2b391 Merge branch 'dev' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into 51-users-can-add-smart-curtains-blinds
# Conflicts:
#	.gitlab-ci.yml
2020-04-09 14:27:12 +02:00
Jacob Salvi
bdf0f87d77 Added curtains 2020-04-09 13:41:58 +02:00
omenem
9e49da0d00 first fix to try making the pipeline pass 2020-04-09 12:27:04 +02:00
omenem
66bcecdbe0 added security camera device 2020-04-09 12:13:32 +02:00
7cfb2ffc73 Added thermostat, not complete 2020-04-09 11:30:05 +02:00
13db88b810 fix 2020-03-26 11:17:42 +01:00
802cee52f8 fixed cors on password reset 2020-03-26 01:01:49 +01:00
6c9e2a7d7d Fixed ConcurrentModificationException on socket broadcast 2020-03-25 23:13:17 +01:00
27cb73292c Added /auth/profile 2020-03-25 22:41:59 +01:00
c5996608a4 fixed dimmable light 2020-03-25 22:34:15 +01:00
3518647eeb Merge branch '48-redirection-to-frontend-after-email-confirmation-operations-password-reset-and-email' into 'dev'
Resolve "Redirection to frontend after email confirmation operations (password reset and email)"

Closes #48

See merge request sa4-2020/the-sanmarinoes/backend!62
2020-03-25 20:29:48 +01:00
b283a62d0d fixed redirects 2020-03-25 17:31:24 +01:00
britea
60c17b3dd8 Fixed @tommi27 synchronization frenzy for sensors
I have now discovered the Schadenfreude in using git-blame. To quote an
old commit message from high school:
[Trascrizione domande fisica e correzione di GRAVISSIMI bug presenti nel
codici di Maggioni](dd0933def0)
```
La trascrizione dei test è stata fatta in modo certosino, simile a
quello dei monaci emanuensi.
I GRAVISSIMI buggg (3 g perchè fa faigo) potevano rendere il sito
incomprensibile
```
2020-03-25 17:10:27 +01:00
Matteo Omenetti
03bbf6b824 Merge branch '47-fix-cascade-deletion-when-room-is-deleted' into 'dev'
Resolve "Fix cascade deletion when room is deleted"

Closes #47

See merge request sa4-2020/the-sanmarinoes/backend!59
2020-03-25 15:08:39 +01:00
omenem
6ce44e73ff fix min intensity of dimmabke light of 1 in Dimmable Save Request 2020-03-25 14:58:56 +01:00
4281cbaf29 Added installation instructions and tweaked Dockerfile 2020-03-25 14:57:46 +01:00
e776b9c2e5 socket is now sequential and not concurrent 2020-03-25 14:50:05 +01:00
omenem
9fc0224b1d fix room deletion 2020-03-25 14:14:12 +01:00
omenem
08c4ef49a7 delete cascade in room 2020-03-24 15:58:01 +01:00
omenem
f368084464 delete cascade no more in switch 2020-03-23 18:31:46 +01:00
omenem
c17b6df3b5 delete cascade no more 2020-03-23 17:53:22 +01:00
f4d6a3f3c7 RoomController PUT fixed 2020-03-23 16:42:33 +01:00
omenem
8813942cc5 fixxed 2020-03-22 18:19:41 +01:00
600529af41 fixed route names 2020-03-21 15:08:36 +01:00
c3bcfd7e6d Fixed RoomCont... to return specific device data
@tommi27 why are you not avaliable at 1am?
2020-03-21 00:38:01 +01:00
cbfbb81c10 Merge branch '29-check-if-device-is-currently-user-s-own-device-when-updating' into 'dev'
controllers now check if devices belong to the correct user

Closes #29

See merge request sa4-2020/the-sanmarinoes/backend!46
2020-03-18 17:02:12 +01:00
britea
e777f29585 Fix lob errors 2020-03-18 13:29:21 +01:00
Matteo Omenetti
300f749144 Merge branch '35-test-models' into 'dev'
Resolve "Test Models"

Closes #35

See merge request sa4-2020/the-sanmarinoes/backend!43
2020-03-18 12:15:14 +01:00
35540fac80 controllers now check if devices belong to the correct user 2020-03-17 17:38:26 +01:00
7095de71a6 Merge branch '30-add-wattage-data-to-smart-plugs' into 'dev'
Resolve "Add wattage data to smart plugs"

Closes #30

See merge request sa4-2020/the-sanmarinoes/backend!42
2020-03-17 17:01:26 +01:00
835c9e0471 Fixed smaal errors @tommi27 implementation. Fixed precision and scale values or total precision. Optimized update by using JPQL 2020-03-17 16:54:35 +01:00
omenem
313e6ed88e small changes 2020-03-17 15:20:49 +01:00
omenem
fe911d492f small changes 2020-03-17 15:10:49 +01:00
3096c7862c Merge branch '22-test-controllers' into 'dev'
Resolve "Test all new controllers and websocket"

Closes #31

See merge request sa4-2020/the-sanmarinoes/backend!39
2020-03-17 14:02:26 +01:00
2b65198df7 updated smartplug 2020-03-16 17:01:21 +01:00
23edc90b81 Fixed @tommi27 uniqueness frenzy for rooms
I have now discovered the Schadenfreude in using git-blame. To quote an
old commit message from high school:

[Trascrizione domande fisica e correzione di GRAVISSIMI bug presenti nel
codici di Maggioni](dd0933def0)

```
La trascrizione dei test è stata fatta in modo certosino, simile a
quello dei monaci emanuensi.
I GRAVISSIMI buggg (3 g perchè fa faigo) potevano rendere il sito
incomprensibile
```
2020-03-16 14:53:07 +01:00
9c60475e92 Added GET /device route 2020-03-15 17:05:52 +01:00
24fa574c63 Added email confirmation test 2020-03-15 15:06:46 +01:00
620c196393 Implemented fake updates 2020-03-15 14:49:51 +01:00
cf940df6b2 Socket now sends motion sensor updates 2020-03-15 13:51:14 +01:00
5a441a6992 Socket now sends sensor updates 2020-03-15 13:41:57 +01:00
3c034f56d1 Socket authentication works 2020-03-15 10:44:10 +01:00
34dce54575 wip 2020-03-14 20:32:54 +01:00
707291e637 Unauthenticated socket works 2020-03-14 20:32:54 +01:00
589ef8c3cc Imported code from secret source for websockets (@tommi27 you don't know anything about it, right?) 2020-03-14 20:32:54 +01:00
873ef54e13 Merge branch 'dev' into 'web-socket-feature' 2020-03-14 20:22:01 +01:00
73e1328d70 Branch cleaning 2020-03-14 20:07:58 +01:00
5683bbe3e3 Added room icons in model as enum 2020-03-14 19:51:01 +01:00
f52a38082c General rewrite of device controllers. Now only output devices can be
changes with a PUT call on their controller. Other devices use the
generic controller.
2020-03-14 16:59:56 +01:00
ed2900a3bc New abstraction for connections 2020-03-14 12:40:28 +01:00
6fef7663dd Knob dimmer now with new rest conversation scheme 2020-03-13 18:48:19 +01:00
3a97d40858 Button dimmer now with new rest conversation scheme 2020-03-13 18:20:16 +01:00
7bb05b705f Neutralized id value from client in device routes for creation.
Reconfigured Springfox for authentication in device and room routes.
2020-03-13 15:48:20 +01:00
070dde4e69 Fixed CORS config 2020-03-10 15:03:23 +01:00
ca63f0d7df Merge branch 'dev' into '21-test-endpoints'
# Conflicts:
#   build.gradle
2020-03-09 23:14:46 +01:00
dfdf9ba361 Added all paths to swagger documentation 2020-03-09 23:12:39 +01:00
0d9982fb50 Fixed email configuration 2020-03-09 17:06:59 +01:00
omenem
8838beb0e0 Removed setId methods from DTO classes 2020-03-08 18:58:45 +01:00
57e9a53cf1 Password reset manually tested and fixed 2020-03-06 11:10:58 +01:00
860fae779d Added support for password reset (still needs testing) 2020-03-06 10:24:06 +01:00
a0fe5f989a Revert "Added support for password reset (still needs testing)"
This reverts commit 7396e6f0d9.
2020-03-06 10:21:36 +01:00
7396e6f0d9 Added support for password reset (still needs testing) 2020-03-05 17:07:29 +01:00
748c5ba4b4 Added more tests on login/registration 2020-03-05 15:03:23 +01:00
e8a55ae131 Started work on tests 2020-03-05 12:42:53 +01:00
6d2f7a25fb Merge branch '20-put-post-on-room-does-not-move-room-name-in-dto' into 'dev'
Resolve "PUT/POST on room does not move room name in DTO"

Closes #20

See merge request sa4-2020/the-sanmarinoes/backend!24
2020-03-04 17:15:05 +01:00
3dfcd30f4e Fixed POST /room (Git merge I will avenge you) 2020-03-04 17:01:09 +01:00
omenem
2c95915333 Added execpetion when a device is not found 2020-03-04 16:55:53 +01:00
749d79d51e added skeleton for websockets 2020-03-04 16:07:23 +01:00
omenem
6b9dcf2440 You nedd to verify your mail in onder to login 2020-03-04 15:33:58 +01:00
britea
8c1a0db920 fixed login 2020-03-04 15:11:23 +01:00
d209586933 Fixed login request validation 2020-03-04 13:28:51 +01:00
2dff446c23 Adjusted access-control-allow-headers 2020-03-03 12:10:39 +01:00
e43a913ff3 Merge branch '15-enable-cors-for-frontend-interaction' into 'dev'
Resolve "Enable CORS for frontend interaction"

Closes #15

See merge request sa4-2020/the-sanmarinoes/backend!18
2020-03-03 11:41:54 +01:00
4ced73a53d Added CORS origin to * and changed TestController 2020-03-03 11:41:15 +01:00
e806c18809 added uniqueness constraints 2020-03-03 11:04:58 +01:00
c66017c984 Added email support to login 2020-03-03 10:55:35 +01:00
eecee30841 Redoing all @tommi27 work on model since git merge is now sentient and trying to delete stuff from our project 2020-03-02 21:59:49 +01:00
5ae97da8a7 Merge branch 'dev' into 'device-unification'
# Conflicts:
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/config/SpringFoxConfig.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/ButtonDimmerController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/DimmableLightController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/KnobDimmerController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/MotionSensorController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/RegularLightController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SensorController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SmartPlugController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/controller/SwitchController.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/User.java
2020-03-02 21:48:02 +01:00
4f0351cab9 Solved recursive JSON problem in RoomController.getAllDevices() 2020-03-02 21:44:00 +01:00
529adb0d83 Merge branch 'dev' into 'model-update'
# Conflicts:
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/ButtonDimmer.java
#   src/main/java/ch/usi/inf/sa4/sanmarinoes/smarthut/models/KnobDimmer.java
2020-03-02 20:44:11 +01:00
fcf7189e44 Updated email verification workflow to current code practices 2020-03-02 17:11:29 +01:00
51e6bb1f90 Merge 2020-03-02 16:56:43 +01:00
572134bba2 fixed request annotations 2020-03-02 16:15:52 +01:00
Jacob Salvi
2a670630c3 Merge branch 'dev' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into device-unification 2020-03-02 15:41:45 +01:00
Jacob Salvi
d8bea0015b small cahnges 2020-03-02 15:41:37 +01:00
eb6e935892 all controllers updated with DTOs (needs review) 2020-03-02 14:44:01 +01:00
624c857734 updated controllers 2020-03-02 12:11:50 +01:00
3bbc4bcff0 updated buttondimmer controller with dto 2020-03-02 11:02:30 +01:00
6ce90e61cb Swagger configuration 2020-03-01 15:13:47 +01:00
1cf3b1088e Merge branch 'dev' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into model-update 2020-03-01 13:53:53 +01:00
970949f635 Merge branch 'model-update' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into swagger-feature 2020-03-01 13:37:27 +01:00
6be9c80c6e Work on Swagger integration 2020-03-01 12:15:43 +01:00
5d1549cfa2 room controller updated 2020-02-28 17:06:42 +01:00
11d3679fdb Fix to email constraint 2020-02-28 16:57:32 +01:00
Jacob Salvi
c853c4cd4e Added a class DeviceRepository that is needed to mirror in the database the class inheritances that are present among the various Devices. Also the method getDevices, that returns a List of the Devices present in a given room, has been added to RoomController.java 2020-02-28 16:51:31 +01:00
2ae0ab5b15 Merge branch 'dev' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into model-update 2020-02-28 15:29:01 +01:00
01ccf6d968 wip 2020-02-28 15:28:55 +01:00
omenem
2271f4a5b9 Email Verifcation Works 2020-02-27 21:39:38 +01:00
omenem
990f1bd6d4 Initial Setup for email verification 2020-02-27 17:31:28 +01:00
c6a769c1b8 updated button and knob dimmers 2020-02-27 17:24:08 +01:00
omenem
f70084dd40 Added minimum length of password 2020-02-27 09:40:44 +01:00
40785d0cf1 Better email validation for user and partial update for /auth/update 2020-02-27 09:33:03 +01:00
48441dfe07 Started work on input validation 2020-02-26 21:41:54 +01:00
omenem
b2353e9834 Small Changes 2020-02-26 18:58:01 +01:00
omenem
1ab4fee6ff Little changes to Room and dimmableLight classes 2020-02-26 18:56:47 +01:00
Matteo Omenetti
3070113ba2 Merge branch 'dev' into 'controllers-feature'
# Conflicts:
#   .idea/misc.xml
#   git-hooks/pre-commit.sh
2020-02-26 14:51:47 +01:00
0cb1f1606a Updated hibernate DDL policy and solved LazyInitializationException bug on User.toString() 2020-02-26 14:41:11 +01:00
omenem
ae993b0bab New Controllers 2020-02-26 13:25:38 +01:00
4818929dad fixed redundant id in update methods 2020-02-26 11:40:33 +01:00
ad3e5271ac Working auth with JWT 2020-02-25 17:51:45 +01:00
3c0c09c375 added image and icon fields to Room 2020-02-25 16:23:12 +01:00
Jacob Salvi
7195e999ea UserController 2020-02-25 16:07:48 +01:00
a3128b7cb7 added controllers and fixed RoomRepository 2020-02-25 16:04:11 +01:00
03fed60a34 fixed user controller 2020-02-25 15:44:10 +01:00
Jacob Salvi
423e17ecb8 small changes 2020-02-25 15:03:41 +01:00
e26f5976c6 added User controller, renamed DeviceController 2020-02-25 14:38:14 +01:00
omenem
2681806091 First Controller 2020-02-25 14:25:03 +01:00
e3df659e82 Formatted code according to google java (aosp) format 2020-02-24 14:28:13 +01:00
e932c5cf58 Merge branch 'dev' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into data-model-feature 2020-02-24 14:19:06 +01:00
f8c268111c Formatted code according to google java (aosp) format 2020-02-24 14:15:49 +01:00
Claudio Maggioni (maggicl)
a353007651 Upd. models and added repository for each entity 2020-02-23 00:11:09 +01:00
Claudio Maggioni (maggicl)
32f1412564 Improvements to data model
Set up connection parameters for local postgres db. Updated schema in
order not to cause clashes with reserved SQL tokens.
2020-02-22 23:19:34 +01:00
1359800845 Merge branch 'data-model-feature' of lab.si.usi.ch:sa4-2020/the-sanmarinoes/backend into data-model-feature 2020-02-22 11:33:50 +01:00
0cc59e608c Updated models to implement JPA and agreed ER diagram 2020-02-22 11:31:10 +01:00
Jacob Salvi
9f5821e993 small changes to Romm 2020-02-21 16:10:58 +01:00
Jacob Salvi
7d582dbb47 small changes 2020-02-21 15:36:04 +01:00
346d305950 removed giovanni 2020-02-21 14:26:14 +01:00
0489d0221c Updated to the skeleton data model
Added the concept of rules and a few interfaces
2020-02-21 14:23:07 +01:00
6fc17052c6 Added a sketch of the data model
Added a rough hint of the class structure needed to store the
application state
2020-02-20 21:58:23 +01:00
62087e2b49 Imported Spring Boot starter project 2020-02-20 15:22:37 +01:00