Tuesday, May 14, 2024

Residences as Utility Infrastructure

The universal first troubleshooting step is to reboot. No matter what the product is, no matter what the problem is, try turning it off and back on &emdash; which is how I found myself figuring out how to reboot a solar inverter. It turns out to be difficult to power cycle something which makes its own power.

When we added solar panels to the roof in 2019, we chose a SolarEdge inverter with an integrated vehicle charger, expecting to never acquire another gasoline car. We have been happily using the SolarEdge inverter to charge the EV we subsequently acquired.

Happily charging until Saturday, that is. I boggled plugging in the car, quickly pulling the plug out and back in without fully intending to. The inverter beeped and the car's indicator lit when first plugged in, then turned off and didn't come on again. There it sat, neither charging nor disengaging no matter what I did. Left a few hours, it just sat there not charging. Plugging it in again the next morning did not change anything.

So: time to reboot it.

Getting an inverter to fully reboot requires cutting power from every source that sneaky thing might use:

  1. Turn the switch to disconnect from the photovoltaics.
  2. Turn off the breaker where the inverter connects to the house electrical panel.
  3. Pull the shutoff switch to disconnect from the grid completely. This would have powered off the whole house were there no batteries.
  4. Wait for capacitance in the inverter to drain and all of its LEDs to turn off, then another 60 seconds.

Commercial buildings have long been responsible for substantial utility infrastructure, from boilers to electrical transformers to, sometimes, subway connections and underground steam tunnels. Residences have typically hosted much less infrastructure, and the equipment has been gradually refined so as to be simple for the homeowner. Ground fault breakers, electric starters for pilot lights, and so on have all been developed to minimize the need for a residence to have to deal with odd failures or dangerous conditions.

The clean energy transition is moving more infrastructure into residences which might once have been exclusively the domain of a service provider. Very few homes have a private gasoline station, but many will have private chargers. Very few homes have generators supplying their electricity, but many will have solar and virtual power plants using residential batteries in unison are already here.

The design of infrastructure for residential use has to take into account that the property owner won't be knowledgeable about its operation. There won't be an engineering department, there won't be anyone paying attention to it. I have on the whole been happy with the inverter and the Powerwell it connects to, but there is more to be done to handle odd cases like this.

Saturday, April 27, 2024

SF Climate Week 2024 Fini

SF Climate Week is drawing to a close. For me the highlight was being in the audience for a live recording of the My Climate Journey podcast — especially the discussion with California State Senator Scott Weiner regarding SB253, a new law requiring corporate disclosure of emissions data, including Scope 3 indirect emissions.

Most emissions resulting from the activities of large companies are Scope 3, the collection of suppliers and vendors and other firms which individually are small enough to not be required to file disclosures, but whose aggregate emissions become quite large.

As with MethaneSAT, a satellite service mapping large methane sources, the mere existence of data from SB253 will lead to action. Companies will take some amount of proactive steps to reduce their emissions, but more importantly third parties will know where to target both pressure to improve and products to help with that reduction.

It was also a useful week on my own climate journey. I am seeking opportunities to work on climate change solutions, an area where I have several years experience and can bring skills from a larger number of years in Tech. I would welcome contact with hardware, software, management, or leadership opportunities in climate solutions, please reach out.

Monday, April 22, 2024

SF Climate Week 2024

This is SF Climate Week, a week of talks and events about climate change mitigation, adaptation, and solutions.

Many of the events are at 350 California Street which is the home of 9zero, a climate focused co-working space. I'll be in the city much of the week to attend a few sessions and as a volunteer to help with a few sessions.

Friday, February 2, 2024

Unwitting Salary Survey Participant

I had a call with the head of HR for a company whose mission and product look interesting, dealing with renewable energy. The head of HR is leading the search for a new VP Eng.

The first, and only, question was about the offered salary range. It is at 20% of typical for a VP role. Did I think that was too low? Would I even consider the role? The CEO thinks they can find someone at this salary. The head of HR is not convinced. We talked about compensation for a bit.

