Fixed all major bugs in the old #126-ElectricityData branch with the this new branch and can now generate mockup data of electricity from different sensors #447

Merged
b24johka merged 3 commits from #126-ElectricityDataMockup into team_1_week_2 2026-04-22 06:49:19 +00:00
Collaborator

made adjustments to the build and installation scripts to include all dependencies and build correctly

to test just run the rebuild script and then use the link
http://localhost/api/energy/all
to see the data

made adjustments to the build and installation scripts to include all dependencies and build correctly to test just run the rebuild script and then use the link http://localhost/api/energy/all to see the data
made adjustments to the build and installation scripts to include all dependencies and build correctly

to test just run the rebuild script and then use the link
http://localhost/api/energy/all
to see the data
a24hirsa changed title from Fixed all major bugs in the #126-ElectricityData branch with the previous branch and can now generate mockup data of electricity from different sensors to Fixed all major bugs in the old #126-ElectricityData branch with the this new branch and can now generate mockup data of electricity from different sensors 2026-04-20 12:36:02 +00:00
Author
Collaborator

The branch to be tested is "#126-ElectricityDataMockup" not any other version of a #126 branch. "#126-ElectricityData" is a old branch that had major bugs from git and alot of walk backs all relavent changes and modifications can be found in the branch that is to be tested

The branch to be tested is "#126-ElectricityDataMockup" not any other version of a #126 branch. "#126-ElectricityData" is a old branch that had major bugs from git and alot of walk backs all relavent changes and modifications can be found in the branch that is to be tested
Author
Collaborator

Branch is up to date with team_1_week_2 branch but some weird artifacts have appeared in the compose.yaml file for some reason, nothing mind bending just the same lines for parkingdbhandler being removed then added back. Most likely due to the formatter running on all scripts in the branch after building due to it being a new branch on a new repo clone so it should be a non issue

Branch is up to date with team_1_week_2 branch but some weird artifacts have appeared in the compose.yaml file for some reason, nothing mind bending just the same lines for parkingdbhandler being removed then added back. Most likely due to the formatter running on all scripts in the branch after building due to it being a new branch on a new repo clone so it should be a non issue
b24johka 2026-04-21 07:07:42 +00:00
f21marfo left a comment
Collaborator

I’ve reviewed the issue and the submitted changes.

A large portion of the code appears to be directly copied from the tempSensor suite, with mostly superficial renaming. As it stands, it doesn’t meaningfully represent or model energy usage. For example, energySensorMockup/Program.cs still contains a comment referencing readTempSensorMockup, which suggests the implementation hasn’t been fully adapted.

The goal of #126, as described in the related issue #41, is to enable monitoring of electricity usage in university housing. The current mockup data does not meet that objective, and there’s no clear indication of how it could be used to approximate real energy consumption.

Another concern is the lack of documentation. There are no XML comments for methods or endpoints, and no explanation of how the data is generated, processed, or intended to be used. This makes the code difficult to follow, similar to the existing tempSensor suite it’s based on.

On a minor note, “kilowatt” is misspelled as “kilowat.”

Practical testing:
I performed a clean install from this branch and ran WindowsInstallation.bat and WindowsRebuild.bat on a Windows 11 (25H2) system. The build completed without issues; however:

  • readEnergySensor fails to run in docker and produces an error.

image

Given these issues, I can’t recommend merging this pull request in its current state. It would benefit from further iteration, particularly focusing on implementing meaningful energy data, improving documentation, and resolving the runtime errors.

I’ve reviewed the issue and the submitted changes. A large portion of the code appears to be directly copied from the tempSensor suite, with mostly superficial renaming. As it stands, it doesn’t meaningfully represent or model energy usage. For example, energySensorMockup/Program.cs still contains a comment referencing readTempSensorMockup, which suggests the implementation hasn’t been fully adapted. The goal of #126, as described in the related issue #41, is to enable monitoring of electricity usage in university housing. The current mockup data does not meet that objective, and there’s no clear indication of how it could be used to approximate real energy consumption. Another concern is the lack of documentation. There are no XML comments for methods or endpoints, and no explanation of how the data is generated, processed, or intended to be used. This makes the code difficult to follow, similar to the existing tempSensor suite it’s based on. On a minor note, “kilowatt” is misspelled as “kilowat.” Practical testing: I performed a clean install from this branch and ran WindowsInstallation.bat and WindowsRebuild.bat on a Windows 11 (25H2) system. The build completed without issues; however: - readEnergySensor fails to run in docker and produces an error. ![image](/attachments/50905c3a-4119-4c65-b670-ee9bc65cf377) - Accessing http://localhost/api/energy/all returns an HTTP 500 error (“This page isn’t working right now”). Given these issues, I can’t recommend merging this pull request in its current state. It would benefit from further iteration, particularly focusing on implementing meaningful energy data, improving documentation, and resolving the runtime errors.
Author
Collaborator

