Connected Little Boxes messages and PythonIsh now work together

Can you work out what this might do?

I’ve been playing with the PythonIsh interpreter in the robots and Connected Little Boxes today. You can now put JSON formatted commands in programs. It’s not quite perfect. The commands you send are fixed strings and can’t contain variable values yet, but it is a nice step on the road to a whole bunch of interesting device behaviours. I’ll have a video about how this works and what it means once I’ve got it working well enough to record…

LCD Panel coming to Connected Little Boxes

I thought it might be useful to add an LCD panel to the Connected Little Boxes. It took a bit longer to get it working than I expected, mainly because the library I’d been using wasn’t compatible with the suspiciously cheap LCD panels that I’d bought.

If you have problems getting your PCF8574 driven LCD2004 panel working with a PICO I would suggest that you do two things:

  • Remove the jumper on the back of the PCF8574 board and connect the LED pin to the VBUS pin on the PICO so that the backlight is powered properly.

  • Use this library to drive the device. It’s the only one I’ve found that works.

HullOS-Z now available

Some software you release. Other stuff just seems to escape… HullOS-Z has now escaped onto GitHub. It’s the next version of the Connected Little Boxes software and the Hull Pixelbot controller, rolled into one enticing bunch and dropped onto the Raspberry Pi PICO W. Other versions will be coming along soon.

It’s definitely a work in progress and the initial focus is getting something to work with Robot Rugby. It is also the first step in integrating PythonIsh (and another surprise language) with Connected Little Boxes.

You are welcome to have a play with it and let me know what you think. In fact I’d love that. The repository has a uf2 file you can drop onto a Pico W or you can build the whole thing yourself using Platform IO.

PythonIsh now running on Connected Little Boxes

I’ve just spent the day playing with PythonIsh. It’s a tiny language that I’m adding to my Connected Little Boxes. It originated in the Hull Pixelbot, but now I want use it to make it easy to program all my different devices. Today it actually worked properly for the first time, which is nice.

The idea is that you can write tiny bits of code that run in response to events on devices. You can save program files in the device and one program can load in another. You can also enter a new program while an existing one is running. And, as you can see above, the device can host a website where you can enter code. You can also edit code online and send it to a device over MQTT.

It will be out soon on GitHub.

Hull Pixelbot gets connected at the Hardware Meetup

I’ve spent a big chunk of today combining the Hull Pixelbot and Connected Little Boxes to make a single device. This will make it possible to use a robot as a connected device. It’s big news for me, but perhaps not for anyone else.

Anyhoo, I’ll be taking the newly upgraded robot along to the Hardware Meetup tomorrow (Wednesday 11th June) at 5:00 pm in Hull Makerspace. We’re going to try and connect it to a tracking camera so that it can tell where it is. It’s going to be great fun.

The Python Connected Little Box takes shape

I’ve been making Connected Little Boxes for ages. Up until now they’ve been powered by a large a complicated C program that I wrote a while back. I thought it might be fun to convert the code to Python and run it in a Raspberry Pi PICO. So last week I started putting it together.

The code controls an embedded device and is based around pluggable manager components which are automatically discovered and loaded when a device starts. Managers can have dependencies so that the MQTT manager won’t do much until WiFi is working, etc etc. There’s setting management, messaging and a console command interface too. It’s all coming along splendidly at the moment. I’ll have everything on GitHub once I’ve made it work.

PICO Probe in PlatformIO

I probably shouldn’t be quite so surprised when something just works, but I must admit to being slightly shocked when I managed to deploy a C++ application into a PICO using the Raspberry Pi debug probe the first time I tried.

Debugging just works too. I’ve now got a new PC (replacing my 8 year old one with something a bit more sprightly) and the build and deploy cycle is now pleasingly short. This really is a great way to work. I’ve now got the Connected Little Boxes core running on a PICO as well as ESP32 and ESP8266 and I’ve re-factored the code so that it is now easy to manage the feature set assembled into the code. This makes it much easier to remove features that won’t fit on the ESP8266. Great fun.

Connected Little Boxes Direct Commands

YOu need to add the “direct” tag to your device for direct commands

