Why I (don’t) like smart things

(apparently I drafted this at the end of 2018, and am only publishing it now in 2023…)

Smart things in the context of IOT is a huge market. If you can put Wi-Fi in it, someone has tried, and someone has tried to market it. I like this. It’s fun. I enjoy being able to remotely control things from my phone or with my voice, as opposed to having 20 remote controls, one for each item. It is good. However it is not without issue.

One of the prominent issues surrounding IOT is security. If you can remotely access these things, especially sensitive things like video cameras or alarm systems (or large infrastructure), then there’s a chance that someone else (unintended) can too. This is concerning, although not my biggest issue.

I don’t disagree that security is important, but I think it’s manageable. My biggest gripe with these products is redundancy. Firstly the immediate, what if their servers have issues or what if my internet is down. But of greater concern to me, is what about when the company decides to no longer support my product. And this isn’t an if, it’s very much a when.

The vast majority of mainstream products require you to setup an account with them and then control your devices through theirs- or a compatible app. They work great (sometimes). Until they don’t. I’ve posted recently about how Nike have shutdown their servers for their GPS watches. The servers that you are required to connect to if you want to download data from your device. And there are many companies that have done similar things in recent years, and many more are still to come.

My issue is that there’s no reason for many of these services to require distant servers to control them. It’s one of the reasons I have limited our smart device purchases to a number of light bulbs that, at the end of the day, will at least still act like normal lightbulbs, even if the servers go out. But what are the alternatives?

I did also buy one of these, but I’m not going out into the snow everyday to turn on the Christmas lights

Mainstream manufacturers do this for a number of reasons. I like to think mainly it’s because it truly is the easiest way for them to provide the best customer service. It is the easiest way to ensure customers get a product which works, and will continue to work as long as the manufacturer wants it to work. But obviously this also means there is some level of forced obsolescence too, never mind the data gathering opportunities.

I get that companies can’t carry on supporting old equipment forever. Keeping servers running as fewer and fewer users need them. Not getting any additional revenue for the cost. But the least they can do is release software at the end of a product’s life which allows a product to still be useful. Nike could easily have released a stand-alone product that could download the GPS data to my computer, and I’d still have been happy. Makers of other products could release firmware to allow local/direct control of electronics that otherwise require servers, and will just end up in the landfill. But they don’t.

So what is the solution? Doing it oneself? There are many downsides to this. Whatever I put together will not work as well. I don’t have the knowledge of hundreds of product developers. It will probably have more downtime than any product you purchase, because I’m not going to pay for the most reliable servers and products. But at least I’ll be able to keep it running as long as it’s useful to me. And that’s what I’m doing.

Tracking Time

Early in the pandemic my employer had us working from home. For the most part this was not an issue. But not having a dedicated office, I found it too easy to lose track of time, and spend too much (in my opinion) time working. With my computer set up in our lounge, it was too easy to check an email, or quickly test something else. It was right there.

There was also no separation that came from cycling/taking the train to or from work. Wake up in the morning, sit down at the desk with breakfast/coffee, start working. Without planned events in the evening, continuing to work was easy.

I have not worked enough (4+ hours). First LED is a status.

In an effort to limit this I once again repurposed my Particle Internet Button to do some time tracking. I’d used Toggl in the past to do some time tracking, but liked the idea of having a visual display available to me, without having to pull out my phone, or install additional applications on my work laptop.

My basic idea was to use the Particle Internet Button as a switch and display mechanism for interfacing with the Toggl API. The main issue I encountered with this approach was that Toggl was enforcing https for their API calls (and rightly so), but there were complications around the available Particle https libraries at the time.

I have worked too much (9+ hours)

Not wanting to spend the time on figuring that out, I somehow convinced myself that I should just spin up my own “Toggl-like” service. Obviously just for me, and not requiring https :) Hopefully my employer doesn’t hack my Wi-Fi to intercept my network comms and make me think I’m working less than I actually am.

And so that’s what I did. I setup a database, and threw together some php scripts to interpret different requests as start and stop commands, also taking a date-time string as a parameter. I expanded it a bit, allowing for different work-id’s, if I want to track different topics, and protected it all behind a nice long ‘key’ to limit the risk of someone messing with my data.

I have worked an appropriate length of times (8+ hours)

The Internet Button itself is round, and has a bunch of RGB LEDs on it. Eleven LEDs lets me use one for a notification, one as a spacer, and the other nine as hours worked increments. The Internet Button does have buttons that can be used as inputs, but instead I chose to use the accelerometer to give me a more intuitive input, without the need for labels.

