offset \ˈȯf-ˌset\ noun

a force or influence that makes an opposing force ineffective or less effective

Last of the Season

The temperature finally stabilized in the apartment. We got some things cleaned up and met up with some friends for a pint or three. Right now we're waiting to play another N7 session, but no go so far. The fireworks outside make our friends' dog scared so I'm writing a bit.

We made a cocktail for tonight, another vegnog variant.



It comes in two parts. The ingredients are as follows with the first component being infused then added to the rest and blended away.

  • 3 cups oat milk
  • 6 tbsp brown sugar
  • 4 pods cardamom
  • 1 pinch saffron
  • 2 pieces clove
  • 1 piece star anise
  • 1 1/2 cups spiced rum
  • 1 cup plant based whipped cream
  • 1/4 tsp ground cinnamon
  • 1/2 tsp vanilla extract
  • 1 pinch ground nutmeg

Put 1 cup of oat milk, brown sugar, cardamom pods, saffron, cloves and star anise in a saucepan and heat up for it to infuse. After it's done, let it cool and remove the solids. Then add the infused milk with the rest of the ingredients in a blender and blend for a minute until it becomes frothy. Let it cool in a refrigerator for later. Drink responsibly.

Happy New Year!

The News of Our Death Have Been Greatly Exaggerated

But our PC died and some drafts with it, so I didn't publish anything last month.

It was a painful experience trying to get the new components and checking out the extent of damage. Suffice to say, I managed to cannibalize the old PC and augment what I could with a solid hit on our wallet. The delivery was a nightmare and it took weeks to sort it out. Some issues are still ongoing.

The new rig was assembled just a few hours before our flight to Croatia. I couldn't do anything but wait until we came back.

We spent approximately a month in Croatia, working, visiting friends and spending time with family, but it was enough to start missing Ireland quite a lot. After all, our lives and routine are centered around that small piece of the planet.

Going forward, I need to set up better accessibility to the server, a better backup and a contingency plan... For watering the plants. Luckily there was no damage as the biological processes in plants slowed down so they didn't require water as much. We were also worried about the freezing weather breaking the water containers on the balcony left over from 3D printing, but it was all fine.

We came to an empty apartment. Everything was seemingly in order. We hit the store to get some food. We didn't even manage to unpack. That will happen today. I turned on the heating remotely before arrival but one of the radiators needed to be bled so it took longer than expected for room temperature to climb. It's finally OK at the time of this writing.

I'll publish something tomorrow as well just to keep my publishing frequency at least 12 times a year. For what is worth, we're alive, well and back.

Drawing Setup

Temperature is dropping in the northern hemisphere again. With the looming energy crisis, some people worry about heating. It's not that dire, though. Ireland is not reliant on the rest of the EU's infrastructure and the temperature oscillations are mild, too. There are no reductions, but the costs are rising. The situation is such that people keep warning the politicians against allowing so many datacenters in Ireland because the infrastructure can't support it. There's a concern this might lead to potential black-outs.

Cuply project was written about so it's time for me to take a short break from it. Even though it's hard for me not to come back. I believe it not to be finished so I will keep revisiting it to make sure it works properly. The bad weather keeps me at bay. Winter is approaching and we aren't on the balcony anymore so no hardware bits are done at the moment, only what's on the desk in front of me. I'm thinking about having a PCB for it, but need to figure out how to approach it. With the winter, again, we're slowly going into hibernation as well, so most of the things we do will happen indoors.

It is high time for me to kick myself into drawing and painting again. I guess it was a hectic beginning of the year and I cannot catch a break. We traveled (and still travel) a lot which I'll mention in the recap. I can tell that with all the travel, it was difficult to carry out things I had planned out, like Cuply. We did minor fixes in the apartment and rearranged priorities. So many things to do, so little time.

To kick off the painting, I decided to write this article. I got to have enough time this year to do things in spite of the distractions. The following paragraphs will describe my drawing setup.

I do things at the standing desk that goes up twice a day for an hour and a half. I automated that with ESP32 board. I can say that more focus comes from sitting, but I can't afford sitting all the time. I am not getting any younger and seldom do exercise (aside from the wall climbing which seems to be getting more frequent). This is at least countering the sedentary way of living. On the desk there's one 24" DELL U2413 monitor on the monitor arm so I can move it around should I have to. There's the standard keybord-mouse combination and a set of speakers on the desk, but they are not that important for drawing. The monitor arm is important since I have more space to work with.

The traditional drawing happens with a set of pencils (usually on the dark side with B2 being the most common), blending stumps, regular and kneaded erasers, some technical pens for inking and a small sketchbook. Sometimes I go for a specialty charcoal pens, but they're not used often in my repertoire. I can always display references on the big screen and, when done, scan things in with the scanner system behind me (HP 4130 doing a vendor lock-in) which is enough for home use.

I also hope to start with traditional painting of minis and I'll have more to say on that topic once I actually get to it. I'd need to use a spray paint primer, which is impossible to do indoors, but for the brushwork, I'll pretty much spend most of the time at the same desk. The only difference being one silicone mat so the paint doesn't spill on the desk surface.

When doing things digitally, which is my preferred method, I use a small Wacom Cintiq graphics tablet. It has all the usual pen gestures, from tilt (which is invaluable to have) to pressure. I also have a bluetooth keyboard for hitting all the keyboard shortcuts from wherever it's comfortable. I use a combination of Corel Painter and Krita applications of which I had a guest article on a slicing Python plug-in on Krita's blog. There are also Lazy Nezumi Pro and PureRef to help me out with the workflow.

There's one more thing and that's the ImgRef browser extension that I had Vesna do. It helps immensely with finding reference images for the finished work. A multi-page search. I'll have to poke her to publish the code.

Cuply - Hydroponics Greenhouse Cabinet Powered by Django Channels and Arduino - Conclusion

I'm in the process of making a greenhouse out of a glass cabinet that sits on our balcony. Inside it, there's to be a plethora of sensors and actuators hooked up to Arduino Due microcontroller, which is in turn connected to an old Raspberry Pi. The software stack is Django with Channels in the back-end, and React with some D3 in the front-end. It was a project long time in development, and this series of articles will explore it from the inception to the latest product.

  1. Overview
  2. Hardware
  3. Back-end
  4. Front-end
  5. Conclusion ← You are here

The devil is in the details. Right now the system works, but as with all long-running projects, this one will need some time to see if it's viable. As of time of this writing, there are contacts loose and the relays are breaking down sometimes. I need to tighten up the contacts and stop using the breadboard which was a proof of concept anyway. Moving on from prototyping into a real product will mean that I need to sit down and start soldering on the connections. With all the #revengetravel happening, I was putting it off for quite some time.

Making Cuply pretty will mean that the mechanism will get enclosed in a proper box where I can only have the necessary connections sticking out. For power, communication and sensors. I will utilize 3D printer mentioned before for some of the stuff.

At the moment, Cuply code lives in the repository online, but I need to clean it up and write up some documentation. With all that has been happening this summer, it was hard to keep up. Things are flowing if nothing. Not overflowing :)


Cuply - Hydroponics Greenhouse Cabinet Powered by Django Channels and Arduino - Front-end

I'm in the process of making a greenhouse out of a glass cabinet that sits on our balcony. Inside it, there's to be a plethora of sensors and actuators hooked up to Arduino Due microcontroller, which is in turn connected to an old Raspberry Pi. The software stack is Django with Channels in the back-end, and React with some D3 in the front-end. It was a project long time in development, and this series of articles will explore it from the inception to the latest product.

  1. Overview
  2. Hardware
  3. Back-end
  4. Front-end ← You are here
  5. Conclusion

This summer I set out to work on Cuply so I containerized the thing and set up the Raspberry Pi to house the project. I destroyed one SD card in the process but it's still working with the old one. Just a bit too cramped for my liking. When setting up the hardware I did some soldering (for which I bought the soldering iron) for the relay contraption. I tested out the pumps, checked for leaks and sealed them with silicone glue. For the back-end part I wrote majority of tests and implemented the coverage for it. I still need to push the repo to the cloud. Stay put for that one.

It was time for me to move to the front-end, which this article is about. The progress has been slow, but the Cuply project is moving forward despite outside distractions. The front-end architecture is driven by React. The dashboard is using the Bootstrap CSS framework and there are some D3 graphs that display the state of sensors. D3 bits are heavily modified examples taken from Observable.

I don't have a user registration system in place at the moment so when setting the project up, a user needs to be created in the back-end with createsuperuser Django management command. It's not an issue to have a superuser here because the project is isolated in the local network and the user is the only one existing in the project. Parameters can also be changed with the enabled Django admin.

A microcontroller is also needed to be set up in the Django admin, but at this point I'm thinking about hardcoding it in the settings and getting rid of the database interaction since there's only one microcontroller present. To ease my trouble, I exported the fixtures of the user, profile, microcontroller and devices so I can recreate them at will with loaddata management command.

Containerizing it spins up two containers. One for queue for the websockets and the other one for the app itself. The latter exposes the Arduino from the host so the order of things when spinning it up matters. Plug in the Arduino in the electrical outlet, then plug it in the Raspberry. This is important because the Arduino requires its own power supply, otherwise it makes Raspberry unstable.

Front-end bit is completely isolated and communicates with the back-end via REST API, websockets and authorizes itself through JWT. It is built with create-react-app.

When turning on the interface in the browser for the first time, a modal with logging in is presented to the user and one user/password combination later, the rest of the interface is unlocked. The navigation consists of the standard buttons for the main page and for signing out, then the items that are:

  • Sensors
  • Actuators
  • Plants
  • Trends
  • Settings

The first three display and edit the state of the items in the cupboard. Trends deals with displaying the graph of the historical data of the sensors and Settings changes the user's API key for FloraCodex. Editing the specific item opens a modal with a form to be changed and submitted back on the server via REST API. The real time data is fed to the dashboard through the websocket.

Here are some screenshots: