Solar Data Logging

Solar Data Logging


The data loggers that I discovered at the end of my installation have been connected to my home wifi by the installer. The default behaviour is that they probe the two inverters and send a burst of data to a cloud service every 5 minutes or so.

The loggers also have a local web interface that provides a way of controlling the device along with some basic data. The default username/password for these devices is admin/admin.

Iris Keyboard Troubleshooting

With the kit fully assembled the micro-controllers then need to be flashed. The software used to do this is the QMX Toolbox. The install of this on OSX is straightforwards using brew :

$ brew tap homebrew/cask-drivers
$ brew install --cask qmk-toolbox

I used the QMX Configurator to save a default Iris configuration and flashed it to each controller. (Don’t do this - see later).

With everything flashed and ready I plugged the board in and started to test on my Mac. The left-hand side worked perfectly, but I got no output at all from the right. I then tried plugging the right-hand side in and got strange results. It was a mirror of the left i.e. trewq mirror of qwert. On the upside, I was happy my archaic soldering skills had held up and all keys seemed to work. But obviously, something was wrong.

Iris Keyboard

Iris Keyboard

I’ve been using a Microsoft ergonomic keyboard for around the last five years. The layout suits me, but the switches are mushy. I’ve often looked at fully split boards but been put off by the price, for example, the Moonlander looks incredible. However, the price is around $400 dollars before adding whatever random import duty comes into play.

I took a look at the excellent Mechboards site that has a series of kits available to build yourself. The advantage of building your own is the option to select whatever components you want. So for example I can select the cherry blue “clicky” keyboard switches.

RestTemplate and Java 17 Records

As part of my ongoing solar project I wanted some basic weather forecast information to help make judgements around cloud coverage. The good people at OpenWeather provide an api with a free tier that includes forecasted cloud coverage data hourly for a couple of days.

The api returns a JSON structure that looks like this :

{
	"lat": 50.8,
	"lon": 0.027,
	"timezone": "Europe/London",
	"timezone_offset": 0,
	"current": {
		"dt": 1644836705,
		"sunrise": 1644822797,
		"sunset": 1644858426,
		"temp": 281.32,
		"feels_like": 277.84,
		"pressure": 997,
		"humidity": 80,
		"dew_point": 278.08,
		"uvi": 0.98,
		"clouds": 75,
		"visibility": 10000,
		"wind_speed": 6.69,
		"wind_deg": 250,
		"weather": [
 			{
				"id": 803,
				"main": "Clouds",
				"description": "broken clouds",
				"icon": "04d"
			}
		]
	},
	"hourly": [
	{
		"dt": 1644836400,
		"temp": 281.32,
		"feels_like": 277.47,
		"pressure": 997,
		"humidity": 80,
		"dew_point": 278.08,
		"uvi": 0.98,
		"clouds": 75,
		"visibility": 10000,
		"wind_speed": 7.9,
		"wind_deg": 242,
		"wind_gust": 12.16,
		"weather": [
		{
			"id": 803,
			"main": "Clouds",
			"description": "broken clouds",
			"icon": "04d"
		}
		],
		"pop": 0.05
	},
	.
	.
	.

With 48 of those hourly snippets covering the next two days.

A Solar Journey

Last weekend we had 26 solar panels, some battery storage and a couple of inverters installed at the new house. All was installed fine and seems to be working OK so far. We went through a local county-based scheme with Solar Together. They awarded the Suffolk scheme to Greenscape Energy and turned around the install really quickly.

The installer walked me through the online app that monitors generation, consumption, storage and returned it to the grid.

Leetcode

I’ve recently been working with a few folks looking to start out in coding/development careers. Quite a few entry-level positions seem to be filtered by programming tests. I won’t go into my feeling on these, as personally, I’m not a huge fan of this approach. As an employer, I was always more interested in the individual’s character and approach to problem-solving as opposed to a pressured machine judged pass/fail.

However, with that said, these styles of testing have become more common. They perform many of these tests in web-based environments. So it’s worth becoming familiar with the tools available. https://leetcode.com/ is a good example of a tool used. It is worth getting familiar with these environments. It has a significant number of exercises, they are a bit recursion biased (from my samples) but can give you a good idea of what to expect.

Maix2 Dock Camera Test

You can write a small amount of python to test that the image you have created works correctly.

The following is a tiny python script that takes an image from the camera and displays it on the built-in screen.

Connect to the device via the serial link or over ssh.

Create a test.py file with the

#!/usr/bin/env python
from maix import display, camera
while True:
	display.show(camera.capture())

Make the script executable via

Maix2 Dock Serial Comms

The easiest way to check that the SD Card you have created is working is to connect to the device over the serial port.

Picocom is a great tool providing terminal emulation over USB serial.

For OSX a quick install can be performed via :

brew install picocom

Plug your Mac USB-C cable into the USB-UART port on the Maix 2 board.

Maix II Serial

You can connect to the device using the USB serial device. For me, the device is /dev/cu.usbserial-14200

Maix2 Dock Image Burning On OSX

Maix2 Dock Image Burning On OSX

All the forum posts I could find assumed access to either Windows or Linux machines to burn the firmware onto an SD card. I needed a couple of goes at this when trying from my Mac.

The main issue I had was how to remove and recreate one partition from the initial image.

i.e. how to grow that partition to use the remaining space on the SD Card. I found a way of using Virtualbox to do this as outlined below.

Maix2 Dock Intro

Maix2 Dock Intro

I recently bought a Sipeed Maix II Dock. For my purposes, it’s an IOT device with a camera and screen that can also run a complete Linux environment. The core board is fairly cheap, and even the docked version comes in at around £20.

The full specifications of the board are available from SeedStudio

Getting this running has been a bit of a journey for me. Between using a Mac as my primary OS and struggling with the Chinese forums I’d not been able to find a “how to get started” site that worked for me. As such, I will attempt to document that process here over the next few posts.