My beautiful web interface

I 3D printed an octagon-shaped holder for it, which allows me to rotate the internet button to five fixed locations, which are easily distinguished from each other by the accelerometer. If you’re in the central position, the timer stops. If you shift to one of the other four positions, you start the timer associated with that position. In practice I’m only using one, so the other’s are mostly untested for now.

If I don’t have the hardware with me at any time, there’s also a basic web-interface, that allows me to view the entire week’s hours worked, and each stop and start event. I can also add events if I forgot to start or stop at some time.

Page title includes hours worked, and auto-refreshes every 5 minutes

Here you can find a link to a GitHub repo with some associated code: link

Below you can see a video of it working, and interspersed in this article are a couple photos of different stages.

Capturing Serial Data from Nidec Shimpo Force Gauge

We wanted to automate some testing. We had a Nidec Shimpo FG-3008 force gauge that we wanted to capture data from, but no obvious way to get it. Nidec Shimpo do offer their EDMS software that can log and graph data over time, but it can’t be automated.

The force gauge has two connectors, a USB-B port that is used for charging the force gauge and another port that has a serial out (only for connection to a printer) and some output pins that react relative to a set pin.

When connected via USB, the force gauge shows up as a COM port. The EDMS software obviously connects using this port. Connecting a terminal to the port doesn’t show any data streaming, implying a query needs to be sent to the force gauge to trigger a reading.

We eventually figured out that when you send a ‘?’ (0x3f) to the force gauge, it replies with the current force reading in plain text, of length dependent on the number of characters in the measured value, the last character always being a carriage return (0x0d).

Testing with Realterm

With this information, data capture can be easily automated with Python.

import serial

ser = ser_obj = serial.Serial("COM4",
baudrate=9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
timeout=2)

ser.write('?')
ser.read_until(CR)

2008 Hyundai Tucson 2.0 GLS

I’ve been spoilt in the last few years with the vehicles I’ve been able to drive on a daily basis. And I fear it has spoiled me (1, 2, 3, 4). When we moved to the US, I didn’t have work lined up and had to wait several months for a work permit. During that time we were living off a grad-student salary and savings. Very quickly we realised the need (or extremely strong desire) for a vehicle to get aroudn and out of LA. Although living in close proximity to public transport, it lacked in many areas. So we were shopping on a budget. Definitely pre-owned, but we wanted something we could at least take into the wilderness. 4WD wasn’t off the cards, but not a necessity.

As such our vehicle search landed us with a lowish mileage (72,000 miles) 2008 Hyundai Tucson. It was well-priced, likely as a result of its manual transmission and “small” 2.0 petrol engine. Besides a couple scratches on the bumpers, it was devoid of major dents or indication of having been in an accident. And so it became ours. It had two open recalls, which the Hyundai dealership quickly sorted for us free of charge and has otherwise been problem free.

Since getting it we’ve replaced the tires and brake pads, as well as the front rotors. An oil change and other minor maintenance have been all its required. Almost 10,000 miles in, and it’s still going strong. It doesn’t use oil, has been surprisingly capable off-road, and the platinum paint job hides the dirt well.

But as I mentioned I’ve been spoilt, and this car is underwhelming to drive. My 1996 Audi competes with this Hyundai on features. But it’s a car. It gets us from A to B, and doesn’t complain. The 2.0l engine is surprisingly sprightly, but lacks torque when climbing long hills at highway speeds; of which the Americans are fond. Was it a bad decision? definitely not. As we’ve gotten to know California better, my only regret is not having looked for a 4WD version. The ground clearance has let us do a good amount of exploring, and while the boot (trunk) isn’t large, it’s ample for two people, and camping for four has been achieved. Even in a bit of snow.

If you’re looking for an amazing car. This isn’t it. It has power steering, it has electric windows, and it has a radio (with front loader). It has AC, that battles on the hottest of LA days, but is otherwise capable. It has airbags and we’ve added a towbar. It is a car; it is ours; and we like it.

There isn’t really anythign else to say about it. It has done all that we’ve asked of it, but bar the fact that it is our Tucson, it is nothing special.

Would I suggest you buy one? Sure. If it meets your needs, and you can get one for a good price. Hyundais of this generation have a good reputation for reliability. And I expect this car to convey us many more 10s of thousands of kilometres before we eventually give it up.

Although we could afford a new car, why? We either cycle or take public transport to work. The car sits at home during the week, besides the odd grocery run. Otherwise it sits in waiting; waiting for our next adventure. It is a car, and it is ours.