CShocker 1.3.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package CShocker --version 1.3.2                
NuGet\Install-Package CShocker -Version 1.3.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CShocker" Version="1.3.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CShocker --version 1.3.2                
#r "nuget: CShocker, 1.3.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CShocker as a Cake Addin
#addin nuget:?package=CShocker&version=1.3.2

// Install CShocker as a Cake Tool
#tool nuget:?package=CShocker&version=1.3.2                

Library to interact with Shock-Collars that are remotely controllable via ESP32-Boards.

GitHub License NuGet Version

Usage

public static void Main(string[] args){
    List<string> shockerIds = new();
    IntensityRange intensityRange = new IntensityRange(30, 50);
    DurationRange durationRange = new DurationRange(1000, 2000);
    string apiKey = ":)";
    OpenShockHttp openShockHttp = new OpenShockHttp(shockerIds, intensityRange, durationRange, apiKey);
    openShockHttp.ShockerIds.AddRange(openShockHttp.GetShockers());
    
    string username = "username";
    string shareCode = "sharecode";
    PiShockHttp piShockHttp = new PiShockHttp(shockerIds, intensityRange, durationRange, apiKey, username, shareCode, apiUri);
    
    ControlAction action = ControlAction.Shock;
    openShockHttp.Control(action, shockerIds.First(), 20, 1000);
    piShockHttp.Control(action);
}

Shocker.Control

Control(ControlAction action, string? shockerId = null, int? intensity = null, int? duration = null)

If shockerId is null, all IDs will be used. If intensity or duration are null, a random value within the configured range will be used.

ControlAction

From here

Variables

ApiKey

  • For OpenShock (HTTP) get token here
  • For PiShock (HTTP) get information here

ShockerIds

List of Shocker-Ids, comma seperated.

[ "ID-1-asdasd", "ID-2-fghfgh" ]

OpenShockHttp also can retrieve IDs automatically.

Intensity Range

in percent

0-100

Duration Range

in ms

  • 0-30000 OpenShock
  • 0-15000 PiShock

Username (PiShockHttp only)

For PiShock (HTTP) get information here

Sharecode (PiShockHttp only)

For PiShock (HTTP) get information here

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.5.1 75 11/3/2024
2.5.0 66 11/3/2024
2.4.2 80 11/2/2024 2.4.2 is deprecated because it has critical bugs.
2.4.1 143 2/15/2024 2.4.1 is deprecated because it has critical bugs.
2.4.0 131 2/12/2024 2.4.0 is deprecated because it has critical bugs.
2.3.1 141 2/11/2024 2.3.1 is deprecated because it has critical bugs.
2.3.0 129 2/11/2024 2.3.0 is deprecated because it has critical bugs.
2.2.0 137 2/4/2024 2.2.0 is deprecated because it has critical bugs.
2.1.1 125 2/4/2024 2.1.1 is deprecated because it has critical bugs.
2.1.0 135 2/1/2024 2.1.0 is deprecated because it has critical bugs.
2.0.2 142 1/29/2024 2.0.2 is deprecated because it has critical bugs.
2.0.0 116 1/29/2024 2.0.0 is deprecated because it has critical bugs.
1.3.8 135 1/28/2024 1.3.8 is deprecated because it has critical bugs.
1.3.7 142 1/28/2024 1.3.7 is deprecated because it has critical bugs.
1.3.6 130 1/20/2024 1.3.6 is deprecated because it has critical bugs.
1.3.4 121 1/20/2024 1.3.4 is deprecated because it has critical bugs.
1.3.2 120 1/20/2024 1.3.2 is deprecated because it has critical bugs.
1.3.1 118 1/20/2024 1.3.1 is deprecated because it has critical bugs.
1.3.0 123 1/20/2024 1.3.0 is deprecated because it has critical bugs.
1.2.5 139 1/19/2024 1.2.5 is deprecated because it has critical bugs.
1.2.4 116 1/19/2024 1.2.4 is deprecated because it has critical bugs.
1.2.3 146 1/19/2024 1.2.3 is deprecated because it has critical bugs.
1.2.2 120 1/19/2024 1.2.2 is deprecated because it has critical bugs.
1.2.0 130 1/19/2024 1.2.0 is deprecated because it has critical bugs.
1.1.11 144 1/17/2024 1.1.11 is deprecated because it has critical bugs.
1.1.10 145 1/17/2024 1.1.10 is deprecated because it has critical bugs.
1.1.9 146 1/17/2024 1.1.9 is deprecated because it has critical bugs.
1.1.8 134 1/17/2024 1.1.8 is deprecated because it has critical bugs.
1.1.7 147 1/17/2024 1.1.7 is deprecated because it has critical bugs.
1.1.6 133 1/17/2024 1.1.6 is deprecated because it has critical bugs.
1.1.5 144 1/17/2024 1.1.5 is deprecated because it has critical bugs.
1.1.4 139 1/17/2024 1.1.4 is deprecated because it has critical bugs.
1.1.3 140 1/17/2024 1.1.3 is deprecated because it has critical bugs.
1.1.2 145 1/17/2024 1.1.2 is deprecated because it has critical bugs.
1.1.1 144 1/17/2024 1.1.1 is deprecated because it has critical bugs.
1.1.0 141 1/17/2024 1.1.0 is deprecated because it has critical bugs.
1.0.5 161 1/17/2024 1.0.5 is deprecated because it has critical bugs.
1.0.4 137 1/17/2024 1.0.4 is deprecated because it has critical bugs.
1.0.3 153 1/17/2024 1.0.3 is deprecated because it has critical bugs.
1.0.2 143 1/17/2024 1.0.2 is deprecated because it has critical bugs.
1.0.1 145 1/17/2024 1.0.1 is deprecated because it has critical bugs.
1.0.0 141 1/17/2024 1.0.0 is deprecated because it has critical bugs.