Automating Custom IoT Devices With Appium - Part 1

January 10, 2026 · 9 min read · Tool Comparison

HeadSpin Platform
Automated & amp; manual testing made leisurely through information science insights.
Differentiating capabilities:
  • Panoptic end-to-end automation of QA process
  • Comparative analysis of app performance against compeer
  • Continuous monitoring of app execution using synthetic information for higher availability of apps
  • Easy-to-use developer friendly platform
cloudtest go
Affordable Existent Device Testing for Emerging Teams
cloudtest go
Low-priced Real Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized nomadic trial execution in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based testing

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Automating Custom IoT Devices With AppiumAutomating Custom IoT Devices With Appium

Automating Custom IoT Devices With Appium - Part 1

Published on
June 19, 2019
Updated on
Published on
March 14, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

This article is the first in a two-part serial on using Appium with platformsverydifferent from mobile operating systems. You can too say.

Custom built drum machine

In my AppiumConf 2019 opening keynote, I made some appropriately all-embracing and keynotey comments about the state of automated test job and techniques. But really, this was all exactly setup, designed to demonstrate a single point: Appium is first and foremost a set of codification interfaces that make it easy to work Webdriver-style automation toany platform.

Over the years, I & # x27; ve be thinking a bit about what odd platforms are out there that we could automatise with Appium, and one that & # x27; s kept get to mind is & quot; IoT & quot;. IoT of line is a vague term, and can refer to lots of types of applications. One invariable for definition of IoT is that it involves some variety of physical connection to the creation. IoT devices aren & # x27; tjustsoftware -- -they & # x27; re a combination of softwareandsome kind of special-purpose ironware (usually link to the Internet, as the term implies). This ironware has interface point with software, but essential to its creation is some form of physical stimulant and/or output.

How on world would we examine such a thing? Well, one part is easy: figuring out to cast mechanization behaviors with the twist in terms of Webdriver commands. A few years ago, I imagined what an Appium test for an X-Wing might look like:

For autonomous testing across multiple user personas, check out SUSATest — it explores your app like 10 different real users.

Fire proton torpedoes

Pretty much any interface, virtual or physical, can be contrive in price of elements and interactions with them. So therealquestion is, how do you turn Webdriver command into actual doings for a piece of ironware? That is the subject of this series, and in the second portion we will answer that question immediately. For this first part, we need to first develop the & quot; app under test & quot; to prove out the unhurt idea. In other lyric, we need to build ourselves a physical device that we will then write an Appium test for after on.

The device we & # x27; ll build is pictured at the top, and it is a drum machine! Here are the demand for this & quot; app & quot; (device):

  1. It should have 4 buttons as input
  2. It should make 4 sounds as yield -- -one sound corresponding to each button
  3. Sounds should be sent along an audio cable for use with headphones or speakers
  4. As additional feedback, there should also be optic (LED) output whenever a button is pressed

That & # x27; s exactly how this slight machine works. Here & # x27; s a GIF of it in action (of course, you & # x27; ll have to reckon the sound -- -and believe me that your imagery will be better than the quality of the actual samples):

Animated GIF of the drum machine in action

And hither & # x27; s how we build it:

  1. Buy an Adafruit Circuit Playground Express(CPX). This is the microcontroller that will be in charge of detect button insistence, playing audio, and even choose when to turn an LED from red to green.
  2. Buy 4 turgid buttons(these ones include LEDs but we will not use that functionality), a bunch ofalligator magazine, and a 1Kohm resistance (or pot).
  3. Hook up each push to a land pad on the CPX, and the push track to one of the input pads on the CPX (I used A1, A2, A5, and A6).
  4. Take a wire from AO (audio out) to the resistor, and from the resistance to your earpiece jack (make sure it stir either side of the outermost separator, in former words, touching both of the outermost metal area). Take another wire from a ground pad on the CPX to the innermost metal section on your earphone jack.

Now that it & # x27; s all built, we need to yield it some brains! Ensure that your CPX has been set up to work with CircuitPython. Then, check out thesource fileswhich need to be replicate to the CPX (using rsync or merely drag-and-drop). Once the codification is copied, the CPX will reboot, and you should have a functional drum machine!

This barrel machine is not so good, and has a bunch of limit. It can entirely play one sound at a clip, so you can & # x27; t hit the basso and the cymbal simultaneously, for illustration. The sound caliber is ridiculously bad. But it works!

The only thing left to read in this part of the serial is what the & quot; app code & quot; look like. You can see that there are initiatory of all 4 WAV files, fit to the sounds make by the button. The code itself last incode.py:

from adafruit_circuitplayground.express import cpx from digitalio import DigitalInOut, Direction, Pull meaning audioio import board INPUTS = [{'board ': board.A1, 'pixel ': 6, 'drum ': 'kick-8 '}, {'board ': board.A2, 'pixel ': 8, 'drum ': 'snare-8 '}, {'board ': board.A5, 'pixel ': 1, 'drum ': 'hihat-8 '}, {'board ': board.A6, 'pixel ': 3, 'drum ': 'hitom-8 '},] def play_file (filename): wave_file = exposed (filename, `` rb '') with audioio.WaveFile (wave_file) as undulation: with audioio.AudioOut (board.A0) as audio: print (`` playing % s '' % filename) audio.play (wave) while audio.playing: pass def init (): for input_spec in INPUTS: pin = DigitalInOut (input_spec ['board ']) pin.direction = Direction.INPUT pin.pull = Pull.UP input_spec ['pin '] = pin cpx.pixels.brightness = 0.1 init () while True: for input_spec in INPUTS: if input_spec ['pin '] .value: cpx.pixels [input_spec ['pixel ']] = (255, 0, 0) else: cpx.pixels [input_spec ['pixel ']] = (0, 255, 0) play_file (`` % s.wav '' % input_spec ['drum '])

The significant things to note here are:

  • We are using an Adafruit-specific library to gain approach to a bunch of helpful functionality. This is how we easily turn WAV files into electrical yield, or control the LEDs. Without this built-in library, our project would bemuch harder.
  • We continue the code clean and general by defining a map of input pads, sounds, and LED identifiers.
  • The code escape in an infinite cringle. On each iteration of the loop, we simply check whether a push is pressed (i.e., input_spec [& # x27; pin & # x27;] .value is False, meaning the button has broken the circuit by being press down). If so, we set the corresponding LED to green, and play the like WAV file.

That & # x27; s it! In less than 50 line of code, and without breaking the bank (this setup cost around $ 50USD, but of course all the parts are reusable for other undertaking), we & # x27; ve built our very own light-animated membranophone machine! You can see that I chose to & quot; mount & quot; my tympan machine in a used yoghurt container. You might choose something more posh -- -that & # x27; s up to you. Be sure to check out Part 2 of this series to see how we tackle the challenge of writing Appium tests for this custom ironware device.

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamic and results-driven Content Marketing Specialist with 8+ years of experience in crafting engaging narratives and market collateral across diverse industries. She excel in collaborating with cross-functional teams to develop advanced content strategies and present compelling, veritable, and impactful substance that resonate with target hearing and enhances make genuineness.

LinkedIn

Automating Custom IoT Devices With Appium - Part 1

4 Parts

regression intelligence blog
-

Regression Intelligence hardheaded guide for advanced user (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guidebook for innovative users (Part 4)

Coming Soon

Discover how HeadSpin can authorise your business with superior testing potentiality

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with quicker development cycle
automated buil-over-build regression testing
Automate build-over-build fixation testing for consistent results
gain better visibility into functional & performance issues
Gain better visibleness into functional and execution issues
reduce mean time
Reduce mean time to identify/resolve during test, QA, and product
evaluate audio, video & qoe
Evaluate sound, video, and contented quality of experience (QoE) effortlessly
The trusted choice for global enterprises
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can empower your job with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster ontogenesis cycles
automated buil-over-build regression testing
Automate build-over-build regression test for consistent upshot
gain better visibility into functional & performance issues
Gain best visibility into functional and performance issues
reduce mean time
Reduce mean clip to identify/resolve during test, QA, and product
evaluate audio, video & qoe
Evaluate audio, picture, and content calibre of experience (QoE) effortlessly
The trusted choice for global enterprise
Close

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a free-enterprise edge
faster development cycles
Boost developer/QA productivity with faster development cycles
automated buil-over-build regression testing
Automate build-over-build fixation testing for consistent results
gain better visibility into functional & performance issues
Gain best visibility into functional and performance number
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content quality of experience (QoE) effortlessly
The trusted pick for global enterprises
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free