Making stuff by yourself is all very well, but I find that projects really catch fire (in a good way) when you get other people involved. I’ve been working on Connected Little Boxes for ages and I think it is now almost useful. You can make little devices that can send messages to each other and you can control from the web. There’s a web interface you can use to manage your devices and create control pages for them. It’s all underpinned by MQTT (Message Queue Transport Protocol).

Ross took a look and he reckoned it would be nice to be able to just hit a url and send an arbitrary message over MQTT to a device. So I’ve added it. If you take a look the device edit page above you will see that the cosylight device has a Device URL. If perform a GET from that url with a query string which contains a “text” value the contents of the value are sent over MQTT to the box.

There is no validation or security, so I wouldn’t use it to control my front door. But if you want something very lightweight it provides a neat way of sending commands. If a device is being abused you either disable direct commands or change the url to a contain a different GUID.

If you want to have a go with Connected Little Boxes get in touch and I’ll set you up with a username and a password on the portal.

Merging Connected Little Boxes and the Hull Pixelbot

Two things that have occupied a lot of my time recently have been Connected Little Boxes and the Hull Pixelbot. And now I’m working on combining them. This will create a Connected Little Box which can operate as an autonomous robot. It will also being scripting to the Connected Little Box so that you can create tiny programs for each of the box interfaces. Whatever happens, it’s going to be fun.

Connected Little Boxes at the Hardware Meetup

I’ll bring along a text display too.

I’m bringing a bunch of Connected Little Boxes to the Hardware Meetup next Wednesday. I want to show off the web configuration and deployment and what you can do with QR codes.

If you fancy coming along you can just turn up at Hull MakerSpace on Wednesday 11th of October from around 5:00 pm onwards. I’ll be around with some devices to show off, and even ones that you can take home with you (numbers permitting). It would be lovely to see you.

Connected Little Boxes portal now live

This is probably the biggest thing I’ve ever built..

I’ve finally reached the point where I’m letting people lose on the newly created Connected Little Boxes portal. You can use the portal to set up your Connected Little Box devices and create behaviours for them. If you want to have a go with it, let me know and I’ll see if I can sort something out.

Over the Air Updates for Connected Little Boxes

Groverner Club

I’m adding “over the air” updates to my Connected Little Boxes. I’ve had the button on the device management form for a year or two. Over the last week I’ve been putting some code behind it. Over the air updates are magical. You can ask the device to download and install a new version of its firmware. On the surface it is quite easy to do. Except if, like me, you have a solution that uses nearly all the memory in the device. I’ve come up with a solution. When an update is required the device boots into a special “update” mode where the only element running is the code fetching the new firmware from the server. It is nearly working. Rather exciting.

Connected Little Clock

Use your skill and judgement to work out when this picture was taken

I’ve had a connected little clock in the hall for a while. It used to light up with a pleasingly bright blue display. Then, after a while gaps appeared here and there as the leds seemed to wear out.

I’ve replaced the blue ones with red ones, which I hope will last a lot longer. If you fancy one of your own (which will be remote controlled via the web) I’ll have the new software out soon.

Connected Little Boxes remote control

If you want to change the colour of the “Rob” light in my room you can scan the QR code above and then use the menu that appears to pick a colour. You can also follow this link or click the image.

The site that I’ve built lets you create collections of commands to send to Connected Little Box devices. It also lets you download the firmware into an ESP8266 or ESP32 powered device and then attach it to the Connected Little Boxes network.

I’m going to be making a bunch of videos and releasing all the code for you to play with. It’s going to be fun.

The power of the backend....

I spent a big chunk of today trying to work out why my software was putting two entries into the database whenever a device connected to the system. I’m adding logging so that I can detect if a device is resetting more than it should. After commenting out lumps of code and generally getting very confused I eventually worked out that as well as the test code running on my PC there was of course also a version of my system running in the cloud. So it was responding to device messages and writing to the database alongside the code running on my machine. I think I need separate development and test databases……

Pixel pinning

Last week I made it very easy to load Connected Little Boxes firmware into a device. Today I spent some time making it easy to configure the device too.

The form on the left shows how you configure the connection to the neopixels. The values have been pulled from the device over a serial connection. The user can edit them and then save them back into the device and test it.

I’m going to make a bunch of videos explaining how this all works and then deploy the server for anyone to have a go. Should be fun.