A large portion of the code appears to be directly copied from the tempSensor suite, with mostly superficial renaming. As it stands, it doesn’t meaningfully represent or model energy usage. For example, energySensorMockup/Program.cs still contains a comment referencing readTempSensorMockup, which suggests the implementation hasn’t been fully adapted.

Comments were added and changed and small changes were made to make it more inline with its own structure. Similarites exists as tempmockup and elecmockup both simulate data taken from buildings and rooms using different sensors

The goal of #126, as described in the related issue #41, is to enable monitoring of electricity usage in university housing. The current mockup data does not meet that objective, and there’s no clear indication of how it could be used to approximate real energy consumption.

The possible uses of energy data are extremely broad and specific based on user type. I have added a total cumulative energy usage that track for every sensor individually and all sensors combined, paths can be found in the energyService program.cs. As this data can be used to calculate costs. Other uses such as taking temperature, cooling, heating to calculate future energy use using prediction measures are extremely large tasks that require their own issues later down the line.

Another concern is the lack of documentation. There are no XML comments for methods or endpoints, and no explanation of how the data is generated, processed, or intended to be used. This makes the code difficult to follow, similar to the existing tempSensor suite it’s based on.

This i agree with. I added some explanatory comments of usage in energySensorMockup and energyService. I myself don't fully understand all elements of the reader as i have only had barely one week to work on this but it functions similarly to roombooking and other services. These structures are about to be completely changed soon with the new middle ware version this coming merge so they will have to be tackled as a seperate issue later

Practical testing:
I performed a clean install from this branch and ran WindowsInstallation.bat and WindowsRebuild.bat on a Windows 11 (25H2) system. The build completed without issues; however:

readEnergySensor fails to run in docker and produces an error.

image

Accessing http://localhost/api/energy/all returns an HTTP 500 error (“This page isn’t working right now”).

This seems to be a docker/vscode error as i had it in the broken branch before which lead me to making a new clone of the repo. Me and a24timsv tested on his windows machine before doing any changes to the code and it worked as intended. Everyone will have to make sure to run the installation then the build so they can get all dependencies correctly.

> A large portion of the code appears to be directly copied from the tempSensor suite, with mostly superficial renaming. As it stands, it doesn’t meaningfully represent or model energy usage. For example, energySensorMockup/Program.cs still contains a comment referencing readTempSensorMockup, which suggests the implementation hasn’t been fully adapted. Comments were added and changed and small changes were made to make it more inline with its own structure. Similarites exists as tempmockup and elecmockup both simulate data taken from buildings and rooms using different sensors > The goal of #126, as described in the related issue #41, is to enable monitoring of electricity usage in university housing. The current mockup data does not meet that objective, and there’s no clear indication of how it could be used to approximate real energy consumption. The possible uses of energy data are extremely broad and specific based on user type. I have added a total cumulative energy usage that track for every sensor individually and all sensors combined, paths can be found in the energyService program.cs. As this data can be used to calculate costs. Other uses such as taking temperature, cooling, heating to calculate future energy use using prediction measures are extremely large tasks that require their own issues later down the line. > Another concern is the lack of documentation. There are no XML comments for methods or endpoints, and no explanation of how the data is generated, processed, or intended to be used. This makes the code difficult to follow, similar to the existing tempSensor suite it’s based on. This i agree with. I added some explanatory comments of usage in energySensorMockup and energyService. I myself don't fully understand all elements of the reader as i have only had barely one week to work on this but it functions similarly to roombooking and other services. These structures are about to be completely changed soon with the new middle ware version this coming merge so they will have to be tackled as a seperate issue later > Practical testing: I performed a clean install from this branch and ran WindowsInstallation.bat and WindowsRebuild.bat on a Windows 11 (25H2) system. The build completed without issues; however: readEnergySensor fails to run in docker and produces an error. image Accessing http://localhost/api/energy/all returns an HTTP 500 error (“This page isn’t working right now”). This seems to be a docker/vscode error as i had it in the broken branch before which lead me to making a new clone of the repo. Me and a24timsv tested on his windows machine before doing any changes to the code and it worked as intended. Everyone will have to make sure to run the installation then the build so they can get all dependencies correctly.
Collaborator

Very detailed and appropriate review, this will be merged into our team branch.

Very detailed and appropriate review, this will be merged into our team branch.
b24johka merged commit e172c5fc5d into team_1_week_2 2026-04-22 06:49:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!447
No description provided.