Upgrading NextCloudPi

So I finally got around to upgrading my NextCloudPi to version 20 with the hub and all. I really like it so far.

It also seems that I bumped into a know issue. All of a sudden I could not upload files over 8kB. It turns out that for some reasons the sys_temp_dir in /etc/php/7.3/php.ini had shifted from my USB media (a portable HDD) to the default location (/var/www/nextcloud/tmp) during the upgrade. After a quick move back to /media/USBDrive/data/tmp, everything is back to normal.

I found the solution over at the nextcloud forums.

Advent of Code and Learning

So, I decided to do Advent of Code this year too. I usually get stuck part of the way, but I still think that it is a fun exercise.

This year the plan is to use python and pytest the whole way through. Every day that i learn something that I want to remember, I add a til.txt file in that sub-directory. You can follow my progress and learnings in the git repository.

The lessons this far includes:

  • When using readline to read lines, the line-break is included, so len(text) will be one character more than expected. Strip your strings!
  • When doing number of ifelifelifelif, make sure to include an else, even though you know that all cases are covered. I run assert False in the else clause.

As you can see, these are on the level of small snippets of wisdom right now. I’m sure it will be more interesting as the problems become more complex.

The API wars – 16 years later

It is more than 16 years since Joel Spolsky wrote How Microsoft Lost the API War. The bonds of the win32 API lock-in is broken and the free web is here to take over.

The web has come a long way in the past 16 years. Richer APIs, dramatic performance improvements, and an ubiquity that surpasses anything else that we as a human race have experienced. Easy of deployment is king and the easiest deployment of all is to simply browse to a web page.

Creating web apps has always been riddled by browser compatibility caveats. Various services have been around to test rendering across browsers and versions, and frameworks to address common scenarios have evolved to create a write-once, deploy-everywhere story.

The modern web browser has become our universal runtime environment. It is what Java and .net aspired to on a crazy scale. However, it is not only a runtime environment. It is the perfect client server setup to provide everything as a service.

With the focus shifting from the browser to the actual contents, the value of controlling your own browser engine has become less and less attractive, and last week, Mozilla begun what I think is the final downward spiral of the last alternative to the Google led Chrome family of browsers.

(There are so many things I’d like to say about this. For instance, you should know about the Mozilla manifesto, as well as their funding being secured for the next three years. But I digress).

A browser engine is a hugely complex beast these days. An incredible number of backwards compatibility hacks, while ensuring high performance on both rendering and Javascript execution. Add a broad range of APIs for integration into the native host platform. Combine that with privacy and security concerns, and the code base is starting to turn into a beast.

Now, it seems that Google controls the leading browser engine and thus, holds the direction of the web as we know it in their hands. Google has not only won the search, contents, and personal data collection wars. They also won the API war.

Having a single, almost monopolistic entity controlling all these aspects of life makes me feel very uncomfortable.

I’ve started my own personal de-googling journey, and I know that there are many others doing the same. Taking back ownership over their email, shifting from Google Drive and Google Apps to alternatives such as Nextcloud. But also moving from platforms such as Twitter to federated alternatives such as Mastodon.

A lot of this is probably seen as nostalgia from an earlier generation growing old. The web has moved on and many parts of what I love about the internet are no longer in broad use. For instance, small forums are migrated to Facebook groups, IRC is taken over by freemium alternatives such as Slack, RSS feeds become less and less common, and so on. The web is being centralized and has been so over the past decades.

However, I believe that the tide can be turned.

On the contents side, early adopters are moving to federated and self-hosted services where data lock-in is impossible. Privacy concerns become more common outside of the technology sector. What is needed is great alternatives that are easy to deploy. Examples that I use are Nextcloud, ttrss, fripost, and Signal.

But what can be done about the API war?

An attractive possibility, in my view, is the raise of WebAssembly. It enables the deployment of complex applications into the browser, really turning the browser into the universal run-time environment. It does so for compiled languages and at great performance.

What about deploying a bare bones wasm run-time environment, and then deploy the browser into it. That way, the complex beast that is the browser of today, turns into a much more manageable animal that is the wasm run-time.

What would this change? Short-term, very little. Even if the Chrome engine is compiled to wasm and executed inside an outer shell, the experience and value is still delivered through a very complex code base controlled by one of the most dominant companies in human history.