Then they ended the call, saying that I am not a fit.

Props for the hustle, I guess, avoiding paying OpenComp by sourcing some data yourselves.

Friday, July 23, 2021

Kthubernetes

Inconceivable: zero hits for "Kthubernetes" ?

Unacceptable. This will not stand.

Thursday, November 28, 2019

gdaldem color-relief is my BFF

When working with geospatial data and maps, an effective way to communicate in email is to send images highlighting the specific thing one wants to point out. For example, showing areas where the dominant land cover is lichens:

gdaldem, though named for its role in processing Digital Elevation Maps, is a useful tool even for things which have nothing to do with elevation. It has a color-relief subcommand intended for color gradients of terrain but which can be used for lots of purposes. It takes a simple text file mapping pixel values in the original to colors in the output. For example, my lichen image above used:

0 black
1 grey
139 grey
140 red
141 grey
209 grey
210 black
211 grey

This means:

  • pixel value of zero (NoData in the original image) should be colored black.
  • water is pixel value 210 in the original image, so make it black as well.
  • the land cover class for lichen in the original image is 140, so color it red.
  • we set grey for 1 and 139, for 141 and 209, and for 211 because by default, gdaldem color-relief would create a gradient of colors between those specified. We want those areas to be solid grey.

The original image was:

Monday, September 9, 2019

Mini-split Heat Pump Installation

We live in a home which was built in 1963, older than we are. The structure has some great attributes and some not-so-great attributes. Among the not-so-great is the lack of air conditioning, and a pair of ancient furnaces with very high gas bills. We set out to do something about this.

  • We wanted to add air conditioning.
  • We wanted a much more efficient heating system.
  • The ducts were 50+ years old and clearly leaky, with dirty patches in the insulation at each joint where the duct has been pulling air through for decades. They would not pass current inspections.

As essentially none of the existing HVAC would remain, we could consider options which didn't preserve any of it. We decided to go with a ductless mini-split heat pump system.

A heat pump is an idea which has been around for a while. It operates similarly to an air conditioner in that it repeatedly compresses and expands a refrigerant, circulating it in and out of the house while doing so. The difference is that where an air conditioner always compresses the refrigerant outside of the house to release heat, the heat pump can also reverse the process to release heat inside. A heat pump can either heat or cool based on where it allows the refrigerant to expand.


 

There are heat pumps which can replace a central furnace and hook up to the existing ducting, but as the ducts were in terrible shape we opted for a mini-split system. There is no central air handling nor air ducts in this system, there are individual units in each room which are connected to a compressor outside.

In each major room a head unit is mounted high on the wall, and contains refrigerant coils and fans. Air is circulated within the room, not drawn from nor exhausted to the outside.


 

The head unit connects to power and two refrigerant lines. This picture was taken during the installation, with the wall open and the two copper refrigerant lines not yet hooked to the head unit.

Note that there is no air duct: air is not moved through the home with a mini-split, only refrigerant. The head unit can cool or heat air drawn from the room, using the refrigerant to pump heat in or out of the house.

I emphasize the lack of ducts because it was a big mental hurdle for us. In a retrofit the heat pump units can go anywhere, placement is not constrained to where ducts currently go.


 

The head unit contains a filter in front of the fan, but the activated charcoal portion of the filter covers only a small portion of the area. We have no way to measure the effectiveness of this filter, but we are skeptical as it seems like air can flow around it easily.





The refrigerant connections are quite small, half inch diameter copper pipes plus insulation, so they can run between studs in the walls and under the house. They all eventually lead to an outdoor unit, which contains a fan and radiating fins like an air conditioner outdoor unit would.

The outdoor unit is available in a few capacities, rated in British Thermal Units (BTUs) like 20k - 50k. The head units inside the home are also rated in BTUs, from 9k through 24k, and one adds up the rating of the head units to determine the capacity of outdoor unit required.

