Project:
To implement 30+ controlled portable lighting displays in an area where not all displays can communicate with each other, or a central router.
Continue Reading →Project:
To implement 30+ controlled portable lighting displays in an area where not all displays can communicate with each other, or a central router.
Continue Reading →My goal:
To be able to control multiple lanterns at the same time in order to create a coordinated display.
The Reality:
The MQTT client library I use for Arduinos (pubsubclient) is ‘blocking’ in that if your connectivity to the server is not reliable, then the display sometimes stutters and possibly stops. I’ve tried some non-blocking workarounds, but it’s not 100% reliable.
In addition, although I can control these lanterns in a lab environment, the message often doesn’t make it through to one of the 10 Arduinos I’m testing with and has to be resent. Therefore, a command for them to simultaneously reboot works maybe 1 in 5 attempts across those 10 lanterns.
As a result, I think that while controlling lanterns via wifi and MQTT is pretty good, controlling them for coordinated displays is not that reliable.
This is the IoT MQTT Panel Pro layout I use for my FastLED based ‘mesh’ sketch. I’ve also got a physical control panel consisting of:
I’ve been working on an interactive art project as a favour for a friend of mine that would allow you to push buttons, use rotary encoders, potentiometers and so on in order to control an animated light fixture elsewhere in the room.
These controls would allow you to change:
To do so, I’m using an ESP8266 enabled FastLED based lantern combined with an ESP32 based control panel. They’re both MQTT enabled, and I’ll be using an Android phone as the wifi hotspot and MQTT broker.
Here’s an email I sent about my progress in wiring and initial coding for the control panel:
I finished wiring up all the pins this morning and . . .
ABSOLUTELY NOTHING WORKED. Wouldn’t even upload to the ESP32. Got out the voltmeter and started measuring:
Next step will be to start adding MQTT publishing functionality to each of those inputs.
So far so good. This shit takes time to do though. As <other friend> well knows, it can take a LOT of time.
In summary, things typically don’t go as expected, so it can boil down to troubleshooting techniques. Divide and conquer.
Update: The next day, I had the buttons and potentiometer working just peachy. Only problem is, that my mode selector was meant for buttons and I was trying to use a rotary encoder for that. Now have to change code for both the control panel as well as the lantern to accept the values provided by the rotary encoder. Have also got the LED on the control panel to show Red when there’s no network connectivity, Orange when it’s connected, and finally Green when both wifi and MQTT are connected.
As mentioned in my ‘Getting Started’ post, I create separate ‘devices’ for my different Arduino sketches, such as mqtt-LED, mqtt-fire2012xy, mqtt-mesh, and so on. In addition, I may have more than 1 of each type of lantern displaying at the same time. To do so, I will serialize each lantern (it’s in the code) and using a combo box widget, I can then select one or ALL of each device type and publish that to the broker, which will then get picked up by the subscribing device. I’ll then use another widget to send hue, brightness to other information to the selected devices.
In order to support these multiple device types (aka sketches), I’ll add a device prefix to the topic.
For a fire2012 lantern, the published topic can look like this:
Our first example was outlined in “Getting Started withi ESP8266 and MQTT“. This first example uses a sketch called mqtt-LED-synchronous.ino to blink the internal LED. It waits for the wifi initialization, followed by the MQTT initialization to complete before the continuous loop can run.
The second example is called mqtt-LED and appears similar to the first examples, however while the networking and MQTT code are initializing, the loop is running. In addition, if we temporarily lose MQTT connectivity, the sketch will continue MQTT transmission/reception once communications are re-established.
The third example is called mqtt-JSON and adds JSON data exchange to the previous example, allowing for more detailed information to be exchanged between the control panel and the subscribing device.
mqtt-fire is our first example using the FastLED display library. Controls in this example are a combo box, which is used to select from one or more fire enabled lanterns, while the remaining slider controls support brightness, hue, speed, cooling and sparking.
Being able to control an Arduino remotely really ups our automation game. In the beginning, it was buttons and potentiometers and from there, we graduated to Infra Red remote control.
With the widespread availability of IoT (Internet of Things) functionality, we now have Internet connectivity to our Arduino compatible microcontrollers. One method is to setup our Arduino as a web server, and Jason Coon’s ESP8266 webserver is a prime example.
Another option is a messaging protocol called MQTT (Message Queuing Telemetry Transport) which provides a lightweight method of controlling IoT devices, and in this case an ESP8266 based microcontroller.
This tutorial goes through the steps of setting up an Android phone and an ESP8266 based WeMOS D1 Mini with MQTT controls to turn the internal LED of the ESP8266 on and off.
Continue Reading →At long last, after having spent far too much time developing routines for an 8 bit microcontroller that runs at 16MHz and with 2K of RAM, I’m now ready to move on to a better one. In the meantime, my routines focused on addressable LED strips and utilized:
My Youtube page contains a lot of demos using this combination and is at: https://www.youtube.com/user/atuline/videos.
My github repository contains the source code for most of those demos and is at: https://github.com/atuline.
This document outlines the procedures to install Minio as a Service on a new CentOS 7.3 Minimal server. It provides a little more detail to the procedures in the references at the bottom of this article.
I’m using VirtualBox on a Windows 10 Workstation, with a fresh install of CentOS 7.3 Minimal. Also installed is a copy of Git Bash for Windows.
The reason I use Git Bash is because I can copy/paste text from the examples below into the Git Bash prompt.
Continue Reading →
Backing up your data to a Linux based SFTP server is an inexpensive method that separates network shares (which can be attacked by crypto viruses) from your backups. You can configure Cloudberry’s SFTP backups with either password based access or with a shared cryptographic key so that regular passwords aren’t used. This document provides steps on using both methods to access an SFTP server with Cloudberry Backup.
SFTP advantages:
SFTP disadvantages: