• Try Us Out - See our Demo Tabs Above

    Sports Bars

    Experience our Sports Bar TV, Audio and Lighting Control System with our awesome demo! We provide multiple TV control systems that will easily integrate your Audio/Video and environmental components into one easy to use package. Let multiple hand-held remotes be a thing of the past and experience hassle free one-touch control. With the versatility of myServer 6, you may be able to retrofit existing equipment into the control system which makes it economical to get the most value out of your technology investment.


    With a whole new exciting look and feel our transparent "Moonlight" user interface allows clarity and ease in maneuvering your lighting floor plan, climate control, security cameras, and security keypad as well as entertainment options. Control all aspects of your home with simplicity and confidence.

    Digital Signage

    Allonis makes it easy to control and launch your media content. We have created software that ties in seamlessly to your bar or restaurant control system. Upload new images and videos, discard old ones, decide what to play or post and where with just a few selections.

  • Sports Bar & Restaurant Demo

    Select a source on the left and then select the TVs you would like to change on the right.

    Along the bottom are options for a DirecTV remote, TV Guide, Audio, Favorites & AppleTV. In addition you can touch the video camera on the left hand source options to get a live preview of what's playing on that source. Be sure to click around and try everything.

    Read More


    Customer Listening Experience

    Pan from left to right and up and down to see all the TVs.

    Customers can select the TV closest to them to tune in to the audio.

    Read More


    No Floorplan Option.

    If you are not interested in a navigable floor plan we can provide a generic interface instead.

    The same features are supported.

    Read More
  • Residential Demo

    Below is our residential simulation.

    Be sure to click around and try everything. Read more about the UI below.

    Read More
  • Digital Signage

    In the large window select a player on the left. Then select an option layout on the right. Select available assets from the list provided. You can add a ticker of either a message or weather by checking the boxes. When you are finished making selections click “send to player”. Your choice will appear on the corresponding player above. To pause a video click the player once.

    Read More
  • SmartRemote Demo

    Below is our SmartRemote simulation.

    Be sure to click around and try everything. Read more about the UI below.

    Read More

Our Products

See the latest myServer 6 products, available for individual purchase or part of a custom Allonis system built especially for your project.
Sports Bars
https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-ky-040-rotary-encoder-overview.jpg?width=378 1.7x, https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-ky-040-rotary-encoder-overview.jpg?width=500 2.2x" alt="overview of rotary encoder KY 040" width="225" height="225" style="box-sizing: border-box; border-style: none; height: auto; max-width: 100%; margin-bottom: 0px;" loading="lazy" />

Rotary encoders are position sensors that measure an axis’s angular position (or rotation). They’re mostly used in motors for PID control and user interfaces as an alternative to potentiometers. Furthermore, many encoders used in DIY kits have a push button built-in.

https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-rotary-encoder-example-in-3d-printer.png?width=756 1.7x, https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-rotary-encoder-example-in-3d-printer.png?width=1001 2.2x" alt="example of use of a rotary encoder 3d printer" width="450" height="450" style="box-sizing: border-box; border-style: none; height: auto; max-width: 100%;" loading="lazy" />

The control button on 3D printers is usually a rotary encoder

Getting started with a rotary encoder: the KY-040

https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-rotary-encoder-breadboard-example-esp32.jpg?width=1057 1.7x, https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-rotary-encoder-breadboard-example-esp32.jpg?width=1398 2.2x" alt="overview of rotary encoder KY 040" width="629" height="419" style="box-sizing: border-box; border-style: none; height: auto; max-width: 100%; margin-bottom: 0px;" loading="lazy" />

This tutorial will explore utilizing a KY-040 rotary encoder module, a common component in DIY kits. We can use this module to create a user interface for our program; for example, to select options from a menu or change the value of a variable.

Difference between rotary encoder and potentiometer

At first, the rotary encoder KY-040 may look like a potentiometer. However, a potentiometer is an analog sensor while the rotary encoder is digital. A potentiometer changes the value of a resistor, but its range is limited.

A rotary encoder can detect a specific number of “steps” for each revolution and sends a signal at each step. It also can turn endlessly. You can physically feel the difference between the two; a potentiometer rotates smoothly, while a rotary encoder turns jerkily.

