This is a project created by @yuridoggy and @OmanTheHuman1 on twitter, made to control a specific brand of 433 MHz shock collar wirelessly.
This project uses the arduino collar library made by CrashOverride85, for it's "type 1" collars.
The collar meant for use with this project is the CaiXianLin collar, sold on Aliexpress.
- This is the same collar used by Pishock and Openshock, so it is compatible with these projects.
This project takes heavy inspiration from PiShock and OpenShock, although uses none of their resources, and does not require an ESP32, instead requiring a computer with an internet connection and an arduino.
There are two components to the shock controller, being the transmitter, and a digital interface. There are two selections of digital interface, and only one can be used at a time.
- Arduino of any kind, this project was tested on an Arduino Nano, which can be found for cheap on Aliexpress.
- 433 MHz Transmitter, found on Aliexpress, or Amazon
- (Optional) Female to Female Cable connectors, if you don't have a soldering iron.
- This will be using the Arduino Nano as an example, as that is what this project is built on. This should be easily changed for any other arduinos as long as the pins line up.
First, make sure everything is unplugged until you are sure everything is right. Do NOT work on this while the arduino is plugged in.
Connect power to the transmitter. This will be from black to black, and red to red in this picture (the color of the wire doesn't matter, just there for clarity).
Each pin is labeled on the Arduino and Transmitter, Connect GND to GND, and 5V to VCC
This can be done with your cable connectors, or with wires and solder.
Connect the transmitter's output to the Arduino. In this picture it is from yellow to yellow.
Connect the pin labeled D2 on the Arduino to the unlabeled remaining pin on the transmitter.

And you're done! From here, just plug in the Arduino into the computer.
Now that you've built the transmitter, you need to put some code on it for it to send signals to your shock collar.
- Download the Arduino IDE
- Open
shock_transmitter.inoin theshock_transmitterfolder, and run it. Upload it to the correct COM port, which can be done in the top left. This can be found by unplugging and replugging in your Arduino, to see which port it is using. You will have to select the correct model of Arduino that you are using in the top left as well.
From here, you have a selection of two interfaces. One is a self-hosted discord bot, allowing your shock collar to be controlled through a discord bot of your own making. The other is a self-hosted website, which will require a VPN (like ZeroTier), or some other way of having somebody enter your network.
To set up the discord bot, first you'll need to download a few things.
You will need to have done everything under Transmitter before doing this.
- Python needs to be installed to run the bot. Go to their website, and install the latest version if you don't already have Python installed.
- Package Installer for Python, or pip, is required to install some dependencies. In your command terminal (Which can be opened with Windows + R, then typing cmd), paste in
python -m ensurepip --upgradeand let it run.
-
Download this repository and unzip it. Go into the
ShockBotfolder, then thediscord_botfolder, and create a file named.env- Open up the Discord Developer Portal, and sign into your account. From there, click "New Application. Give it any name you want, and click Create
- From there, go to the
Installationtab, and enable User Install if it is not enabled already. - Then, go to the Bot tab, and click
Reset Token. Copy the new token it displays. - Go back to the
.envfile in thediscord_botfolder, and write the linebot_token=""and paste the token between the quotation marks.
-
Next, open
config.jsonin the same folder.- Open discord, and get your User ID.
- This can be done by going to your settings, then advanced, and turning on Developer Mode.
- From there, leave the menu, right click your name, and click
Copy User ID.
- Paste your User ID in place of the
0next to"user"inconfig.json
- Open discord, and get your User ID.
-
Go back to the
Developer Portaland open up your bot. Go to theBottab again, and scroll down until you seePrivileged Gateway Intents. Turn on Presence Intent, Server Members Intent, and Message Content Intent. -
Head to the
OAuth2tab now, and click onBotunderScopes, then underBot Permissions, just clickAdministrator.- If you want to limit the bot, you can enable only
View Channels, andSend Messages[UNTESTED]
- If you want to limit the bot, you can enable only
-
Go to the
Installationtab, and copy the Install Link, and paste it into your browser. From there, you can choose to add it to a server or your account. This is recommended for server use, and needs to be added to a server before it can be used for an account.- For server usage, add it to a server.
- Otherwise, add it to your own account. You will have to manually whitelist users under
data/whitelist.jsonin thediscord_botfolder, by copying the User ID of those you want to add, and pasting them in there with commas in between. You can still whitelist yourself with the/whitelistcommand demonstrated later.
-
Now, run the
ports.pyfile underdiscord_bot/setup. Now, plug in your Transmitter (or unplug it). Whichever port is now newly there (or not there), replace the port next to"port"inconfig.jsonwith that port. If you unplugged your transmitter, plug it back in. -
Run the
install_reqs.cmdfile indiscord_bot/setup. -
From here, you will just need to run the
main.pyfile in theShockBotfolder, and the bot will be running!
If you want the bot to run when you turn on or restart your computer, run the startup.bat file in discord_bot/setup.
If this doesn't work, press Windows + R and type in shell:startup. This will take you to the startup folder. Create a shortcut to the main.pyw file in discord_bot, and move that into the startup folder.
Every command the bot has is fairly self explanatory, and the parameters are listed when using the slash command. To use the bot, type /, then the name of the command.
- Reloads the bot, usually fixes any small errors.
- Whitelists a user, allowing them to shock, vibrate, or beep the shock collar.
- Unwhitelists a user, stopping them from shocking, vibrating, or beeping the shock collar.
- Shocks the wearer at a strength of
[POWER]for[DURATION], in tenth's of a second, where a duration of 10 is 1 second.
- Vibrates the collar at a strength of
[POWER]for[DURATION], in tenth's of a second, where a duration of 10 is 1 second.
- Beeps the collar at a strength of
[POWER]for[DURATION], in tenth's of a second, where a duration of 10 is 1 second.
- Used to pair the collar during pairing
- Stops any command being done to the collar, used to cancel commands or for emergencies.
- To pair the discord bot (when it is running) to the collar, hold down the power button on the collar until the light starts blinking. Then run the Pair command, which should beep the collar.