Long-term, it would mean that the ease of deployment would apply to not only the web, but to the wasm run-time. We would shift from the HTML/CSS/JS world to a wasm world.

Not only would this mean that the universal run-time becomes smaller and more manageable to maintain by multiple parties, it also opens the opportunity to shift to a optimized way to run software (the hardware requirements of the modern browser isn’t really environmentally friendly – it drives energy usage, as well as hardware obsolesce).

Now, all that is needed is time. An idea without execution, is merely a dream. I might be a dreamer, but I think that this is the way forward.

The Embedded Talks

The foss-north conference strives to have an assortment of various talks. The point is that visitors should see something unexpected and that the conference should attract all types of visitors to ensure that we as a community can meet across various industries and problem spaces.

This time I’ve selected three talks about embedded systems from foss-north 2020. The talks touch on building embedded systems around Linux. If your reader does not show you the embedded videos, make sure to follow the actual page or go to our conf.tube channel to see all the contents.

First out was Ron Munitz talk on understanding and building minimal Linux systems. This talk proved to be a real deep dive into the Linux kernel – including setting up a debugger to the kernel itself.

The next embedded speaker on the program was Chris Simmonds. He discussed if going with Yocto or Debian is best for your embedded Linux project. This an interesting topic – how much is customization worth compared to other aspect such as build-time.

The embedded set of talks ended with Drew Fustini talking about running Linux on the RISC-V. This talk dives deep into the hardware part of embedded systems, but also Linux. By being able to run Linux on RISC-V, which is open hardware, we are very close to an completely open eco-system.

The three talks are already available on conf.tube, and the presentation material can be found by following the links to each speaker. For those of you who prefer YouTube, the talks will be made available shortly on the foss-north channel. Subscribe to get notified when they are.

foss-north – or doing many things at once

When placing this year’s foss-north event over a quarter break I knew that I would be busy both at work and at the conference. Little did I know what was beyond the horizon ;-)

As a consequence of the COVID-19 situation, the event has to be converted from a physical meeting to a virtual event. This means many things to an organizer: renegotiating all sponsorship contracts, renegotiating with the physical venue, setting up the infrastructure for a virtual event, rescheduling all speakers, and so on.

We at foss-north are lucky. All sponsors continue to stay with us and the venue was very cooperative when it came to rescheduling the event.

I have started to document our virtual conference setup so that other conferences in the same situation can learn. Pull requests are welcome!

This Sunday we decided to stress test the infrastructure by running the lightning talks. This is a good test case, as it involves a maximum number of speaker transitions, as well as more frequent QA sessions. From an organizer perspective, this is really like running a full day of the conference in 90 minutes.

I’m happy to tell you that the talks went well! You find them below. Following the links you find slides as well as recordings of the sessions.

Develop better software with usability testing by Andreas Nilsson
Running Android on the Raspberry Pi by Chris Simmonds
The Yocto Project 10 minute quick-start guide by Ron Munitz
Getting started with your smart, connected, vehicle project by Dimitris Platis
Seven years in Tibet^W^Wat Home by Kristoffer Grönlund
Linux on RISC-V by Drew Fustini
Singularity container platform by Anders Björklund

We’ve also been able to get most of the conference schedule in place and just have a few rough edges to fix before the big event. I am extremely pleased with how this has turned out. We still have a stellar speaker setup and I hope that you will all join in and watch the streams. The event is free for all and open to all and runs from March 29 – April 1.

NextCloud on Pi Adventures

I spent yesterday *finally* setting up a NextCloud instance of my own. It’s been on my todo since I installed fiber at home and got a decent Internet connection.

I started out with Rasbian Lite and combined it with the NextCloudPi install script from ownyourbits. I then used certbot to install certificates from let’s encrypt before migrating the data directory using these instructions.

After that it was happy account creation time, before realizing that I could not upload files larger than ~10kB. Very annoying.

After having duckduck-ed and browser issues and articles for hours, I finally found that that the /etc/php/7.3/fpm/php.ini file contained a reference to the data directory.

sys_temp_dir = /new/path/to/data/tmp

This one-liner cost me about four hours to find, so hopefully this post saves someone else that time.

Change of Plans

TL;DR; foss-north IoT and Security Day has been cancelled, or at least indefinitely postponed, due to health reasons.

