Fork of the excellent esp8266-react - https://github.com/rjwats/esp8266-react
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
648 B

  1. export enum MqttDisconnectReason {
  2. TCP_DISCONNECTED = 0,
  3. MQTT_UNACCEPTABLE_PROTOCOL_VERSION = 1,
  4. MQTT_IDENTIFIER_REJECTED = 2,
  5. MQTT_SERVER_UNAVAILABLE = 3,
  6. MQTT_MALFORMED_CREDENTIALS = 4,
  7. MQTT_NOT_AUTHORIZED = 5,
  8. ESP8266_NOT_ENOUGH_SPACE = 6,
  9. TLS_BAD_FINGERPRINT = 7
  10. }
  11. export interface MqttStatus {
  12. enabled: boolean;
  13. connected: boolean;
  14. client_id: string;
  15. disconnect_reason: MqttDisconnectReason;
  16. }
  17. export interface MqttSettings {
  18. enabled: boolean;
  19. host: string;
  20. port: number;
  21. username: string;
  22. password: string;
  23. client_id: string;
  24. keep_alive: number;
  25. clean_session: boolean;
  26. max_topic_length: number;
  27. }