Skip to content
A modern MQTT framework for .NET. CI is on GitLab
C# PowerShell
Branch: master
Clone or download
GeorgeHahn Merge branch 'bump-version' into 'master'
2.0.6

See merge request GeorgeHahn/Charlotte!6
Latest commit b9caa6c Aug 31, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Builds Jul 26, 2018
Charlotte.Examples API changes + connect on client creation Jul 29, 2018
Charlotte.Tests Fix tests Jul 29, 2018
Charlotte 2.0.6 Aug 31, 2018
nuget Attempt to fix nuspec Dec 8, 2014
.gitignore Ignore .ncrunchproject files Oct 16, 2014
.gitlab-ci.yml Tweak CI Jul 29, 2018
Charlotte.sln Builds Jul 26, 2018
README.md Update README.md Jul 29, 2018

README.md

Charlotte pipeline status NuGet

The Modern MQTT Framework

public class ProximitySensor
{
	public ProximitySensor(string broker)
	{
		var mqtt = new Charlotte(broker);

		mqtt.On["{room}/sensors/{sensor}"] = msg =>
		{
			Log("Data received from {0} (in {1}): {2}", msg.sensor, msg.room, msg.Message);
		};

		mqtt.On["sensors/bedroom/presence"] = async msg =>
		{
			if (msg.Message == "human present")
			{
				await mqtt.Publish("lights/bedroom", "on");
			}
		};
	}
You can’t perform that action at this time.