A rotary encoder is a device that can be easily used with a microcontroller, as it sends digital signals. The precision of the encoder is based on the number of steps per rotation. At the same time, the accuracy of a potentiometer is determined by the resolution of the ADC that is used to measure its position.


A potentiometer is a device utilized to modify analog settings, such as the volume of an amplifier. In contrast, a rotary encoder is employed to get an angular direction and position accurately.

How works a rotary encoder?

This guide provides an overview of rotary encoders but does not dive into technical details.🤓 To gain a deeper understanding of the physical processes, different technologies, and classic topologies (such as the operation of an optical quadrature phase rotary encoder 😨), please refer to the theoretical presentation of a rotary encoder.

Connections of the KY-040 rotary encoder to the ESP32

This rotary encoder has 2 signals to know the position: CLK and DT . The pin SW is connected to the integrated push button (SWitch).


If you use a raw rotary encoder, not a breakout module, you must add pull-up resistors to the 3 logic pins. This is because these resistors must distinguish between the different logic levels as with the standard push-button circuit.

Here is a proposal for a connection to an ESP32 board :

Rotary Encoder












The circuit to be done is as follows:

https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-breadboard-wiring-ky40-rotary-encoder-esp32-schematic.png?width=1150 1.4x, https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-breadboard-wiring-ky40-rotary-encoder-esp32-schematic.png?width=1381 1.7x" alt="ky40 rotary encoder circuit diagram esp32 breadboard" width="828" height="523" style="box-sizing: border-box; border-style: none; height: auto; max-width: 100%;" loading="lazy" />

Electronic circuit to be replicated

And here is an example of breadboard mounting:

https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-ky40-rotary-encoder-breadboard-wiring-example-esp32.jpg?width=1030 1.5x, https://cdn.shopify.com/s/files/1/0609/6011/2892/files/doc-ky40-rotary-encoder-breadboard-wiring-example-esp32.jpg?width=1374 2.0x" alt="breadboard schematic rotary encoder" width="687" height="494" style="box-sizing: border-box; border-style: none; height: auto; max-width: 100%; margin-bottom: 0px;" loading="lazy" />

Get the angular position of the KY-040 rotary encoder in Arduino code

Incremental encoders are used to measure the angular position in degrees based on the number of increments made by the user. Instead of providing an exact angular position, this type of encoder returns the number of increments done. To get the angle, the value of the increment must be determined in the program.

Finding the amount of steps an encoder has made is possible through various methods. It is best to use a reliable way to get steps without blocking the program. A basic approach where a loop looks for logical signals received from the encoder carries the risk of missing steps if the encoder is rotated fast.


Programs can sometimes struggle with tasks and count in the wrong direction. (A traditional bug)

Many code sources are available online if you want to use rotary encoders. However, not all of them are the same! The best choice is to trigger hardware interrupts when a logical level change is detected. These interrupts are independent of the CPU and won’t stop the code from running.


The ESP32 can attach an interrupt to any output pins, which is impossible when using an Arduino, as only a few pins can have interrupts.



name: esphome-web-747aa4
friendly_name: ESPHome1

board: esp32dev
type: arduino

# Enable logging

# Enable Home Assistant API...Uncomment these three lines if you want ESP32 data to also go to a homeassistant server.
# encryption:
# key: "fEt5mzpehw423nU7JFGYhGIUiaHmuwzW4h85drE/puc="


#This is the myServer 6 IP address


ssid: !secret wifi_ssid
password: !secret wifi_password

# Enable fallback hotspot (captive portal) in case wifi connection fails
ssid: "LiHome5"
password: "D6A6D6D6A6"

# Example configuration entry
- platform: rotary_encoder
name: "Rotary Encoder"
pin_a: 22
pin_b: 23
resolution: 1
min_value: 0
id: rotary
- mqtt.publish:
# topic: N/${vrm_id}/test
topic: myserver/command
payload: !lambda |-
char buf[128];
sprintf(buf, "setvariable|sensor_inclinebench_state~%.0f", id(rotary).state);
return buf;
# return esphome::to_string(id(rotary).state);