@etrigan63 we understand that’s the overall aim here but as you’re starting to modify things we can get a bit more specific.
There are a few options still available, as I put in my initial reply. To clarify, the current version (as of writing it’s v1.8.3) of balenaSense will not read the barometric pressure from the Sense-HAT. The reason for this is that we interface directly with the sensors on the board and do not use the full Sense-HAT library as it includes a lot of dependencies related to the other functions of that HAT which we don’t want to include in the project. This is especially true as the main focus of the project is not the Sense-HAT because it doesn’t have any sensors that allow us to give a reading for air quality.
I see you tried uncommenting the pressure reading line, which is a good start, but simply uncommenting that line will not work without going back and installing the full Sense-HAT library (as a mentioned a couple of times by my colleagues earlier in this thread) which was present in v1.0.4, otherwise there would be no reason for it to be commented in the first place. You’re making the changes which take the sensor reading and insert it into the database, which are kinda the more superficial changes which would be required after you solve the problem of actually retrieving the data from the sensor. As mentioned this either requires the Sense-HAT libraries to be installed (you can see how that was done in v1.0.4 here) or adding support for the LPS25H (I linked some possible ideas in my first reply).
As you found, going back to the older version worked, but then you won’t be able to use the features that were added after v1.0.4, such as the temperature offsets or altitude compensation for pressure.
I’d recommend that you focus your efforts on adding support for the LPS25H pressure sensor (the one that’s on the Sense-HAT board) rather than trying to backport new features to old versions, this approach will be a lot cleaner, involve less problem solving/conflict resolution and then we can add it to the project and support it going forward if you figure it out. We won’t be adding the full Sense-HAT libraries to the current version for the same reasons as they were taken out, so the only way the pressure sensor would be fully supported going forward is via this route. This is unless something has changed with the official libraries and that they can now be used to obtain the pressure reading without installing a lot of extra packages. If you do want to continue hacking at it, the replies in this thread have all the information you’d need. You can use the comparison tools on Github to show you what changed between the two versions as well as the local development mode on the device as linked above to make instantaneous changes without having to go via the cloud - be warned though, the Sense-HAT libraries do take a while to build (another reason why they were removed)!
If you’re not able to get it working, definitely head over to the Github repo and add an issue asking for it to be supported, and we can consider adding it in the future. If you do figure it out you’re welcome to submit a PR on Github and we can add it to the project so that it’s supported with all the new features. Right now though, add support for this sensor is not a priority as we have others we’d like to add first (notably the Pimoroni Enviro+ PHAT which has a particulate sensor option amongst others, which are more beneficial to the air quality monitoring purposes of the project).