Skip to main content

falkp.no/blog

Tag: Hardware

Graphing X Aircontrol from Trox Technik

Modern buildings have advanced HVAC systems, but they keep the data for themselves. Let’s fight that. =)

Temperature, CO2, airflow.

I got access to an X Aircontrol from Trox Technik, ZoneMaster HVAC system. It has a web server, so I started playing to see what data could be extracted.

I ended up with this script xaircontrol, which can send data to Grafana via Collectd.

We’ve used it to make some sweet floorplans.

Floorplan

Non-invasive graphing of energy usage

“If you can’t measure it, you can’t improve it.”

Reducing energy usage is hard if you can’t see it. Here’s a cheap way to graph home or office energy usage.

By reading data from the energy meter, one can get super accurate, real-time usage data.

Energy graph

I’ve used:

You need some familiarity with all of the above to set this up.

VEML7700 in ESPHome

I have a VEML7700 digital light level sensor, which is not supported by ESPHome, but can be used as a custom i2c component. This is how:

# espnode.yaml

esphome:
...
includes:
    - veml7700_custom_sensor.h
libraries:
    - "https://github.com/adafruit/Adafruit_VEML7700"

sensor:
- platform: custom
    lambda: |-
    auto veml7700 = new VEML7700CustomSensor();
    App.register_component(veml7700);
    return {veml7700, veml7700->lux_sensor, veml7700->white_sensor, veml7700->als_sensor};
    sensors:
    - name: "VEML7700 Light" # Required dummy sensor
    - name: "VEML770 Lux"
        unit_of_measurement: Lux
        accuracy_decimals: 0
    - name: "VEML770 White"
        unit_of_measurement: raw
        accuracy_decimals: 0
    - name: "VEML770 ALS"
        unit_of_measurement: raw
        accuracy_decimals: 0

# veml7700_custom_sensor.h

#include "esphome.h"
#include "Adafruit_VEML7700.h"

// Requires this lib installed: $ platformio lib --global install "Adafruit BusIO"
// based on https://github.com/adafruit/Adafruit_VEML7700/blob/master/examples/veml7700_test/veml7700_test.ino


class VEML7700CustomSensor : public PollingComponent, public Sensor {
public:
Adafruit_VEML7700 veml = Adafruit_VEML7700();

Sensor *lux_sensor = new Sensor();
Sensor *white_sensor = new Sensor();
Sensor *als_sensor = new Sensor();

VEML7700CustomSensor() : PollingComponent(15000) {}
void setup() override {
    Wire.begin();
    veml.begin();
    veml.setGain(VEML7700_GAIN_1);
    veml.setIntegrationTime(VEML7700_IT_800MS);
    // veml.powerSaveEnable(true);
    // veml.setPowerSaveMode(VEML7700_POWERSAVE_MODE4);
    // veml.setLowThreshold(10000);
    // veml.setHighThreshold(20000);
    // veml.interruptEnable(true);
}

void update() override {
    float lux = veml.readLux();
    float white = veml.readWhite();
    float als = veml.readALS();
    ESP_LOGD("VEML7700", "The value of sensor lux is: %.0f", lux);
    ESP_LOGD("VEML7700", "The value of sensor white is: %.0f", white);
    ESP_LOGD("VEML7700", "The value of sensor ALS is: %.0f", als);
    lux_sensor->publish_state(lux);
    white_sensor->publish_state(white);
    als_sensor->publish_state(als);
}
};

Nordlux lamp. Incompetence or planned obsolescence?

I got this lamp from Nordlux, model 6315. It came with unreplacable LEDs, meaning you have to throw it away when they run out. Apparently the LEDs are rated for 30.000 hours, but will they last that long?

Overview

After a few years of normal use it died. I could hear the relay turning on and off, but there was no light. I followed the power all the way, and there seemed to be no problem with the transformer, relay or wires. I tried checking the voltage drop over a LED, and that gave a slight glow in all the other LEDs. So it seems the LEDs are connected in series! Meaning that if any of the 24 LEDs die, you have to throw away the whole lamp. I’m unsure wether this is incompetence or planned obsolescence. What are the odds of all LEDs lasting a long time?

Ninjabox

# Overview

Untrickable laser alarm, with an easy-to-knock-out fusebox.

A tribute to (the alarms in) Mark of the Ninja.

Fusebox

# Background

In the game you have to sneak into buildings with high tech alarms. Some of the laser traps can be deactivated by knocking out the fuse box with a dart.

So I made a laser alarm with a fusebox that can be knocked out. This is mainly to keep kids occupied, and motivated to practice throwing.