{"id":18857432,"url":"https://github.com/denherrring/ng-mqtt","last_synced_at":"2026-02-07T04:30:17.320Z","repository":{"id":57107487,"uuid":"288256341","full_name":"DenHerrRing/ng-mqtt","owner":"DenHerrRing","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-18T09:03:15.000Z","size":1084,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-12-15T19:15:10.046Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DenHerrRing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-17T18:28:23.000Z","updated_at":"2020-08-18T08:59:32.000Z","dependencies_parsed_at":"2022-08-21T04:00:38.687Z","dependency_job_id":null,"html_url":"https://github.com/DenHerrRing/ng-mqtt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenHerrRing%2Fng-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenHerrRing%2Fng-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenHerrRing%2Fng-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DenHerrRing%2Fng-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DenHerrRing","download_url":"https://codeload.github.com/DenHerrRing/ng-mqtt/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231905993,"owners_count":18443910,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T04:06:20.460Z","updated_at":"2026-02-07T04:30:17.221Z","avatar_url":"https://github.com/DenHerrRing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ng-mqtt\nThis MQTT-Service/Wrapper is a library for Angular 10.\n\n## installation\n`npm i @denherrring/ng-mqtt --save`\n\n## Usage\n```\nimport { Observable } from 'rxjs';\n\nimport {\n  IMqttMessage,\n  MqttModule,\n  IMqttServiceOptions\n} from 'ngx-mqtt';\n\nexport const MQTT_SERVICE_OPTIONS: IMqttServiceOptions = {\n  hostname: 'localhost',\n  port: 9001,\n  path: '/mqtt'\n};\n\n@NgModule({\n  imports: [\n    ...\n    MqttModule.forRoot(MQTT_SERVICE_OPTIONS)\n  ]\n  ...\n})\n\nexport class AppModule { }\n\n@Component({\n  template: `\n    \u003ch1\u003e\u003c/h1\u003e\n  `\n})\nexport class ExampleComponent implements OnDestroy {\n  private subscription: Subscription;\n  public message: string;\n\n  constructor(private _mqttService: MqttService) {\n    this.subscription = this._mqttService.observe('my/topic').subscribe((message: IMqttMessage) =\u003e {\n      this.message = message.payload.toString();\n    });\n  }\n\n  public unsafePublish(topic: string, message: string): void {\n    this._mqttService.unsafePublish(topic, message, {qos: 1, retain: true});\n  }\n\n  public ngOnDestroy() {\n    this.subscription.unsubscribe();\n  }\n}\n```\n\n### Based on \nThis Project based on [ngx-mqtt](https://github.com/sclausen/ngx-mqtt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenherrring%2Fng-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenherrring%2Fng-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenherrring%2Fng-mqtt/lists"}