[{"content":"Background (Or, Why Cloud-Based Integrations Are Unreliable) In our house, we have Mitsubishi Hyper Heat heat pumps for central heating and cooling. The system has worked well since we installed it, but integrating it with Home Assistant required the use of a custom, cloud-based integration through Mitsubishi\u0026rsquo;s Kumo Cloud system. I am very thankful to developers like dlarrick for reverse-engineering and implementing this integration, but I would still prefer a local-only system for something as central as my HVAC system.\nThen, in March 2025, Mitsubishi released a new app that broke the existing integration (and didn\u0026rsquo;t seem to improve the cloud reliability). This was the push I needed to figure out an alternative solution.\nESPHome to the Rescue I have a lot of ESPHome devices scattered around my house, so it only made sense to integrate the HVAC with ESPHome. Fortunately, others are working on integrating Mitsubishi\u0026rsquo;s UART protocol with ESPHome natively. In the meantime, there is a custom component available for ESPHome that works very well: https://muart-group.github.io/user\nThis component connects to the HVAC system using the CN105 port used for the Kumo Cloud adapter and/or external thermostats.\nFor my use case, I need to be able to connect both a Mitsubishi thermostat and this ESPHome adapter, so this prebuilt ESP32 board on Etsy was perfect. It has a passthrough port to allow connecting the MHK2 thermostat base station. Unfortunately, it\u0026rsquo;s out of stock at the time of writing, but the shop owner claims they are \u0026ldquo;expecting new boards probably mid-May-ish depending on scheduling and world-trade.\u0026rdquo;\nThe documentation and ESPHome configuration for the boards are here: https://github.com/tinwer-group/mahtanar\nPackaging and Installing The product above is just a bare board, so I needed an enclosure to protect it when mounted to my indoor HVAC units. I made a quick 3D model to have a properly fitting case. The model is available on Thingiverse.\nWith that done, it\u0026rsquo;s as simple as unplugging the old Kumo Cloud adapter and plugging this ESPHome adapter in its place!\nThe lower box is the new adapter and the upper box is the base station for the MHK2 thermostat.\nUsage in Home Assistant Setting up the device is the same as any other ESPHome device, and you can follow the board creator\u0026rsquo;s instructions here.\nIn Home Assistant, this setup exposes a fully functional climate entity, plus several additional sensors and configurations. For example, mine exposes useful details like filter status, outdoor temperature, and compressor frequency.\nAs a little bonus, I also created a climate group using the custom climate group component. This allows me to control both of the HVAC zones in my house with a single virtual thermostat. That group thermostat is then exposed to HomeKit and available on my central wall display.\n","permalink":"https://corb.co/posts/heatpump-esphome/","summary":"Removing unreliable cloud dependencies AND improving functionality!","title":"Replacing Mitsubishi's Kumo Cloud with Local ESPHome Control"},{"content":"Have you ever struggled to park perfectly in your garage? Sure, you could hang a tennis ball on a string, but where\u0026rsquo;s the fun in that? Ever since I was a kid, I\u0026rsquo;ve dreamed of having a traffic light in my house. Now that my wife and I are renovating our home, I finally had the chance to make this dream a reality—with a slight modification. While a full traffic light might not fit with our home\u0026rsquo;s aesthetic (according to my wife), I found the perfect alternative:\nA pedestrian crossing light for our garage!\nThe Light Turns out you can find anything on eBay, including a pedestrian crossing signal for just $40. This particular model was perfect because it had everything I was looking for:\nHand and walk icons in the classic style I wanted (different models have varying designs) A 2-digit, 7-segment number display for distance readings Cheap enough that I can break it and not feel bad The sign runs on 120V AC out of the box, making it easy to work with.\nHardware Modifications The first challenge was getting inside the weatherproof housing. These signs are built to withstand the elements, so it took some work with a Dremel and several cut-off disks to carefully cut through the plastic shell. (Pro tip: wear eye protection for this part! 🕶️)\n(Note that if you only wanted to control the hand and walk lights, that could be done with just a relay board without opening the housing.)\nInside, I discovered the sign was divided into two separate systems:\nThe hand/walk signals The countdown timer display The hand/walk system turned out to be surprisingly straightforward: it just needed ~12V DC applied to different sets of pins to control each signal. I was impressed to find that the system was designed with a fail-safe mechanism—if you try to activate both signals simultaneously, it defaults to showing the \u0026ldquo;stop\u0026rdquo; hand.\nThe numerical displays required a different approach. While I could have designed a control board for the existing LED setup, it would have required either:\nA large number of GPIO pins (one for each segment) A 7-segment driver circuit (which would struggle with the high power requirements of these large displays) Instead, I opted for a more DIY solution: replacing the original LEDs with addressable RGB LED strips. By carefully cutting and chaining the strips to follow the segment patterns, I created a fully software-controllable display that offered bonus features like color control and effects.\nUnfortunately, I didn\u0026rsquo;t think to paint the backing board black until after mounting the strips\u0026hellip;\nMaking it Smart: Control System For the brains of the operation, I chose an ESP32 coupled with some basic MOSFETs to handle the power switching for the walk/hand signals. I soldered these components to a piece of perfboard and managed to fit it in some empty space within the housing.\nOn the software side, I went with ESPHome, an excellent firmware framework that integrates seamlessly with Home Assistant.\nUsing ESPHome\u0026rsquo;s light partition feature, I split the single addressable LED strip into a virtual light for each of the 14 segments, plus a light for each of the hand and walk signals.\nlight: # One light strip snakes around the unit, covering both number displays. # See the `partition` entries below for breaking up the strip into segments. - platform: esp32_rmt_led_strip rgb_order: GRB pin: 22 num_leds: 87 rmt_channel: 0 chipset: WS2812 id: digit_display_light internal: true - platform: partition name: Digit 1 Segment 1 id: dig_1_seg_1 internal: true segments: - id: digit_display_light from: 77 to: 79 - platform: partition name: Digit 1 Segment 2 id: dig_1_seg_2 internal: true segments: - id: digit_display_light from: 69 to: 73 # Continued for 14 segments... To make controlling the numbers from Home Assistant more practical, I also added a number component to the ESPHome configuration. I\u0026rsquo;d recommend reading the actual code/config for that here, but it takes a number -9 through 99 and figures out which segments to turn on.\nIn Home Assistant, there is now a simple number input that I can set to any valid number to update the display.\nMaking it Useful: Parking Distance Sensing With a fully controllable display on the wall, it was time to make it actually useful as a parking aid.\nThe classic way to do distance measurement with a microcontroller is using very cheap ultrasonic sensors like the ubiquitous HC-SR04. I went with a slightly upgraded and waterproof version: the JSN-SR04T Waterproof Ultrasonic Sensor. This is a nice alternative for a few reasons:\nLonger sensing range Waterproof/protected sensor (nice for a garage that I also use as a workshop) Compatible with the same ultrasonic libraries that work for the SR04 Comes with long connection wires that makes mounting in the garage easier I mounted the sensors on the garage wall, carefully aligned with each car\u0026rsquo;s bumper. After some calibration to determine the ideal parking position, the system provides real-time distance measurements through Home Assistant.\nWith some more ESPHome configuration and lambdas, changes to the distance will update the hand/walk signal and the number display.\nsensor: - platform: ultrasonic name: \u0026#34;Range Sensor - Left\u0026#34; unit_of_measurement: \u0026#34;inches\u0026#34; # ... on_value: then: # Display the distance the car has to move. If it\u0026#39;s an invalid reading, blank the display. - number.set: id: display_number value: !lambda \u0026gt;- if (isnan(x)) { return -10; } int display_value = max( -9, min( (int)(round(x) - id(target_distance_left).state), 99 )); if (display_value \u0026gt;= 20) { // Distances over 20 are noisy. Just display \u0026#34;--\u0026#34; return -11; } return display_value; # Update the hand/walk signals accordingly. If the car is less than 3 inches from the target, display the hand. Otherwise, display the walk. - lambda: |- if (isnan(x)) { id(light_hand).turn_off().perform(); id(light_walk).turn_off().perform(); } else if ((x - id(target_distance_left).state) \u0026lt; 3) { id(light_hand).turn_on().perform(); id(light_walk).turn_off().perform(); } else { id(light_hand).turn_off().perform(); id(light_walk).turn_on().perform(); } To make the system completely integrated, I added Home Assistant automations that automatically activate the correct parking sensor when a garage door opens. This creates a seamless experience where opening the garage door with the remote is the only action needed. Everything else happens automatically.\nLive Demo! Putting it all together, here\u0026rsquo;s the experience of driving into my garage: Code and Resource Links While I imagine each type of pedestrian signal is unique, this project should be repeatable with some basic tools and hardware. I used the following:\nParts Pedestrian Crossing Signal with Countdown Display: eBay listing, Manufacturer page with datasheet ESP32: ESP32 D1 Mini on AliExpress WS2815 12VDC Individually-Addressable RGB LED Strip: BTFLighting on AliExpress Miscellaneous 12+V DC MOSFETs for controlling the hand/walk LEDs 12V DC Power Supply JSN SR-04T Waterproof Ultrasonic Sensors: Available on Amazon/AliExpress/etc. Datasheet Code ESPHome config Home Assistant package with automations ","permalink":"https://corb.co/posts/esphome-parking-sign/","summary":"Repurposing a pedestrian crossing light as a garage parking system using ESPHome","title":"Pedestrian Crossing Light as Parking Sensor"},{"content":"The Problem I\u0026rsquo;ve lived in several apartments where the wall switch controls a single socket of one outlet. The expectation is that you would plug a floor lamp into that outlet and use the wall switch to control it, but I like to have all of my lighting integrated into my home automation system. That leaves a couple options:\nReplace the switch with a smart switch. This is the best answer and the one I would do, but I can\u0026rsquo;t modify the wiring in an apartment so that\u0026rsquo;s a non-starter. Leave the switch in the \u0026ldquo;on\u0026rdquo; position at all times and put a smart bulb in the lamp. This would allow automated control of the light, but the switch is useless. Additionally, if someone accidentally turns off the switch, the light can no longer be controlled. This isn\u0026rsquo;t ideal, but it is a common compromise people make when installing smart light bulbs. Neither answer is perfect for me, so I came up with a new idea.\nThe Solution What if I could just plug in a device to the outlet that would detect if the switch was on or off? Functionally that would be identical to installing a smart switch, but it could be installed and removed in seconds by just unplugging it.\nEnter the \u0026ldquo;outlet power sensor\u0026rdquo; (name pending — suggestions?)\nPrototype sensor with switched output\nThe sensor has two separate plugs that must both be connected. One provides constant power to run the device, and the other is the sensor plug. When the sensor plug is connected to power, a binary_sensor in Home Assistant will be activated instantly.\nBy plugging these two plugs into the switched and unswitched sockets of an outlet, you can instantly convert a wall switch into a smart switch.\nThis version also includes two output sockets. One is connected to constant power so you can still use the outlet even though this device occupies both sockets. The other output is connected to a relay and exposed in Home Assistant as a separate switch component, allowing independent control of additional devices. If you don\u0026rsquo;t need outputs, the wiring can be simplified.\nReal-World Usage So it\u0026rsquo;s a useful device, but what does it actually do? Here\u0026rsquo;s an example from my setup.\nIn my bedroom, a wall switch next to the door normally controls an outlet in an inconvenient location, not where I wanted the main light. I put a floor lamp with a smart bulb in the ideal spot and set up control of the light with remotes on our bedside tables. That left only voice control to turn on the light when you enter the room and a confusing, effectively useless wall switch for guests.\nI plugged an Outlet Power Sensor™ into the switched outlet and wrote a very simple automation so toggling the wall switch toggles the lamp. Now I can control the light from the wall switch, automations, bedside remotes, phones, and voice control. All without modifying any wiring.\nI\u0026rsquo;m sold. How do I build one? Caution! This project involves working with high-voltage wall power and wiring connections in a somewhat unexpected way. Wall power is dangerous, and I\u0026rsquo;m not responsible if you copy this project and something goes wrong. Please be very careful, check all of your connections, and make sure you understand the risks before proceeding. I had this idea a few years back and was surprised there wasn\u0026rsquo;t a product on the market for it. It seems the apartment-dwelling home automation market is still small. I\u0026rsquo;ve built a few versions over time — including a clever setup that involved disassembling an LED nightlight — but ultimately didn\u0026rsquo;t feel like the projects were safe enough to share with other people.\nThen I realized I could build one out of a Shelly. If you\u0026rsquo;re unfamiliar, it\u0026rsquo;s a cheap WiFi relay intended to be mounted behind an existing switch to convert a standard switch into a smart switch. Sounds very similar to what we\u0026rsquo;re doing! The Shelly already provides the high-voltage connections we need safely, and it\u0026rsquo;s a trusted, UL-listed device. It\u0026rsquo;s definitely a step up from hacking up a nightlight.\nParts List 1 × Shelly 1 - about $20 2 × basic indoor extension cords like this one - about $3 Any basic extension cords will work. You\u0026rsquo;ll be cutting them down to your preferred length, so shorter is better. If you\u0026rsquo;d like to use a grounded version like this one, you\u0026rsquo;ll have to identify and connect all of the ground wires together as well. 2 × wire nuts or WAGOs - basically free (buy a mixed pack and keep them on hand) Note that Shelly now has many versions. The Shelly 1 Mini would likely be a perfect replacement for the older Shelly 1. Just make sure you use the correct terminals and update the GPIO pins and board type accordingly in ESPHome.\nWiring Diagram for the simple version without outputs\nFor the version without outputs, the wiring is very simple. The Shelly is powered by the line/hot (L) and neutral (N) wires from the unswitched outlet. From the switched outlet, connect the line/hot side (smaller slot) to connect to the switch input (SW) on the Shelly. This way, the Shelly can sense when there is power on the switched outlet.\nThe O and I terminals are not used for this setup. If you want to have a separate switched output, you\u0026rsquo;ll use these terminals to pass through the relay.\nSoftware - ESPHome While the Shelly comes with very decent software that even includes the ability to run the device in a fully-local setup, I prefer to use ESPHome on my devices. ESPHome is an excellent open-source project that allows YAML configuration of devices and very clean integration with Home Assistant.\nI won\u0026rsquo;t go into detail about how to flash ESPHome onto a Shelly, but there are a few options. I used a cheap FTDI USB to TTL serial adapter and connected directly to the device. The Tasmota and ESPHome docs will be helpful for that type of install. I recently came across a way to flash the Shelly over-the-air from the stock firmware, but I haven\u0026rsquo;t tested this process myself.\nThe configuration I use for ESPHome is available here, but it\u0026rsquo;s pretty simple.\nFirst is the boilerplate stuff:\nesphome: name: bedroom_outlet_sensor esp8266: board: esp01_1m wifi: ssid: !secret wifi_ssid password: !secret wifi_password logger: api: ota: Note that the wifi settings use !secrets. This feature allows you to extract private information from the YAML configurations.\nThen we get into the slightly more interesting stuff: inputs and outputs.\nbinary_sensor: - platform: gpio pin: number: GPIO5 name: \u0026#34;Bedroom Outlet Sensor\u0026#34; device_class: power # Only relevant if you included outputs. switch: - platform: gpio pin: GPIO4 name: \u0026#34;Bedroom Outlet Output\u0026#34; That\u0026rsquo;s the entire configuration. It just sets up a binary_sensor representing the wall switch state and a switch component for the switched output.\nConfiguration in Home Assistant Using ESPHome has another benefit: autodiscovery in Home Assistant. If you flash the new configuration to your Shelly, Home Assistant should prompt you to configure the device automatically.\nAfter it\u0026rsquo;s set up, you should have a new entry in the \u0026ldquo;Settings → Devices\u0026rdquo; menu of Home Assistant:\nAt this point, you can flip the switch on the wall and you should see the outlet sensor entity change state. That means we\u0026rsquo;re almost done.\nAutomation We\u0026rsquo;ve made it to the last step: tying it all together.\nHow you proceed here will depend on what you want the wall switch to do when you flip it. Now that it\u0026rsquo;s just a binary_sensor in Home Assistant, anything is possible. I have it simply toggle the smart light in a lamp in the same room, but you could have it lock all the smart locks, turn the lights red, and play a lullaby on your speakers. These are the benefits of integrating everything into one central hub.\nFor a simple example, here\u0026rsquo;s an automation that just toggles a light:\nautomation: - alias: Bedroom Light Switch - Toggle Lamp trigger: - platform: state entity_id: binary_sensor.bedroom_outlet_sensor from: \u0026#34;off\u0026#34; to: \u0026#34;on\u0026#34; - platform: state entity_id: binary_sensor.bedroom_outlet_sensor from: \u0026#34;on\u0026#34; to: \u0026#34;off\u0026#34; action: - choose: # If currently off, turn on full brightness. - conditions: - condition: state entity_id: light.bedroom_lamp state: \u0026#34;off\u0026#34; sequence: - service: light.turn_on entity_id: light.bedroom_lamp data: # Always set it to full brightness when turning on. brightness: 255 # If currently on, turn off. - conditions: - condition: state entity_id: light.bedroom_lamp state: \u0026#34;on\u0026#34; sequence: - service: light.turn_off entity_id: light.bedroom_lamp Wrapping Up I\u0026rsquo;ve been using two of these simple devices in my apartment for about 6 months now and I\u0026rsquo;m amazed by how good the experience is. As a renter, replacing fixtures and switches is out of the question, but these sensors give the full smart switch experience with no permanent modifications. They also improve the overall user experience because they use an existing, well-known setup that guests don\u0026rsquo;t have to understand to use. To everyone other than me, the switch just controls the light, and that\u0026rsquo;s all they have to know. Finally, by decoupling the light switch from the light itself, I can configure multiple inputs and multiple outputs. I can turn the light on with the light switch, have it dim automatically when we watch a movie, and turn it off from my bedside button as part of my nighttime routine.\nGood home automation is all about improving the experience without getting in the way; this project has fulfilled both of those goals.\n","permalink":"https://corb.co/posts/outlet-power-sensor/","summary":"A renter-friendly system to create smart switches out of switched outlets.","title":"Outlet Power Sensor"},{"content":"Hey! I\u0026rsquo;m Corban Mailloux. 👋🏼\nIn my professional life, I\u0026rsquo;m a staff engineer in Massachusetts, currently between roles and looking for what\u0026rsquo;s next. (Hiring for remote work? Reach out: web@corb.co)\nUntil recently, I built and maintained several components of VMware/Broadcom\u0026rsquo;s SaaS platforms. I primarily focused on scaling various data ingestion pipelines, including one system running more than a million jobs per minute. I rode through two acquisitions in that time: CloudHealth was acquired by VMware in 2019, and VMware was acquired by Broadcom in 2023.\nI\u0026rsquo;m an alumnus of Rochester Institute of Technology where I majored in software engineering with a focus on computing security. I also minored in communications.\nOutside of work, I enjoy home improvement projects, making music, and flying FPV drones. I play saxophones and keys in a band called Well Suited. Come check us out sometime!\nAt home, I\u0026rsquo;m a dad of 1 and cat-dad of 2. For the cats, I\u0026rsquo;ve trained them to do various tricks including jumping through hoops, walking upright, and heeling by my side. You can find some of our cat training adventures on Instagram. As you\u0026rsquo;ll see in my projects, I like to work on home automation projects and generally enjoy DIY electronics. I\u0026rsquo;m a big fan and occasional contributor to Home Assistant, an open-source, Python-based platform that integrates with just about everything. You can find my complete Home Assistant configuration on Github.\nI invite you to take a look at some of my previous project write-ups and to reach out on LinkedIn or email.\n","permalink":"https://corb.co/about/","summary":"\u003cp\u003eHey! I\u0026rsquo;m Corban Mailloux. 👋🏼\u003c/p\u003e\n\u003cp\u003eIn my professional life, I\u0026rsquo;m a staff engineer in Massachusetts, currently between roles and looking for what\u0026rsquo;s next.\n\u003csmall\u003e(Hiring for remote work? Reach out: \n\u003ca href=\"mailto:web@corb.co\" \u003eweb@corb.co\u003c/a\u003e)\u003c/small\u003e\u003c/p\u003e\n\u003cp\u003eUntil recently, I built and maintained several components of VMware/Broadcom\u0026rsquo;s SaaS platforms. I primarily focused on scaling various data ingestion pipelines, including one system running more than a million jobs per minute. I rode through two acquisitions in that time: CloudHealth was acquired by VMware in 2019, and VMware was acquired by Broadcom in 2023.\u003c/p\u003e","title":"About Corban"},{"content":"As a kid with 3 three siblings, we used to play family board games together. One of our family\u0026rsquo;s favorites was Electronic Talking Mystery Mansion, in which the players furnish a mansion with these little pieces of furniture and then search for clues about where the \u0026ldquo;money\u0026rdquo; is hidden. It\u0026rsquo;s an awesome game; it kind of feels like a combination of Clue and a dollhouse. At a recent family gathering, we went to play the game and discovered that the \u0026ldquo;computer\u0026rdquo; part wasn\u0026rsquo;t reliably working. I joked that I could recreate the game\u0026hellip; and a couple of hours of tinkering later, we were playing again.\nLater on, I went back through and recorded my best impression of the talking voice. The voice-overs use winsound on Windows and PyAudio on Linux. The rest of the system is running on pure Python.\nThe project is available on GitHub, where there is a readme with installation instructions.\n","permalink":"https://corb.co/posts/mystery-mansion/","summary":"A quick Python rebuild of a classic electronic board game.","title":"Mystery Mansion, corb.co Edition"},{"content":" Shredify.me (now hosted at shredify.corb.co) is a site that matches excellent celebrity photos (like \u0026ldquo;Shreddy White\u0026rdquo; here) with excellent (read: ridiculous) metal versions of related music.\nFor example, we have:\n\u0026ldquo;Taylor Shrift\u0026rdquo; with a metal cover of \u0026ldquo;Blank Space\u0026rdquo; Barack \u0026ldquo;Who-Shred\u0026rdquo; Obama with a homemade metal cover of \u0026ldquo;Hail to the Chief\u0026rdquo; Reba McEnShred with a metal cover of her \u0026rsquo;90s hit \u0026ldquo;Fancy\u0026rdquo; The result is available at shredify.corb.co, and the code is available on GitHub.\n","permalink":"https://corb.co/posts/shredify.me/","summary":"Will It Shred?","title":"Shredify.me"},{"content":" From the description of the app on the Google Play Store:\nDo you lift?\nDo you wish people asked you if you lift, just so you can say that you do?\nWell now you can have your phone or tablet ask you, giving you that positive, self-righteous feeling as often as you want. When you admit that you haven\u0026rsquo;t actually lifted today, the app will help you find a nearby gym.\nNo excuses; lift like a champion.\nDid You Lift Today? started as a joke Android app when my body-building friend Jake and I had a conversation that went something like this:\nMe: Ooh. Google Fit was just released. That\u0026rsquo;s cool. Jake: I don\u0026rsquo;t understand all of these fitness trackers. I think there should be an app that just asks you if you lifted. That\u0026rsquo;s all that\u0026rsquo;s important anyways. Jake leaves to go to the gym. By the time Jake got back, I had developed an app using Tasker\u0026rsquo;s App Factory that did just that. After a few people in my office saw it, it became a running joke/useful tool.\nI then developed a real Android app of it, available on the Google Play Store, which went on to get some amazing reviews.\nAfter an iPhone-using coworker complained that it wasn\u0026rsquo;t compatible with iOS, I built a web version at lift.corb.co that uses localStorage to track your lifts.\nThe Android app code and the website code are both available on branches on GitHub.\n","permalink":"https://corb.co/posts/lift/","summary":"Daily check-in workout tracker for beefcakes.","title":"Did You Lift Today?"},{"content":"Note from the future: RGBDuino and RGBWeb are very old and outdated, but they were some of my first publicly-shared projects so I keep them up for historical purposes. They were also my first steps into home automation and IoT devices. There are now many better ways to build this kind of system, especially if you\u0026rsquo;re trying to use it as part of a larger lighting system. Personally, I love ESPHome and use it with Home Assistant. RGBWeb is an evolution of RGBDuino that removes the Bluetooth requirement by using an internet connection. This does, however require a server to remain running with the Arduino attached. RGBWeb also was built with some new features that RGBDuino never had.\nRGBWeb is a project created to use an Android device, an Arduino, and a server to control a string of red-green-blue LEDs over the internet. The project consists of three main parts: the hardware side (Arduino), the server configuration, and the Android software.\nApp Screenshot This is what the app looks like: Hardware (Arduino) The Arduino has very similar wiring to RGBDuino. The only difference is that RGBWeb does not have the Bluetooth module attached. See the RGBDuino project page for an image of the basic configuration.\nEssentially, the Arduino receives commands over the USB (serial) connection. The power N-channel MOSFETS have their gate legs (left legs) connected to PWM pins 9, 10, and 11. Each gate leg is also connected through a resistor to GND. While there may be an optimal value for this resistor, I have found that this setup is not picky about resistance. The drain leg (middle leg) is connected to one of the negative returns from the LED strip. The source legs (right leg) are all connected to GND.\nThe 12 volt power source connects to GND and the common anode on the LED strip.\nThe parts I used were:\nMOSFETS: \u0026ldquo;N-Channel MOSFET 60V 30A\u0026rdquo; from SparkFun Arduino: Arduino Nano (but any Arduino or clone should work) Server Configuration The server configuration was the part of this project that gave me the most trouble. At different times, I\u0026rsquo;ve had this project running on two different types of servers. It was running on an Apache server running on my main computer, but now it is running on a Windows Server 2012 Datacenter machine that is my general purpose server.\nI discovered that the biggest problem was ensuring a basic server was established and that the server was properly configured to run PHP.\nI chose to write the server web pages in PHP because I know that it can handle serial communications from the server to a locally attached device (specifically, an Arduino). Reading from a serial port is not, at the time of writing, possible on Windows, but that\u0026rsquo;s okay for our purposes. It would be nice for future updates to be able to get a response from the Arduino, though.\nI made two separate web pages in PHP to interact with the Arduino. One is only there to allow quick lighting control from any internet connected device from inside a web browser. All that web page does is display a text box to allow input of a HEX value of a color to display. I also added a JavaScript element called JSColor to allow more elegant color choosing. It uses PHP GET requests to execute commands. I didn\u0026rsquo;t want to use POST for this because I want to be able to simply enter a URL and have it change the lights without clicking or adjusting anything.\nFor example, this would set the lights on to white at full brightness:\nhttp://www.example.com/index.php?RGBColor=FFFFFF The other web page is not much of a page at all; it\u0026rsquo;s a custom API and is only intended to be accessed by the Android app. It uses PHP POST requests sent by the Android app to execute commands. This is the page that handles more complex features, such as password protection (very basic and unencrypted) and other custom commands like fading.\nThe actual PHP files, in the correct folder structure, are on Github (see link below).\nThe basic setup of the server is this:\nSet up any server system that allows PHP. Connect the Arduino (wiring is linked above) via USB to the computer that is running the server. Open the Arduino software and program the Arduino with the code provided and note the COM port that the Arduino is on. Update the PHP code to reference the correct COM port and to use a password of your choosing. Run the server. Software The Android app was written using MIT\u0026rsquo;s App Inventor and the Arduino code uses only standard Arduino libraries. The project source code and a compiled APK version of the app are available on GitHub.\n","permalink":"https://corb.co/posts/rgbweb/","summary":"Internet-controllable RGB lighting using Arduino.","title":"RGBWeb"},{"content":"Note from the future: RGBDuino and RGBWeb are very old and outdated, but they were some of my first publicly-shared projects so I keep them up for historical purposes. They were also my first steps into home automation and IoT devices. There are now many better ways to build this kind of system, especially if you\u0026rsquo;re trying to use it as part of a larger lighting system. Personally, I love ESPHome and use it with Home Assistant. RGBDuino is a project created to use an Android device and an Arduino to control a string of red-green-blue LEDs over Bluetooth. The project consists of two main parts: the hardware side and the software side.\nVideo First, a demonstration: Hardware For the hardware end of things, I used a breadboard-able version of an Arduino. Any Arduino or Arduino clone should work.\nEssentially, the Arduino receives bytes from the Serial Module through digital pin 2 and sends data through digital pin 3. The power N-channel MOSFETS have their gate legs (left legs) connected to PWM pins 9, 10, and 11. Each gate leg is also connected through a resistor to GND. The drain leg (middle leg) is connected to one of the negative returns from the LED strip. The source legs (right leg) are all connected to GND.\nThe 12 volt power source connects to GND and the common anode on the LED strip.\nThe parts I used were:\nMOSFETS: \u0026ldquo;N-Channel MOSFET 60V 30A\u0026rdquo; from SparkFun Bluetooth Module: \u0026ldquo;JY-MCU Bluetooth Wireless Serial Port Module for Arduino\u0026rdquo; from DX (edit: product link removed) Arduino: Arduino Nano (but any Arduino or clone should work) Software The Android app was written using MIT\u0026rsquo;s App Inventor. The project source and a compiled APK version of the app are available on GitHub.\nThe Arduino side of the project uses the SoftwareSerial library to listen to the Bluetooth module. This could be done with the built in Serial pins, but that would make it difficult to upload new code while testing. The Arduino code is also available on GitHub.\nRelated Projects Monica Houston built a new project using some elements of this project. You can check it out at Hackster.io.\nI also built an internet-connected version of this project called RGBWeb.\n","permalink":"https://corb.co/posts/rgbduino/","summary":"Bluetooth control of RGB LEDs with Arduino and Android App Inventor.","title":"RGBDuino"}]