Tuesday, 28 November 2023

Wix v4 - Launch Condition syntax

 Just wasted too much time figuring out what was wrong with the following rather trivial line:

<Launch Condition="'$(Name)' = 'thebestname'" Message="no documentation for you"/>

This line results in the following error:

Error WIX0204 ICE03: Bad conditional string

It seems it should have single outer quotes and double innerquotes:

<Launch Condition='"$(Name)" = "thebestname"' Message="sillyness"/>

This is far from the only issue with Wix v4 I had which would have been avoided given decent documentation. If, like me, you do not have previous Wix experience and just want to dive in Wix v4, I strongly discourage you to do so.

For completeness, with a property (my actual use case) instead of a literal it looks like this:

<Launch Condition='"$(Name)" = THE_PROPERTY' Message="uh oh"/>

Sunday, 5 September 2021

Demand driven ventilation on a budget, part 1 : the options

Introduction

Our house dates from the ages where energy efficiency was an afterthought, meaning that half of the windows are single glazed, the walls are solid brick and isolation was nowhere to be found. A perfect place to burn lots of dinosaur piss!

Well, I'd rather not. The roof already has been renewed, windows soon will be, and a layer of isolation will cover the existing brick walls. In Belgium, renovations of this order require me to get my ventilation in order: being able to extract air in the order of 400 m3 / hour.

A quick calculation tells me that the energy required to heat the air coming from outside to room temperature is in the order of 1 KWh per 400 m3. Pretty significant if you would keep this system turned on 24/24.

That brings us to demand driven ventilation. Let's just extract air whenever the air in a room is too polluted or humid. Or in Belgian Technical terms: a C+ ventilation system.

Options

What are our options? I'll pick a few popular brands. The configuration is one that I assume to be very common in similar renovations, a thorough one in which you do not want to have ducts through the entire house, to avoid losing space. In particular, this means that I will use both vents in my roof to extract from the attic and the first floor and vents in the cellar to extract from the ground floor and the cellar.

An important consequence is that I can't use one central extraction unit, I will have two separate small technical spaces in which I will centralize extraction hardware.

Renson

The Renson Healthbox is a system that is supposed to run on minimal power for each of the connected vents, and increases power based on measurement performed on the incoming air. As it comes with valves, I assume it adjusts the airflow using these valves to avoid extracting at max power everywhere when there is just one room that has bad air quality.
Sensors and valves are present inside the central unit, installation seems simple enough, you just attach the passive hardware and you're good to go.
In my case, I would have to buy this piece of active hardware twice, once for the attic and once for the basement, resulting in a total cost of EUR 2500 for the active hardware.

Duco

Duco is a bit more modular, the ducobox focus comes without the sensors and actuators. The box is EUR 650, a CO2 sensor/valve is EUR 200 and a humidity sensor/valve is EUR 150. In my case this would result in a total of about EUR 2000, probably a bit more including the remote etc.

Custom solution

Given my use case and me looking for a toy project, it quicly became obvious that I was going for a custom solution. As I'm - no idea why - documenting it, I'll try to make it easy to make, use and understand.
The basic design requirements : 
  • Based on tube fans, which are compact and high performance. I'll go for models with a built-in valve preventing reverse airflow.
  • The tube fans ideally have adjustable power. Depending on the room / use case this might not be the case for every single fan. E.g. a toilet might be ok with a simpler tube fan.
  • The sensors should be affordable but still yield useable numbers. This might be one of the more interesting and research intensive parts.
  • Home Assistant integration
  • It should be trivial to hook up manual and semi automatic controls for people not wanting to use Home Assistant. In other words, a very simple IO interface exposing sufficient controls.
Cost estimation: between EUR 100 and 200 for a single tube fan, depending on the fanciness. Sensors : about EUR 50 for the raw hardware, including accessories might go up to EUR 100 per measuring spot. A raspberry pi, EUR 50. Other accessories : EUR 100.
As I've got 4 rooms where I'd like to have extraction, the active hardware will cost me an estimated EUR 1000. We'll see whether that holds once the hardware has been selected, the subject of the next post.

Thursday, 30 April 2015

Windows samba printers in Kubuntu

Yet another self document post.

To be able to add an smb printer through the gui, I installed the following three packages (not all might be necessary):
cifs-utils
python-smbc
smbclient

Monday, 30 June 2014

Fresh Kubuntu 14.04: my sudo apt-get checklist

It is about time I document this.
My personal context: Kubuntu, OpenGL, C++, development.

First of all: Install Kubuntu. Despite its quirks and binary driver hassles, still my favorite distro. Next, the packages.

My main enviroment, kdevelop pulls in most dependencies like gcc:

sudo apt-get install kdevelop cmake

3d stuff, I don't really need glut but it pulls in most of the OpenGl dependencies.

freeglut3-dev libxrandr-dev libxi-dev

Some boost libs which pull in their own dependencies.
I stick with 1.54 because that's the version Kubuntu uses for its own tools apparently.

sudo apt-get install libboost-filesystem1.54-dev libboost-thread1.54-dev

and finally, convenience!

sudo apt-get install yakuake vim

Still not done though, Kubuntu suggested installing the nvidia binary driver, which I did, as without it you get crappy or no OpenGL. Unfortunately, this kind of stuff still does not work very well, as I was greeted by the following stuff upon the next apt invocation:

The following packages have unmet dependencies:
xserver-xorg-video-all : Depends: xserver-xorg-video-nouveau but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Bottom line: package system broken. I guess some kind of fake nvidia xorg package should have been marked as installed, but it was not. As it was a fresh install anyway, I gave it a shot and decided to uninstall the complaining xserver-xorg-video-all. Not a lot to lose. This seemingly empty meta package was not doing anything anyway, except for being annoying.

Tuesday, 30 July 2013

Intel Smart Response Technology on Elitebook 8570w

Another timewaster: when installing an Elitebook with hybrid SSD/harddisk storage from scratch, do not install the latest version of Intel Rapid Storage Technology (aka RST or RSTe). It won't show the 'accelerate' button for some reason, no matter what you try. Install the one provided by HP, which is an older version. (11.1.5.1001 in my case). That's all for now.

Tuesday, 19 March 2013

About the AMD fglrx repository drivers

After wasting one day of work on this issue, I want to make sure that no one else has to figure this out on his own. What a waste of time.

Yesterday I attempted to replace a custom glsl function with a more generic one, which uses a for loop based on a compile time range. Should be fine, the glsl compiler can safely unroll the loop and everything is well. Apparently not. The first version was unbearably slow:

const int blockSize1d = 2;
float sampleRecoTex_generic(vec2 pos, float[blockSize1d*blockSize1d] textureData) {
  pos *= blockSize1d;
  float value = 0;
  for(int x = 0; x != blockSize1d; ++x) {
    for(int y = 0; y != blockSize1d; ++y) {
      vec2 center = vec2(x + 0.5, y + 0.5);
      vec2 dist = abs(center - pos);
      vec2 weight = 1 - min(dist, vec2(1,1));
      value += weight.x * weight.y * textureData[y + x * blockSize1d];
    }
  }
  return value;
}
Hmmm. Maybe the compiler doesn't like nested loops, even though a decent compiler should be able to figure out it can be unrolled completely. Let us remove one loop (nevermind the swizzling):

float sampleRecoTex_generic(vec2 pos, float[blockSize1d*blockSize1d] textureData) {
  pos.xy = pos.yx;
  pos *= blockSize1d;
  pos = clamp(pos, vec2(0.5, 0.5), vec2(1.5, 1.5));
  float value = 0;
  for(int texIndex = 0; texIndex != blockSize1d*blockSize1d; ++texIndex) {
    int x = texIndex % blockSize1d;
    int y = texIndex / blockSize1d;
    vec2 center = vec2(x + 0.5, y + 0.5);
    vec2 dist = abs(center - pos);
    vec2 weight = 1 - min(dist, vec2(1,1));
    value += weight.x * weight.y * textureData[texIndex];
  }
  return value;
}
This ran at a decent framerate, but produced consistently incorrect results. After way too much manual tweaking, second opinions and more wasted time, I unrolled the loop myself. It ran fine. I should have suspected the compiler much earlier ... I double checked the issue by booting into Windows (and struggling through the usual half hour of updates), where a recent AMD driver was installed. All fine. Reboot into Ubuntu, removed the repository driver (for reference, fglrx-amdcccle-updates:amd64 (9.000-0ubuntu3), fglrx-updates:amd64 (9.000-0ubuntu3), fglrx-updates-dev:amd64 (9.000-0ubuntu3)), installed the latest non beta driver from amd.com and everything ran fine!



Thursday, 7 June 2012

HP SAN switch: upgrading the firmware

This was supposed to be a quick update about how we managed to reconfigure our HP Storageworks 4/8 SAN switch. Alas, it isn't. After managing to get the java configuration interface back up and running, the thing still would fail on certain configuration actions like renaming aliases.
It seemed sensible to me to upgrade the firmware, the latest firmware according to the HP support website is 6.2.2f, whereas our switch still runs on 5.3.0; carbon dating pointed out that this version might be about 5 years old.
Support page:
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=1143865&prodTypeId=12169&prodSeriesId=1143864&swLang=8&taskId=135&swEnvOID=54
Obviously, the sluggish java web start interface did not allow for any firmware updates, a 200+ MB management tool called Data Center Fabric Manager is necessary for this. The setup does not configure a username or password, it assumes that you read the manual which includes the default username and password: Administrator and password. 
Once that minor annoyance has been dealt with, you can add your switch one smile: there is an option called firmware management! We can upload new firmware versions to a repository on an FTP server, because FTP is this high tech protocol that everyone just loves you know. After adding the latest firmware, we can start the upgrade, with the following result:

Right. We need 6.1. HP is an awesome company and apart from creating annoyances, they also provide stuff to solve them. Downloading 6.1, adding it to the repo. Result:

Great. What else do they provide. Interim B-Series Firmware V6.x upgrade path for HP StorageWorks Fibre Channel Switches. Looking good, the website lists some even older versions, with an interesting footnote: effective date - September 2011. No idea what that is supposed to mean. Maybe our calendar system is a bit off and HP got it right.

After ending up with 1.44 GB of firmware upgrades, my colleague figured out a Java version that was willing to execute the java interface presented by firmware 5.3.0 without any complaints: Java 1.5 update 1. Kinda old and a reason to continue the update adventure. The update to 6.0.1a went smooth and resulted in a broken EZManager (simple version of the interface) and a nicely working advanced interface (http://<ip>/switchExplorer.html) Updating to 6.1.2b did not change this issue. It might have something to do with cached jar's, I did not investigate this as the advanced interface is ten times better. Same story for the update to the most recent version, version 6.2.2f

End result: http://local-switch-ip/switchExplorer.html works without any issues. The standard interface does not.

Update:
switchExplorer.html still has issues. We ended up updating the zoning configuration of the switch with the same tool I used for updating the firmware. :)