Our home needed two outdoor units, a larger 50k BTU unit for the upstairs and smaller 20k unit for the lower level.





With a furnace or central air, a single thermostat controls the HVAC. That thermostat might be very sophisticated with multiple room sensors, but there is a single central point where control can be implemented.

With ductless mini-split systems, there is no single point of control. Each head unit implements its own local control, it can implement its own schedule, etc. The system is supplied with a handheld remote control for each head unit. It appears to be infrared, and it is not strongly paired with a given head unit. If you take it into another room and point it at a head unit in that room, it will control the head unit in the new room.

The remote is quite complicated. It can change the mode from heating to cooling to fan (and others). It can program weekly schedules. For some models of head unit, it can configure an occupancy sensor feature to aim the airflow directly at people in the room and turn off if nobody is present. Etc, etc.

We use the remote controls for all but one of the head units. For the last unit, we had reasons to not want to change how the HVAC system is operated and wanted to retain the existing themostat on the wall exactly as it was. Mitsubishi has an interface to allow this, connecting any 5-wire thermostat to control a single head unit.





A few things we wish we'd known at the start, in case anyone reading this is planning their own heat pump installation:

  • All of the head units attached to a given outdoor unit have to be cooling or heating, not a mixture of both. We got lucky in this: we needed separate outdoor units for each level, and this matches our usage as the lower level doesn't get so warm while the upstairs needs cooling during the summer.
  • The smaller outdoor units can be attached to the side of the house on a bracket. The larger outdoor units require a concrete pad to be poured. Had we known this we might have chosen to go with three smaller outdoor units and had them all mounted to the side of the house.

At the time of this writing we've had the system for five months, through our first summer. It has been great having the option to cool the house on those days which need it. We are just heading into the cooler months, and we're hoping to see a substantial reduction in the energy bill.

We're quite happy with the system. Heat pumps are also an effective means to help with global warming by improving efficiency and reducing use of methane, and are #42 on Project Drawdown's list.





Our system consists of:

  • 3 x MSZ-FH15 15k BTU head units
  • 1 x MSZ-FH12 12k BTU head unit
  • 3 x MSZ-FH06 6k BTU head units
  • 1 x MXZ-8C48 48k BTU outdoor unit
  • 1 x MXZ-2C20 20k BTU outdoor unit
  • 1 x PAC-US444CN thermostat interface
  • electrical panel work to rearrange breakers and install new 40A and 25A circuits
  • permits and fees
  • demo and removal of old ducts and furnace equipment

The total cost was $31,665 for equipment and installation, in the SF Bay Area where the cost of living is high. Our gas bill in the winter with the old furnaces was often $400/month, which should decline substantially with an electric heat pump powered by solar panels on the roof.

The system was provided and installed by Alternative HVAC Solutions in San Carlos, CA, and we were quite pleased with their work.

Monday, August 12, 2019

LED bulbs for FLOS Fucsia light fixtures

The home we currently live in had a FLOS Fucsia 8 light fixture in the dining room when we moved in. The look of the fixture and the gentle chimes it makes when a breeze blows in from outside is quite appealing.

However we decided not to keep the light bulbs it came with, Philips Spotone NR50 25 Watt halogen bulbs. Replacing them with LEDs turned out to be considerably more difficult than we expected, this post is intended to help anyone else with one of these fixtures who is looking for options.



The base of the bulbs is one not commonly used in the United States: E14. A "candelabra" bulb is E12, a regular bulb is E26. In this nomenclature the E is for "Edison" and refers to the type of screw in base, and the number is millimeters width. The base of the bulbs used in the FLOS Fucsia line of fixtures are slightly larger than a candelabra bulb.

Though not common in the United States, E14 bulbs are quite common in Europe, which means that most of the E14 bulbs you find are designed for the European voltage of 220V and not the US voltage of 120V. Bulbs which are not dimmable will often work all the way down to 85V, but dimmable bulbs are calibrated for 220V and when powered at 120V they are fully dim or all the way off.