For the past three weeks (from August 11, to be exact) I have had a fever that I couldn’t really shake. At the same time my wife had pneumonia for which she was successfully treated. Antibiotics is treated with care in Sweden, so I basically waited for my CRP tests to return a high enough value for my doctor to be convinced that I had an infection.

On Friday 24th I got my first round of antibiotics. They did not help, so on the morning of the 27th I returned and got another, stronger, antibiotics. I was also told to go directly to ER if I got any worse. I did. On Thursday morning I landed in ER.

It turns out it was not pneumonia at all, but blood clots throughout my lungs – way too close to a proper game over for comfort. It took me four days to stop degrading, and six days before I could leave the hospital. Right now I’m on ordered rest for at least two weeks. Something I apparently need, as I’m super tired as soon as I do the smallest thing. Right now my exercise consists of walking around the block, ~400m, twice a day.

Hence, there is no way I can arrange the foss-north event planned in the end of October. I’d like to thank all the sponsors who signed up, and those which whom I postponed the meetings. I would also like to thank everyone who submitted talks – the line-up would have been amazing. Finally, I’d like to thank the friendly people who helped cancel everything – it really took a heavy load of my chest.

This is a hugely frustrating situation to me as an individual – I want to work and I want to run, but I guess it is time to slow down for a while and then come back stronger. There will be another foss-north, and I will run 10km trail under the hour. Just not this year.

fosdem 2019

The first weekend of February means Belgium, Brussels and fosdem. To those of you who has not been there yet, it is a huge, chaotic, crowded, but also wonderful event.

But first I was met by a huge snow storm and the following chaos. :-)

I’ve been to fosdem a number of years now, and I was brave enough to take to the stage last year. In the early days, I spent most time in various dev rooms, either hacking myself or listening to talks. For me, fosdem has changed from this to more of a social event. I’ve spent hours talking the the K-building, made sure to meet people I’ve interacted with online for the first time, and generally hang out and enjoy the company of a lot of smart people.

Another side mission of mine this year was to do some foss-north promotion. As you might know, I’m organizing the foss-north event, and I had the opportunity to meet with both speakers and sponsors during fosdem (call for papers close in ~1.5weeks, just sayin’). I also took the opportunity to hang some flyers at the venue, so hopefully some people discovered the event that way.

As I pointed out earlier, the weather was not that great, but for a few moments on Sunday morning the sun peeked out between the clouds and you could almost feel a sense of spring in the air.

I did not attend that many talks this year, but I did really appreciate Jon maddog Hall‘s talk Fifty years of Unix and Linux advances.

After the event I took the opportunity to visit Brussels with some friends. I finally got around to visit Atomium. Such an amazing place! I love the mix of the 50’s architecture and the contemporary exhibitions in some of the spheres. This place was way better than I expected it to be.

So fosdem delivered again. Chaos, so many meetings with new people as well as old friends and acquaintances, great contents, and a generally great experience in Brussels. I’m already looking forward to next year’s event!

Work v2.0

Returning to work this autumn has a slightly different feel to it as I’m working on getting a new business up and running. This is both rewarding and stressful at once. Strangely enough, it actually felt good to get up early to get to work.

The major hurdle during the bootstrapping phase is how to handle free time. I do have more free time at the moment, as I’m only working part-time for my current customer. However, I also have an infinite backlog of things to do. This is everything from basic administration, doing sales to pet projects.

I guess what it comes down to is to handle and prioritize infinity. For now, I have gbgcpp, foss-gbg and Kuro Studio to fill my time. It will be fun!

I made a thing

Sweden is currently going through one of the worst droughts in recorded history. One of the consequences of the high temperatures is that my vegetables needs constant watering. Of course this is a task that I want to automate.

I already run home assistant for some basic automation at home (mostly lights). Now, I got a pump for caravans from a cheap store, found a 12V power supply in a drawer and hooked it all together. I attached a hose and dropped the pump into my rain water barrel (which is very empty at the moment).

Having spent quite some time making holes in the rest of the hose, I now think that I have a reliable watering system. The challenge seems to be to make reliable holes in the hose. I started with a knife, ended up with a power drill and a 6mm drill bit.

For the control, I use one rule to turn the water off after 2 minutes each time, then I just have time based watering sessions at 20.00, 20.30, 21.00 and 21.30. This should hopefully be enough.

I’ll monitor how much water this uses for a few days and look for dry spots along the hose. Hopefully this is another part of the gardening automated (the lawn mowing has already been solved with a robot).