It took several tries to find dimmable bulbs which work at the US voltage in this fixture:

  • we first bought non-dimmable bulbs from EBD lighting. These worked, but we missed being able to have a more intimate dinner with the lights turned low.
  • we unintentionally bought dimmable bulbs for European voltage. These did not work at all at 120V, the light would not turn on.
  • a bit later, we found the perfect bulbs: AAMSCO is a specialty vendor which makes an LED version of the E14 NR50 spotlight which is dimmable at 120 volts. It is about 4x as expensive as most LED bulbs, but a perfect fit for this fixture. We felt it was worth splurging. We bought them at lightbulbmarket.com, which offers a box of 10 bulbs at a small discount.



This image shows the comparison between the original Philips Spotone halogen bulbs, the non-dimmable EBD Lighting bulbs, and the AAMSCO dimmable bulbs. The EBD bulbs have a notably bluer temperature and are considerably brighter than the other two. The AAMSCO LED bulbs roughly match the temperature and light output of the original halogens.




The climate change connection: energy savings from LED lights is the #33 solution for global warming on Project Drawdown's list.

Monday, July 1, 2019

Discourse.org SSO with gitlab.com

A previous post discussed how to set up a Discourse forum to run as a service within JupyterHub. Though this makes the forum appear within the URL space of the JupyterHub server, it still runs as a completely separate service with its own notion of accounts and identities. We're tackling that in this post, describing how to make Discourse use single sign on (SSO) from gitlab.com, which is also how we set up JupyterHub accounts to work.

The previous post went over creating a JupyterHub service configuration for the Discourse service. We now add a second service, for the SSO server. This example is for The Littlest JupyterHub, where we create a snippet in /opt/tljh/config/jupyterhub_config.d/discourse-service.py.

c.JupyterHub.services = [
    {
        'name': 'forum',
        'url': 'http://172.17.0.2:80/',
        'api_token': 'no_token',
    },
    {
        'name': 'discourse-sso',
        'url': 'http://127.0.0.1:10101',
        'command': ['/opt/tljh/user/bin/flask', 'run', '--port=10101'],
        'environment': {'FLASK_APP': '/opt/tljh/hub/bin/discourse-sso.py',
            'GITLAB_CLIENT_ID': '...',
            'GITLAB_CLIENT_SECRET': '...',
            'EXTERNAL_BASE_URL': 'https://jupyterhub.example.com',
            'DISCOURSE_SECRET': '...',
        },
    },
]

Code for the service is at discourse-gitlab-sso. It provides a Python Flask-based service which:

  • Listens for SSO redirects from discourse, which arrive at discourse_sso() and results in redirecting the browser to gitlab.com for an OAuth request.
  • gitlab.com redirects the browser to gitlab_oauth_callback() with the OAuth response. Python code sends several followup requests to get a token and fetch information about the user from GitLab.
  • gitlab_user_to_discourse() maps the information retrieved from gitlab to the format expected by Discourse, and the browser is finally redirected back to Discourse with the SSO information encoded.

Sunday, June 9, 2019

ipywidgets.Text background-color

This took some time to figure out so I'll post it here in hope it helps someone else. To set the color of an ipywidgets Text box using CSS, you need to:

  • add a CSS class name to the Text widget
  • render an HTML <style> block for an <input> element descendant of that class
  • Set !important on the background-color, to prevent it being overridden by a later Jupyter-declared style.

For my case the Text widget was being included in a VBox, allowing the HTML widget containing the <style> to be included in the list.


data_input_style = "<style>.data_input input { background-color:#D0F0D0 !important; }</style>"
value_entry = ipywidgets.Text(value='')
value_entry.add_class('data_input')

children = [
    ...
    ipywidgets.HTML(data_input_style),
    value_entry,
    ...
]
ipywidgets.VBox(children=children, ...)