GithubHelp home page GithubHelp logo

lucavb / homebridge-esphome-ts Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 16.0 791 KB

This plugin integrates your esphome devices into HomeKit!

License: GNU General Public License v3.0

TypeScript 100.00%
esphome homebridge homebridge-plugin typescript

homebridge-esphome-ts's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar fra-iesus avatar lucavb avatar vladimir-kotikov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-esphome-ts's Issues

Duplicate Homebridge Plugin on NPM

As I'm setting up a new Homebridge instance, I realized that there's a secondary plugin with the exact name. However, the second one also references this GitHub repo as its home page even though it has a different code being distributed. Description and other details are all copied from the original plugin but the code size is around 6MB instead of 30kB.

Original: https://www.npmjs.com/package/homebridge-esphome-ts
Duplicate: https://www.npmjs.com/package/@seiry/homebridge-esphome-ts

Error trying to start

Does this plugin require a specific node version?

I am using version: v8.9.4

Homebridge throws an error when trying to start:

(node:19241) Warning: N-API is an experimental feature and could change at any time.
[2021-12-26 08:02:40] Homebridge is running on port 51826.
[2021-12-26 08:02:40] [esphome] HAP Device discovered esp32
/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/util/reportUnhandledError.js:13
throw err;
^

TypeError: Invalid data, chunk must be a string or buffer, not object
at Socket.write (net.js:701:11)
at Observable.rxjs_1.Observable [as _subscribe] (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/socket.js:52:29)
at Observable._trySubscribe (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/Observable.js:71:25)
at Observable.subscribe (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/Observable.js:36:30)
at source.subscribe.OperatorSubscriber_1.OperatorSubscriber.isComplete (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js:17:58)
at OperatorSubscriber._this._next (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
at OperatorSubscriber.Subscriber.next (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/Subscriber.js:71:18)
at /usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/operators/take.js:15:32
at OperatorSubscriber._this._next (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:28:21)
at OperatorSubscriber.Subscriber.next (/usr/lib/node_modules/homebridge-esphome-ts/node_modules/rxjs/dist/cjs/internal/Subscriber.js:71:18)
osmc@osmc:~$

Not working with Homebridge

I'm getting the following error in the Homebridge logs:

[10/1/2020, 06:33:45] [esphome] Proximity_Sensor must be a new accessory undefined
[10/1/2020, 06:33:45] [esphome] Proximity_Sensor could not be mapped to HomeKit. Please file an issue on Github.
[10/1/2020, 06:33:45] [esphome] {
  proximity_sensor: BinarySensorComponent {
    listEntity: {
      objectId: 'proximity_sensor',
      key: 2368962953,
      name: 'Proximity_Sensor',
      uniqueId: 'controllerbinary_sensorproximity_sensor'
    },
    commandInterface: { send: [Function: send] },
    commandInPipeline: BehaviorSubject {
      _isScalar: false,
      observers: [Array],
      closed: false,
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    subscriptions: Subscription {
      closed: false,
      _parentOrParents: null,
      _subscriptions: [Array]
    },
    'state$': Observable {
      _isScalar: false,
      source: [Observable],
      operator: [DoOperator]
    }
  }
} undefined

Homebridge config:

        {
            "devices": [
                {
                    "host": "controller.local"
                }
            ],
            "debug": true,
            "platform": "esphome"
        }

esphome yaml is:

esphome:
  name: controller
  platform: ESP32
  board: esp32dev

wifi:
  ssid: "foo"
  password: "bar"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Controller Fallback Hotspot"
    password: "qux"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

binary_sensor:
  - platform: gpio
    name: "Proximity_Sensor"
    pin:
      number: 25
      inverted: False
      mode: INPUT_PULLUP

Seems like Homebridge is connecting to the esphome API through homebridge-esphome-ts fine though:
[22:33:45][D][api.connection:604]: Client 'esphome-ts (192.168.86.216)' connected successfully!

The binary sensor logic in esphome also has been tested and works.

homebridge-esphome-ts version=1.0.1
Homebridge version=1.1.6
esphome version=1.15.2

Unable to add accessory: "must be a new accessory []"

Attempting to add my first ESPHome accessory to homebridge (v1.4.1) with homebridge-esphome-ts (v1.5.1).
Logs show the plugin connects to the device, however no switch device is added to HomeKit.

ESPHome Device Log

[21:46:41][D][api:102]: Accepted ::FFFF:C0A8:3292
[21:46:41][D][api.connection:861]: esphome-ts (::FFFF:C0A8:3292): Connected successfully

ESPHome Device Config

esphome:
  name: seebee

esp32:
  board: lolin32
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

wifi:
  ssid: "xxxxx"
  password: "xxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "xxxxxxxx"
    password: "xxxxxxxx"

switch:
  - platform: gpio
    name: "StringLightSwitch"
    pin: 5
    restore_mode: ALWAYS_OFF


captive_portal:

Homebridge Plugin Config

{
    "devices": [
        {
            "host": "seebee.local",
            "port": 6053
        }
    ],
    "debug": true,
    "discover": true,
    "platform": "esphome"
}

Homebridge Log

[8/21/2022, 5:31:08 PM] [esphome] HAP Device discovered seebee
[8/21/2022, 5:31:08 PM] [esphome] Writing the raw data from your ESP Device to /tmp
[8/21/2022, 5:31:08 PM] [esphome]  must be a new accessory []
timeout

Plugin Debug Logs (at /tmp)

{"type":2,"payload":"CAEQBhoac2VlYmVlIChlc3Bob21lIHYyMDIyLjguMCkiBnNlZWJlZQ==","time":1661118401412}
{"type":4,"payload":"","time":1661118401434}
{"type":10,"payload":"EgZzZWViZWUaEUFDOjY3OkIyOjMzOkZGOkVDIggyMDIyLjguMCoVQXVnIDIxIDIwMjIsIDIxOjQyOjM2Mgdsb2xpbjMy","time":1661118401456}
{"type":17,"payload":"","time":1661118401491}
{"type":26,"payload":"","time":1661118401534}
{"type":19,"payload":"","time":1661118401625}
{"type":7,"payload":"","time":1661118461516}
{"type":7,"payload":"","time":1661118521547}
{"type":7,"payload":"","time":1661118581574}
{"type":7,"payload":"","time":1661118641595}
{"type":7,"payload":"","time":1661118701626}
{"type":7,"payload":"","time":1661118761648}

Support for API encryption

Hi, the standard ESP Home config is using API encryption for Home Assistant support. Is this supported as well? I only found info for password.

# Enable Home Assistant API
api:
  encryption:
    key: "qWHsO5CS0tz2Y4ZGYMicOAyFGIrWlu3wVHm8HTEIBms="

Not finding any accessories.

I have a ESP32-Wroom setup. And when I add it in the config. It discovers the esp, but does not fetch my switch or the 3 temperature measurements.

Any idea why ? The temps and switch works in homeassistant.io

Log from Homebridge : [4/23/2022, 1:42:36 PM] [esphome] HAP Device discovered pool

Homebridge code:

{
"devices": [
{
"host": "pool.local"
}
],
"debug": false,
"discover": true,
"platform": "esphome"

ESP Code:
dallas:

  • pin: 23
    update_interval: 5s

sensor:

  • platform: dallas
    address: 0xb93c4ff649d33528
    name: Pool Temperatur
  • platform: dallas
    address: 0x493c84f649a88928
    name: Tag Temperatur
  • platform: dallas
    address: 0x043cdcf649098f28
    name: Fremlob Temperatur

switch:

  • platform: gpio
    name: "Pumpe"
    id: pool
    pin:
    number: 22
    inverted: true
    mode: OUTPUT_OPEN_DRAIN

Mh-z19 and CO2 value

Hi, is it possible to add an mh-z19 and a CO2 sensor?

[2021-3-20 20:39:00] [esphome] MH-Z19 CO2 Value could not be mapped to HomeKit. Please file an issue on Github.
[2021-3-20 20:39:00] [esphome] MH-Z19 Temperature discovered and setup.

ESP8266+SHT31 temp+humidity sensor - temp is reading high...

Hello and thank you for spending some time on this plugin for home bridge!
I have a wemos D1 mini with an SHT31 temperature+humidity sensor that is working with a recent ESPHome build. The ESPHome config is here.

I am able to load homebridge-esphome-ts as a child bridge and have the QR code scanned into homekit, the temp and humidity appear in homekit, but the temperature sensor is reading at 160F, however the value returned in the web UI is 70.5F.
Here is the homebridge status output:

[2/23/2023, 9:47:28 PM] Registering platform 'homebridge-esphome-ts.esphome'
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] Loaded homebridge-esphome-ts v1.5.1 child bridge successfully
[2/23/2023, 9:47:28 PM] Loaded 0 cached accessories from cachedAccessories.0EA3119820E3.
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] starting esphome
[2/23/2023, 9:47:28 PM] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-esphome-ts) is running on port 43673.
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] Temperature discovered and setup.
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] Humidity discovered and setup.
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] Temperature discovered and setup.
[2/23/2023, 9:47:28 PM] [homebridge-esphome-ts] Humidity discovered and setup.
[2/23/2023, 9:49:43 PM] [Homebridge UI] Changes to config.json saved.
[2/23/2023, 9:49:49 PM] [homebridge-esphome-ts] Restarting child bridge...
[2/23/2023, 9:49:49 PM] Got SIGTERM, shutting down child bridge process...
[2/23/2023, 9:49:54 PM] [homebridge-esphome-ts] Child bridge process ended
[2/23/2023, 9:49:54 PM] [homebridge-esphome-ts] Process Ended. Code: 143, Signal: null
[2/23/2023, 9:50:01 PM] [homebridge-esphome-ts] Restarting Process...
[2/23/2023, 9:50:02 PM] [homebridge-esphome-ts] Launched child bridge with PID 10540
[2/23/2023, 9:50:03 PM] Registering platform 'homebridge-esphome-ts.esphome'
[2/23/2023, 9:50:03 PM] [homebridge-esphome-ts] Loaded homebridge-esphome-ts v1.5.1 child bridge successfully
[2/23/2023, 9:50:03 PM] Loaded 2 cached accessories from cachedAccessories.0EA3119820E3.
[2/23/2023, 9:50:03 PM] [homebridge-esphome-ts] starting esphome
[2/23/2023, 9:50:03 PM] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-esphome-ts) is running on port 43673.
[2/23/2023, 9:50:03 PM] [homebridge-esphome-ts] Temperature discovered and setup.
[2/23/2023, 9:50:03 PM] [homebridge-esphome-ts] Humidity discovered and setup.
[2/23/2023, 9:56:54 PM] [Homebridge UI] Changes to config.json saved.
[2/23/2023, 9:57:00 PM] [homebridge-esphome-ts] Restarting child bridge...
[2/23/2023, 9:57:00 PM] Got SIGTERM, shutting down child bridge process...
[2/23/2023, 9:57:05 PM] [homebridge-esphome-ts] Child bridge process ended
[2/23/2023, 9:57:05 PM] [homebridge-esphome-ts] Process Ended. Code: 143, Signal: null
[2/23/2023, 9:57:12 PM] [homebridge-esphome-ts] Restarting Process...
[2/23/2023, 9:57:13 PM] [homebridge-esphome-ts] Launched child bridge with PID 10551
[2/23/2023, 9:57:14 PM] Registering platform 'homebridge-esphome-ts.esphome'
[2/23/2023, 9:57:14 PM] [homebridge-esphome-ts] Loaded homebridge-esphome-ts v1.5.1 child bridge successfully
[2/23/2023, 9:57:14 PM] Loaded 2 cached accessories from cachedAccessories.0EA3119820E3.
[2/23/2023, 9:57:14 PM] [homebridge-esphome-ts] starting esphome
[2/23/2023, 9:57:14 PM] [homebridge-esphome-ts] cached accessory Temperature was added []
[2/23/2023, 9:57:14 PM] [homebridge-esphome-ts] cached accessory Humidity was added []
[2/23/2023, 9:57:14 PM] Homebridge v1.6.0 (HAP v0.11.0) (homebridge-esphome-ts) is running on port 43673.
[2/23/2023, 9:57:19 PM] [homebridge-esphome-ts] Writing the raw data from your ESP Device to /tmp
[2/23/2023, 9:57:19 PM] [homebridge-esphome-ts] Temperature discovered and setup.
[2/23/2023, 9:57:19 PM] [homebridge-esphome-ts] Humidity discovered and setup.
[2/23/2023, 9:57:19 PM] [homebridge-esphome-ts] {
  temperature: SensorComponent {
    listEntity: {
      objectId: 'temperature',
      key: 899752953,
      name: 'Temperature',
      uniqueId: 'sensor-th-0-kitchen-countersensortemperature',
      icon: '',
      unitOfMeasurement: '°F',
      accuracyDecimals: 1,
      forceUpdate: false,
      deviceClass: 'temperature'
    },
    commandInterface: { sendEspMessage: [Function: sendEspMessage] },
    state: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: [Object]
    },
    terminatePreviousStateSubscription: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    teardown: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    commandInPipeline: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    'state$': AnonymousSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      destination: [BehaviorSubject],
      source: [BehaviorSubject],
      operator: [Function (anonymous)]
    }
  },
  humidity: SensorComponent {
    listEntity: {
      objectId: 'humidity',
      key: 3577765598,
      name: 'Humidity',
      uniqueId: 'sensor-th-0-kitchen-countersensorhumidity',
      icon: '',
      unitOfMeasurement: '%',
      accuracyDecimals: 1,
      forceUpdate: false,
      deviceClass: 'humidity'
    },
    commandInterface: { sendEspMessage: [Function: sendEspMessage] },
    state: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: [Object]
    },
    terminatePreviousStateSubscription: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    teardown: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    commandInPipeline: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    'state$': AnonymousSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      destination: [BehaviorSubject],
      source: [BehaviorSubject],
      operator: [Function (anonymous)]
    }
  }
} []

Here is the contents of the /tmp/ file after enabling debug:

root@brick5:/tmp $ cat esphome-log-1677214639238-172.16.40.50.json
{"type":2,"payload":"CAEQBxowc2Vuc29yLXRoLTAta2l0Y2hlbi1jb3VudGVyIChlc3Bob21lIHYyMDIyLjEyLjMpIhtzZW5zb3ItdGgtMC1raXRjaGVuLWNvdW50ZXI=","time":1677214639282}
{"type":4,"payload":"","time":1677214639315}
{"type":10,"payload":"EhtzZW5zb3ItdGgtMC1raXRjaGVuLWNvdW50ZXIaEUU4OjlGOjZEOjkyOkE5OkYwIgkyMDIyLjEyLjMqFUZlYiAgNSAyMDIzLCAxNDo1OTowOTIHZDFfbWluaVBQYglFc3ByZXNzaWY=","time":1677214639337}
{"type":16,"payload":"Cgt0ZW1wZXJhdHVyZRX5I6E1GgtUZW1wZXJhdHVyZSIsc2Vuc29yLXRoLTAta2l0Y2hlbi1jb3VudGVyc2Vuc29ydGVtcGVyYXR1cmUyA8KwRjgBSgt0ZW1wZXJhdHVyZVAB","time":1677214639380}
{"type":16,"payload":"CghodW1pZGl0eRXeXkDVGghIdW1pZGl0eSIpc2Vuc29yLXRoLTAta2l0Y2hlbi1jb3VudGVyc2Vuc29yaHVtaWRpdHkyASU4AUoIaHVtaWRpdHlQAQ==","time":1677214639390}
{"type":25,"payload":"DfkjoTUV5VaNQg==","time":1677214639454}
{"type":25,"payload":"Dd5eQNUVv+u+QQ==","time":1677214639455}
{"type":19,"payload":"","time":1677214639479}
{"type":25,"payload":"DfkjoTUV93GNQg==","time":1677214651850}
{"type":25,"payload":"Dd5eQNUVP1y/QQ==","time":1677214651882}
{"type":25,"payload":"DfkjoTUVqWWNQg==","time":1677214666861}
{"type":25,"payload":"Dd5eQNUVfmi+QQ==","time":1677214666871}
{"type":25,"payload":"DfkjoTUVqWWNQg==","time":1677214681856}
{"type":25,"payload":"Dd5eQNUVn52+QQ==","time":1677214681876}
{"type":25,"payload":"DfkjoTUVST6NQg==","time":1677214696857}
{"type":25,"payload":"Dd5eQNUV/sW9QQ==","time":1677214696863}
{"type":7,"payload":"","time":1677214699403}
{"type":25,"payload":"DfkjoTUVhS+NQg==","time":1677214711866}
{"type":25,"payload":"Dd5eQNUVP5S+QQ==","time":1677214711915}
{"type":25,"payload":"DfkjoTUVhS+NQg==","time":1677214726850}
{"type":25,"payload":"Dd5eQNUVn+i+QQ==","time":1677214726864}
{"type":25,"payload":"DfkjoTUVNyONQg==","time":1677214741849}
{"type":25,"payload":"Dd5eQNUVn+i+QQ==","time":1677214741857}
{"type":25,"payload":"DfkjoTUV6RaNQg==","time":1677214756850}
{"type":25,"payload":"Dd5eQNUVHl++QQ==","time":1677214756863}
{"type":7,"payload":"","time":1677214759437}
{"type":25,"payload":"DfkjoTUVmwqNQg==","time":1677214771850}
{"type":25,"payload":"Dd5eQNUVP8a+QQ==","time":1677214771916}
{"type":25,"payload":"DfkjoTUVie+MQg==","time":1677214786853}
{"type":25,"payload":"Dd5eQNUVX/u+QQ==","time":1677214786867}
{"type":25,"payload":"DfkjoTUVie+MQg==","time":1677214801853}
{"type":25,"payload":"Dd5eQNUVnzO/QQ==","time":1677214801858}
{"type":25,"payload":"DfkjoTUVie+MQg==","time":1677214816856}
{"type":25,"payload":"Dd5eQNUVfxe/QQ==","time":1677214816858}
{"type":7,"payload":"","time":1677214819469}
{"type":25,"payload":"DfkjoTUVO+OMQg==","time":1677214831896}
{"type":25,"payload":"Dd5eQNUVwMy/QQ==","time":1677214831989}
{"type":25,"payload":"DfkjoTUV7daMQg==","time":1677214846859}
{"type":25,"payload":"Dd5eQNUVwOW/QQ==","time":1677214846862}
{"type":25,"payload":"DfkjoTUVja+MQg==","time":1677214861857}
{"type":25,"payload":"Dd5eQNUVoMm/QQ==","time":1677214861867}
{"type":25,"payload":"DfkjoTUVP6OMQg==","time":1677214876854}
{"type":25,"payload":"Dd5eQNUVoPu/QQ==","time":1677214876864}
{"type":7,"payload":"","time":1677214879492}
{"type":25,"payload":"DfkjoTUVLYiMQg==","time":1677214891849}
{"type":25,"payload":"Dd5eQNUVQKe/QQ==","time":1677214891905}
{"type":25,"payload":"DfkjoTUVGm2MQg==","time":1677214906880}
{"type":25,"payload":"Dd5eQNUVIIu/QQ==","time":1677214906885}
{"type":25,"payload":"DfkjoTUVflSMQg==","time":1677214921862}
{"type":25,"payload":"Dd5eQNUVQAvAQQ==","time":1677214921864}
{"type":25,"payload":"DfkjoTUVflSMQg==","time":1677214936854}
{"type":25,"payload":"Dd5eQNUV4J2/QQ==","time":1677214936858}
{"type":7,"payload":"","time":1677214939519}
{"type":25,"payload":"DfkjoTUVflSMQg==","time":1677214951874}
{"type":25,"payload":"Dd5eQNUVQAvAQQ==","time":1677214951922}
{"type":25,"payload":"DfkjoTUVMEiMQg==","time":1677214966861}
{"type":25,"payload":"Dd5eQNUVANO/QQ==","time":1677214966864}
{"type":25,"payload":"DfkjoTUVbDmMQg==","time":1677214981853}
{"type":25,"payload":"Dd5eQNUV4RTBQQ==","time":1677214981863}
{"type":25,"payload":"DfkjoTUVqCqMQg==","time":1677214996859}
{"type":25,"payload":"Dd5eQNUV4S3BQQ==","time":1677214996875}
{"type":7,"payload":"","time":1677214999554}
{"type":25,"payload":"DfkjoTUVbDmMQg==","time":1677215011859}
{"type":25,"payload":"Dd5eQNUVQrTBQQ==","time":1677215011917}
{"type":25,"payload":"DfkjoTUVMEiMQg==","time":1677215026864}
{"type":25,"payload":"Dd5eQNUVAnbCQQ==","time":1677215026868}
{"type":25,"payload":"DfkjoTUVWh6MQg==","time":1677215041872}
{"type":25,"payload":"Dd5eQNUVA/PCQQ==","time":1677215041875}
{"type":25,"payload":"DfkjoTUVqCqMQg==","time":1677215056866}
{"type":25,"payload":"Dd5eQNUVA/PCQQ==","time":1677215056881}
{"type":7,"payload":"","time":1677215059583}
{"type":25,"payload":"DfkjoTUVqCqMQg==","time":1677215071870}
{"type":25,"payload":"Dd5eQNUVQyvDQQ==","time":1677215071922}
{"type":25,"payload":"DfkjoTUVSAOMQg==","time":1677215086847}
{"type":25,"payload":"Dd5eQNUVI1rDQQ==","time":1677215086858}
{"type":25,"payload":"DfkjoTUVWh6MQg==","time":1677215101858}
{"type":25,"payload":"Dd5eQNUVQ0TDQQ==","time":1677215101865}
{"type":25,"payload":"DfkjoTUVWh6MQg==","time":1677215116853}
{"type":25,"payload":"Dd5eQNUVQ3bDQQ==","time":1677215116858}
{"type":7,"payload":"","time":1677215119613}
{"type":25,"payload":"DfkjoTUVbDmMQg==","time":1677215131970}
{"type":25,"payload":"Dd5eQNUVY0fDQQ==","time":1677215132020}
{"type":25,"payload":"DfkjoTUVqCqMQg==","time":1677215146854}
{"type":25,"payload":"Dd5eQNUVQyvDQQ==","time":1677215146864}
{"type":25,"payload":"DfkjoTUVbDmMQg==","time":1677215161859}
{"type":25,"payload":"Dd5eQNUVQ/nCQQ==","time":1677215161880}
{"type":25,"payload":"DfkjoTUVWh6MQg==","time":1677215176848}
{"type":25,"payload":"Dd5eQNUVQ3bDQQ==","time":1677215176854}
{"type":7,"payload":"","time":1677215179645}
{"type":25,"payload":"DfkjoTUVqCqMQg==","time":1677215191873}
{"type":25,"payload":"Dd5eQNUVY0fDQQ==","time":1677215191924}
{"type":25,"payload":"DfkjoTUVMEiMQg==","time":1677215206845}
{"type":25,"payload":"Dd5eQNUVg2PDQQ==","time":1677215206857}
{"type":25,"payload":"DfkjoTUVMEiMQg==","time":1677215221882}
{"type":25,"payload":"Dd5eQNUVpJjDQQ==","time":1677215221887}
{"type":25,"payload":"DfkjoTUVMEiMQg==","time":1677215236847}
{"type":25,"payload":"Dd5eQNUVo3/DQQ==","time":1677215236854}
{"type":7,"payload":"","time":1677215239675}
{"type":25,"payload":"DfkjoTUVflSMQg==","time":1677215251858}
{"type":25,"payload":"Dd5eQNUVozTDQQ==","time":1677215251932}
{"type":25,"payload":"DfkjoTUVzGCMQg==","time":1677215266852}
{"type":25,"payload":"Dd5eQNUVYxXDQQ==","time":1677215266858}
{"type":25,"payload":"DfkjoTUVGm2MQg==","time":1677215281849}
{"type":25,"payload":"Dd5eQNUVBNTDQQ==","time":1677215281857}
{"type":25,"payload":"DfkjoTUV3nuMQg==","time":1677215296862}
{"type":25,"payload":"Dd5eQNUVw1DDQQ==","time":1677215296869}
{"type":7,"payload":"","time":1677215299709}
{"type":25,"payload":"DfkjoTUVLYiMQg==","time":1677215311862}
{"type":25,"payload":"Dd5eQNUV5bHEQQ==","time":1677215311918}
{"type":25,"payload":"DfkjoTUV3nuMQg==","time":1677215326845}
{"type":25,"payload":"Dd5eQNUV5fzEQQ==","time":1677215326857}
{"type":25,"payload":"DfkjoTUVe5SMQg==","time":1677215341858}
{"type":25,"payload":"Dd5eQNUVZVTFQQ==","time":1677215341863}
{"type":25,"payload":"DfkjoTUVP6OMQg==","time":1677215356845}
{"type":25,"payload":"Dd5eQNUVZW3FQQ==","time":1677215356859}
{"type":7,"payload":"","time":1677215359747}
{"type":25,"payload":"DfkjoTUVja+MQg==","time":1677215371849}
{"type":25,"payload":"Dd5eQNUVRn3GQQ==","time":1677215371899}
{"type":25,"payload":"DfkjoTUV27uMQg==","time":1677215386849}
{"type":25,"payload":"Dd5eQNUVRn3GQQ==","time":1677215386863}
{"type":25,"payload":"DfkjoTUV27uMQg==","time":1677215401864}
{"type":25,"payload":"Dd5eQNUVRn3GQQ==","time":1677215401872}
{"type":25,"payload":"DfkjoTUV27uMQg==","time":1677215416844}
{"type":25,"payload":"Dd5eQNUV5zvHQQ==","time":1677215416852}
{"type":7,"payload":"","time":1677215419757}
{"type":25,"payload":"DfkjoTUVKciMQg==","time":1677215431862}
{"type":25,"payload":"Dd5eQNUVpozFQQ==","time":1677215431910}
{"type":25,"payload":"DfkjoTUV27uMQg==","time":1677215446847}
{"type":25,"payload":"Dd5eQNUVSKnHQQ==","time":1677215446850}
{"type":25,"payload":"DfkjoTUVO+OMQg==","time":1677215461852}
{"type":25,"payload":"Dd5eQNUVyADIQQ==","time":1677215461855}
{"type":25,"payload":"DfkjoTUV7daMQg==","time":1677215476842}
{"type":25,"payload":"Dd5eQNUVx6LGQQ==","time":1677215476854}
{"type":7,"payload":"","time":1677215479788}
{"type":25,"payload":"DfkjoTUVKciMQg==","time":1677215491910}
{"type":25,"payload":"Dd5eQNUV6bLIQQ==","time":1677215491959}
{"type":25,"payload":"DfkjoTUVO+OMQg==","time":1677215506851}
{"type":25,"payload":"Dd5eQNUVhh/GQQ==","time":1677215506855}
{"type":25,"payload":"DfkjoTUV1/uMQg==","time":1677215521844}
{"type":25,"payload":"Dd5eQNUV56XGQQ==","time":1677215521858}
{"type":25,"payload":"DfkjoTUV1/uMQg==","time":1677215536849}
{"type":25,"payload":"Dd5eQNUVhlHGQQ==","time":1677215536853}
{"type":7,"payload":"","time":1677215539804}
{"type":25,"payload":"DfkjoTUVmwqNQg==","time":1677215551874}
{"type":25,"payload":"Dd5eQNUVqRDJQQ==","time":1677215551937}
{"type":25,"payload":"DfkjoTUVmwqNQg==","time":1677215566843}
{"type":25,"payload":"Dd5eQNUVifTIQQ==","time":1677215566853}
{"type":25,"payload":"DfkjoTUVmwqNQg==","time":1677215581850}
{"type":25,"payload":"Dd5eQNUVUMTPQQ==","time":1677215581865}
{"type":25,"payload":"DfkjoTUV1/uMQg==","time":1677215596843}
{"type":25,"payload":"Dd5eQNUVkwPTQQ==","time":1677215596856}
{"type":7,"payload":"","time":1677215599840}
{"type":25,"payload":"DfkjoTUVNyONQg==","time":1677215611855}
{"type":25,"payload":"Dd5eQNUV7ATMQQ==","time":1677215611909}
{"type":25,"payload":"DfkjoTUVmwqNQg==","time":1677215626845}
{"type":25,"payload":"Dd5eQNUVCX7JQQ==","time":1677215626849}
{"type":25,"payload":"DfkjoTUV6RaNQg==","time":1677215641862}
{"type":25,"payload":"Dd5eQNUVCrDJQQ==","time":1677215641873}
{"type":25,"payload":"DfkjoTUVNyONQg==","time":1677215656852}
{"type":25,"payload":"Dd5eQNUVKxHLQQ==","time":1677215656855}
{"type":7,"payload":"","time":1677215659876}
root@brick5:/tmp $

Issue when switching on a lamp

I get the following issue in Homebridge's logs when I switch on a lamp in the Home.app:

[9/20/2020, 12:12:08 PM] Error: This callback function has already been called by someone else; it can only be called one time.
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:6:13
    at On.<anonymous> (/homebridge/node_modules/homebridge-esphome-ts/dist/homebridgeAccessories/switch.js:17:9)
    at On.emit (events.js:228:7)
    at On.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22)
    at On.Characteristic._this.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:652:12)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1461:24
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._this._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1303:10)
    at HAPServer.emit (events.js:223:5)
    at HAPServer.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22)```

1.4.0 to 1.5.0 upgrade problem

I upgraded, and had an issue that from the logs seemed to be about HAP/bonjour not being installed or working properly.....so i reverted to 1.4.0

Before i retry, post logs, etc is this something known ? If not, what debug would you like posted?

BTW i am genuinely asking the above, with no intended "tone"! This esphome plugin was a lifesaver for me, i tried let's say another one and it was harder to setup, did not work as well, and used REST not the native API. So thanks for providing this plugin :-)

RangeError: index out of range: 18 + 32 > 35

Using HomeBridge 1.3.2, I added just 1 device, using only the device IP address or name, and HomeBridge crashes with the below error.

Config:

        {
            "devices": [
                {
                    "host": "doorbell.local"
                }
            ],
            "debug": true,
            "platform": "esphome"
        }

Logs:

[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)
[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)
[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)
[3/6/2021, 2:15:05 PM] Got SIGTERM, shutting down Homebridge...
[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)
[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)
[3/6/2021, 2:15:05 PM] RangeError: index out of range: 18 + 32 > 35
    at indexOutOfRange (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:13:12)
    at Reader.skip (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:338:19)
    at Reader.skipType (/homebridge/node_modules/homebridge-esphome-ts/node_modules/protobufjs/src/reader.js:364:18)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/protobuf/api.js:1959:28)
    at Object.decode (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/client.js:10:20)
    at Object.stateParser (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/helpers.js:24:29)
    at MapSubscriber.project (/homebridge/node_modules/homebridge-esphome-ts/node_modules/esphome-ts/dist/api/espDevice.js:23:148)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:84:29)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at MapSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/map.ts:89:22)
    at MapSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at FilterSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/filter.ts:101:24)
    at FilterSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at SwitchMapSubscriber.notifyNext (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/operators/switchMap.ts:166:24)
    at SimpleInnerSubscriber._next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/innerSubscribe.ts:30:17)
    at SimpleInnerSubscriber.Subscriber.next (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Subscriber.ts:99:12)
    at Observable._subscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/util/subscribeToArray.ts:9:16)
    at Observable._trySubscribe (/homebridge/node_modules/homebridge-esphome-ts/node_modules/rxjs/src/internal/Observable.ts:238:19)

Device not added

Hi, I am trying to add a device with multiple attributes to Homebridge however none of them are shown and only two of them Megadesk Maximum Height & Megadesk Minimum Height are shown in the logs.

These are all the elements and I have included the logs in debug mode from esphome-ts below.

Thanks

Screenshot 2022-03-24 at 09 47 46

[3/24/2022, 9:40:30 AM] [esphome] Writing the raw data from your ESP Device to /tmp
[3/24/2022, 9:40:31 AM] [esphome] Megadesk Minimum Height must be a new accessory []
[3/24/2022, 9:40:31 AM] [esphome] Megadesk Minimum Height could not be mapped to HomeKit. Please file an issue on Github.
[3/24/2022, 9:40:31 AM] [esphome] Megadesk Maximum Height must be a new accessory []
[3/24/2022, 9:40:31 AM] [esphome] Megadesk Maximum Height could not be mapped to HomeKit. Please file an issue on Github.
[3/24/2022, 9:40:31 AM] [esphome] {
  megadesk_minimum_height: SensorComponent {
    listEntity: {
      objectId: 'megadesk_minimum_height',
      key: 2130458765,
      name: 'Megadesk Minimum Height',
      uniqueId: 'esphome-desksensormegadesk_minimum_height',
      icon: '',
      unitOfMeasurement: '',
      accuracyDecimals: 0,
      forceUpdate: false,
      deviceClass: ''
    },
    commandInterface: { sendEspMessage: [Function: sendEspMessage] },
    state: BehaviorSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: [Object]
    },
    terminatePreviousStateSubscription: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    teardown: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    commandInPipeline: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    'state$': AnonymousSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      destination: [BehaviorSubject],
      source: [BehaviorSubject],
      operator: [Function (anonymous)]
    }
  },
  megadesk_maximum_height: SensorComponent {
    listEntity: {
      objectId: 'megadesk_maximum_height',
      key: 370203815,
      name: 'Megadesk Maximum Height',
      uniqueId: 'esphome-desksensormegadesk_maximum_height',
      icon: '',
      unitOfMeasurement: '',
      accuracyDecimals: 0,
      forceUpdate: false,
      deviceClass: ''
    },
    commandInterface: { sendEspMessage: [Function: sendEspMessage] },
    state: BehaviorSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: [Object]
    },
    terminatePreviousStateSubscription: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    teardown: Subject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null
    },
    commandInPipeline: BehaviorSubject {
      closed: false,
      observers: [Array],
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    'state$': AnonymousSubject {
      closed: false,
      observers: [],
      isStopped: false,
      hasError: false,
      thrownError: null,
      destination: [BehaviorSubject],
      source: [BehaviorSubject],
      operator: [Function (anonymous)]
    }
  }
} []```

Add more device

Hello!!!
I have one wemos mini d1 and a node Mcu v3 conect to home assistance working normal, but in Hoobs only show one devide.
please can you help me with de code example using two or more devices

Homebridge crashes if device is unreachable

I've noticed that if one device running ESPhome is unreachable, maybe because is not power on, Homebridge won't start getting "Got SIGTERM, shutting down Homebridge...".
No error are present in log but with some tests I can confirm that the problem is for this reason.

The plugin don't working

Hi,

In the log i'm getting this message:
"The plugin "homebridge-esphome-ts" defines 'homebridge' and/or 'hap-nodejs' in their 'dependencies' section, meaning they carry an additional copy of homebridge and hap-nodejs. This not only wastes disk space, but also can cause major incompatibility issues and thus is considered bad practice. Please inform the developer to update their plugin!"

also, i get this error:
"Error: The requested platform 'esphome-ts' was not registered by any plugin.
at PluginManager.getPluginForPlatform (/usr/local/lib/node_modules/homebridge/src/pluginManager.ts:224:15)
at /usr/local/lib/node_modules/homebridge/src/server.ts:386:37
at Array.forEach ()
at Server.loadPlatforms (/usr/local/lib/node_modules/homebridge/src/server.ts:373:27)
at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:152:29)
at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)"

the config file is:
{
"platform": "esphome-ts",
"devices": [
{
"host": "quarto.local"
}
],
"debug": true
}

when i use the platform with "esphome" without the "-ts", the second error does't happen. But in both ways, the homebridge keeps restarting with the message: "Got SIGTERM, shutting down Homebridge..."

thanks for the help.

Multiple sensors

Hi,
I have 6 different temperature and humidity sensors connected to an esp32 running esphome:

esp32_ble_tracker:  
sensor:
  - platform: atc_mithermometer
    mac_address: "A4:C1:38:A1:18:C7"
    temperature:
      name: "Mija1 Temperature"
    humidity:
      name: "Mija1 Humidity"
    battery_level:
      name: "Mija1 Battery Level"    
  - platform: atc_mithermometer
    mac_address: "a4:c1:38:a3:45:84"
    temperature:
      name: "Mija2 Temperature"
    humidity:
      name: "Mija2 Humidity"
    battery_level:
      name: "Mija2 Battery Level"    
  - platform: atc_mithermometer
    mac_address: "a4:c1:38:ae:03:ed"
    temperature:
      name: "Mija3 Temperature"
    humidity:
      name: "Mija3 Humidity"
    battery_level:
      name: "Mija3 Battery Level"  
  - platform: atc_mithermometer
    mac_address: "a4:c1:38:e5:39:5b"
    temperature:
      name: "Mija4 Temperature"
    humidity:
      name: "Mija4 Humidity"
    battery_level:
      name: "Mija4 Battery Level"  
  - platform: atc_mithermometer
    mac_address: "a4:c1:38:ed:18:27"
    temperature:
      name: "Mija5 Temperature"
    humidity:
      name: "Mija5 Humidity"
    battery_level:
      name: "Mija5 Battery Level"  
  - platform: atc_mithermometer
    mac_address: "a4:c1:38:69:70:7b"
    temperature:
      name: "Mija6 Temperature"
    humidity:
      name: "Mija6 Humidity"
    battery_level:
      name: "Mija6 Battery Level"  

However, when i connected it through your plugin, only the first sensor shows up in homekit. ( i can see all 6 sensors in the esphome webui)

{ "devices": [ { "host": "esp32-ble-smartnode" } ], "discover": true, "platform": "esphome" }

Is there anything I'm missing?

thanks
Marcus

edit:
i enabled the debug mode, however it only shows the first sensor in the log:

image

Doesn't seem to reconnect if connection lost

If a device goes offline, homebridge doesn't seem to attempt to reconnect to it automatically and the sensor readings obviously go stale. If I restart homebridge after the sensor is back online, it reconnects fine and works normally.

Light Accessory is not registered to HomeBridge if ESPHome light has 'effects'

When using the latest Homebridge (v1.1.1) and a light configured in an ESPHome device, the light does not get registered as an accessory in HomeBridge if there are 'effects' configured.

from the HomeBridge log
[esphome] {} undefined

But from the ESPHome device log:
[D][api.connection:583]: Client 'esphome-ts (192.168.1.5)' connected successfully!

After removing the 'effects' configuration from the ESPHome YAML file the light is registered correctly.

Light effects documentation in ESPHome https://esphome.io/components/light/index.html#light-effects

Update Esphome after problem

Hello, I updated the esphome version from 1.16.2 to 1.17.2 and I updated their software with ota on the devices I made with esphome. I use dht22 for the temperature and humidity sensor, my humidity sensor was working until before the update, now it gives the following error. What can I do ?

"Humidity Sensor could not be mapped to HomeKit. Please file an issue on Github."

Illuminance Support

Just discovered this project and love the discovery feature.

It would be awesome if you could support Illuminance, as I'm using the Flora plant sensor and it is possible because home assistant already passes it through (so hopefully would be straight forward to support)

Here's an example of esphome config
sensor:

  • platform: xiaomi_hhccjcy01
    mac_address: 'xx:xx:xx:xx:xx'
    temperature:
    name: "Plant Temperature"
    moisture:
    name: "Plant Moisture"
    illuminance:
    name: "Plant Illuminance"
    conductivity:
    name: "Plant Soil Conductivity"

The device under the host [...].local could not be reached.

So I flashed my xiaomi bedside lamp 2 with ESPHome, and it's working great and as expected. This is my yaml file for the device. So yeah, currently no api password. I'll do this later.
After that, I started ESPHome with this docker-compose file:

version: '3'
services:
  esphome:
    container_name: esphome
    network_mode: host
    restart: always
    image: esphome/esphome:dev
    ports:
      - 6052:6052
    volumes:
      - ./esphome-docker:/config:rw
      - /etc/localtime:/etc/localtime:ro
    command: config/ dashboard
    environment:
      - PASSWORD=nope

I can flash the device over OTA and see the logfiles, so it's definitly connected with ESPHome:

esphome

After that, I installed homebridge-esphome-ts (v1.5.1) in homebridge. But all I get is this error in my log file:

[1/13/2022, 7:29:34 AM] [esphome] The device under the host bedside-lamp-bedroom.local could not be reached.
[...]

[1/13/2022, 7:31:24 AM] [esphome] Trying to reconnect now to device bedside-lamp-bedroom.local

This is my config file:

{
"platform": "esphome",
"devices": [
{
"host": "bedside-lamp-bedroom.local",
"port": 9001,
"retryAfter": 120000
}
],
"retryAfter": 60000
},

So ESPHome is telling me, that my bedside lamp has the name bedside-lamp-bedroom.local. Port 9001 is not working, same with 6053 (default api port) and 6052 (my docker container). The readme file is telling me

[...] and the default port number 6053 is also wired into the plugin.

which is the default api port for ESPHome. But like I said, I already tried this. Also tried completely without the port-section. Still the same error in my log file.

After adding the debug and discover flag to my config (both true) the content of my log file is now like this:

[1/13/2022, 2:23:23 PM] [esphome] {} []
[...]
wakeUntilAPIReady: try 10

homebridge-esphome-ts log file:

/homebridge # cat /tmp/esphome-log-1642080203610-192.168.178.49.json 
{"type":2,"payload":"CAEQBhosYmVkc2lkZS1sYW1wLWJlZHJvb20gKGVzcGhvbWUgdjIwMjIuMS4wLWRldik=","time":1642080203737}
{"type":4,"payload":"","time":1642080203756}
{"type":10,"payload":"EhRiZWRzaWRlLWxhbXAtYmVkcm9vbRoRNDA6MzE6M0M6M0I6RDM6QUQiDDIwMjIuMS4wLWRldioVSmFuIDEyIDIwMjIsIDIxOjM0OjQzMhNlc3AzMmRvaXQtZGV2a2l0LXYx","time":1642080203779}
{"type":1,"payload":"DAokYmVkc2lkZV9sYW1wX2JlZHJvb21fcHJlc2VuY2Vfc2Vuc29yFThQTBsaJEJlZHNpZGUgTGFtcCBCZWRyb29tIFByZXNlbmNlIFNlbnNvciJFYmVkc2lkZS1sYW1wLWJlZHJvb21iaW5hcnlfc2Vuc29yYmVkc2lkZV9sYW1wX2JlZHJvb21fcHJlc2VuY2Vfc2Vuc28=","time":1642080203834}
{"type":1,"payload":"DwogYmVkc2lkZV9sYW1wX2JlZHJvb21fcmdid3dfbGlnaHQVYhr+6xogQmVkc2lkZSBMYW1wIEJlZHJvb20gUkdCV1cgTGlnaHQiOWJlZHNpZGUtbGFtcC1iZWRyb29tbGlnaHRiZWRzaWRlX2xhbXBfYmVkcm9vbV9yZ2J3d19saWdodGALYCMoATABQAFNAAAZQ1UAABNEWgROb25lWgtTbG93IFJhbmRvbVoLRmFzdCBSYW5kbw==","time":1642080203850}
{"type":21,"payload":"DThQTBs=","time":1642080203868}
{"type":1,"payload":"EgofYmVkc2lkZV9sYW1wX2JlZHJvb21fbGlnaHRfbW9kZRWiApcFGh9CZWRzaWRlIExhbXAgQmVkcm9vbSBMaWdodCBNb2RlIj5iZWRzaWRlLWxhbXAtYmVkcm9vbXRleHRfc2Vuc29yYmVkc2lkZV9sYW1wX2JlZHJvb21fbGlnaHRfbW9k","time":1642080203886}
{"type":24,"payload":"DWIa/usd5IHdPlgLVQAAgD8lAACAPy0AAIA/NQAAgD89AACAP0UAAMhDZQAAgD9tAACAP0oETm9uZQ==","time":1642080203889}
{"type":19,"payload":"","time":1642080203915}
{"type":27,"payload":"DaIClwUSA29mZg==","time":1642080203922}
{"type":7,"payload":"","time":1642080263935}
{"type":7,"payload":"","time":1642080323968}
{"type":7,"payload":"","time":1642080384006}
{"type":7,"payload":"","time":1642080444033}

What am I missing here to get the plugin to work?

Esphome Ts Bridge [ ERROR ] Error loading plugin "@seiry/homebridge-esphome-ts"

i'm getting this error:
30/08/2023, 17:04:13 Esphome Ts Bridge [ ERROR ] Error loading plugin "@seiry/homebridge-esphome-ts"
30/08/2023, 17:04:14 Esphome Ts Bridge [ WARNING ] No plugins installed.
30/08/2023, 17:04:14 Esphome Ts Bridge Loading 1 platforms...
30/08/2023, 17:04:14 Esphome Ts Bridge Bridge is running on port 51936.

Any tips?
Thank you

Switch Only work with turn_on_action

switch:
  - platform: template
    name: RF Power Button
    turn_on_action:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '000101010101000101010111'
          protocol:
            pulse_length: 350
          repeat: 10
    turn_off_action:
      - remote_transmitter.transmit_rc_switch_raw:
          code: '000101010101000101010100'
          protocol:
            pulse_length: 350
          repeat: 10

That is the code I used for my ESP8266, but only the turn_on_action is send when I deactivate the switch.

Fan support

Can you add fan support so that it'll show as a fan in Apple Home app.
Thanks.

Server-side button state change not shown in Homekit

I have a momentary button I want to push for 4 seconds with Homebridge. My config is

switch:
  - platform: gpio
    pin: 4
    restore_mode: ALWAYS_OFF
    id: gate_buzzer
  - platform: template
    name: "Gate Buzzer"
    icon: "mdi:gate"
    assumed_state: true
    turn_on_action:
    - switch.turn_on: gate_buzzer
    - delay: 4000ms
    - switch.turn_off: gate_buzzer
    on_turn_off:
    - switch.template.publish:
        id: gate_buzzer
        state: false

Pushing the associated switch button in Homebridge does the right thing with the hardware attached to the ESP32 and it turns the Homebridge switch button state ON as expected.

4 seconds later the ESP32 echoes back that it published the button's state to OFF:

[19:55:01][D][switch:021]: 'Gate Buzzer' Turning ON.
[19:55:01][D][switch:021]: 'gate_buzzer' Turning ON.
[19:55:01][D][switch:045]: 'gate_buzzer': Sending state ON
[19:55:05][D][switch:025]: 'gate_buzzer' Turning OFF.
[19:55:05][D][switch:045]: 'gate_buzzer': Sending state OFF`

but the switch button in Homebridge is not updated (it remains ON). I have to manually reset the switch button state to OFF before I can use it again. I've tried a number of different options for publishing the state, including lambdas, but nothing seems to reset the Homebridge button state to match that of esphome.

Control Effects

Would it be possible to expose effects for lights that have them enabled? The setup is a little involved since you have to use an app like Eve or Home+ but right now it appears this plugin doesn't expose the available effects at all.

More of a question (RFID Reader)

Hi, my goal is to get a "smart RFID reader" that triger a automation that open my door lock and I think this plugin is the solution.
do you think it's possible?

Blacklist not working

I am getting the following items in the homebridge log:

[5/14/2020, 10:32:45 PM] [esphome] Bad Spiegel Licht Button discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Bad Spiegel Licht Relay discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] WC Spiegel Button discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] WC Spiegel Relay discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Luftentfeuchter Button discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Luftentfeuchter Strom discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Luftentfeuchter Current discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Luftentfeuchter Leistung discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Luftentfeuchter Relay discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Waschmaschine Button discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Waschmaschine Strom discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Waschmaschine Spannung discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Waschmaschine Leistung discovered and setup.
[5/14/2020, 10:32:45 PM] [esphome] Waschmaschine Relay discovered and setup.

I then try to blacklist the entries I don't need:

{
            "platform": "esphome",
            "devices": [
                {
                    "host": "badspiegellicht"
                },
                {
                    "host": "luftentfeuchter"
                },
                {
                    "host": "waschmaschine"
                },
                {
                    "host": "wc_esp"
                }
            ],
            "blacklist": [
                "Luftentfeuchter Current",
                "Luftentfeuchter Button",
                "Luftentfeuchter Strom",
                "Luftentfeuchter Leistung",
                "WC Spiegel Button",
                "Bad Spiegel Licht Button",
                "Waschmaschine Spannung",
                "Waschmaschine Button",
                "Waschmaschine Strom",
                "Waschmaschine Leistung"
            ]
        }

But they still appear in the Home App.

Lights debug as accessory undefined

Im currently using Homeassistant, but want to add homebridge.
Ive got about 35 lights to add, most are added fine. However some are not and debug throws accessory undefined.
Your assistance here would be greatly appreciated.

[1/9/2021, 5:30:30 PM] [esphome] panic must be a new accessory undefined
[1/9/2021, 5:30:30 PM] [esphome] panic could not be mapped to HomeKit. Please file an issue on Github.
[1/9/2021, 5:30:30 PM] [esphome] mainbedroom must be a new accessory undefined
[1/9/2021, 5:30:30 PM] [esphome] mainbedroom could not be mapped to HomeKit. Please file an issue on Github.
[1/9/2021, 5:30:30 PM] [esphome] upstairspattio must be a new accessory undefined
[1/9/2021, 5:30:30 PM] [esphome] upstairspattio could not be mapped to HomeKit. Please file an issue on Github.
[1/9/2021, 5:30:30 PM] [esphome]

{
  panic: BinarySensorComponent {
    listEntity: {
      objectId: 'panic',
      key: 3130232582,
      name: 'panic',
      uniqueId: 'mainbedroombinary_sensorpanic'
    },
    commandInterface: { send: [Function: send] },
    commandInPipeline: BehaviorSubject {
      _isScalar: false,
      observers: [Array],
      closed: false,
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    subscriptions: Subscription {
      closed: false,
      _parentOrParents: null,
      _subscriptions: [Array]
    },
    'state$': Observable {
      _isScalar: false,
      source: [Observable],
      operator: [DoOperator]
    },
    state: { key: 3130232582 }
  },
  mainbedroom: BinarySensorComponent {
    listEntity: {
      objectId: 'mainbedroom',
      key: 2819021838,
      name: 'mainbedroom',
      uniqueId: 'mainbedroombinary_sensormainbedroom'
    },
    commandInterface: { send: [Function: send] },
    commandInPipeline: BehaviorSubject {
      _isScalar: false,
      observers: [Array],
      closed: false,
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    subscriptions: Subscription {
      closed: false,
      _parentOrParents: null,
      _subscriptions: [Array]
    },
    'state$': Observable {
      _isScalar: false,
      source: [Observable],
      operator: [DoOperator]
    },
    state: { key: 2819021838 }
  },
  upstairspattio: BinarySensorComponent {
    listEntity: {
      objectId: 'upstairspattio',
      key: 2644448661,
      name: 'upstairspattio',
      uniqueId: 'mainbedroombinary_sensorupstairspattio'
    },
    commandInterface: { send: [Function: send] },
    commandInPipeline: BehaviorSubject {
      _isScalar: false,
      observers: [Array],
      closed: false,
      isStopped: false,
      hasError: false,
      thrownError: null,
      _value: false
    },
    subscriptions: Subscription {
      closed: false,
      _parentOrParents: null,
      _subscriptions: [Array]
    },
    'state$': Observable {
      _isScalar: false,
      source: [Observable],
      operator: [DoOperator]
    },
    state: { key: 2644448661 }
  }
} undefined
esphome:
  name: mainbedroom
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "Harveys Wi-Fi Network"
  password: "Damionos4016"
  ap:
    ssid: "GMainbedroom Fallback Hotspot"
    password: "omitted"
    
captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:

binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "panic"
    on_press:
      then:
        - light.toggle: panic
        
        
  - platform: gpio
    pin:
      number: GPIO9
      mode: INPUT_PULLUP
      inverted: True
    name: "mainbedroom"
    on_press:
      then:
        - light.toggle: mainbedroom
        
  - platform: gpio
    pin:
      number: GPIO10
      mode: INPUT_PULLUP
      inverted: True
    name: "upstairspattio"
    on_press:
      then:
        - light.toggle: upstairspattio
        

light:
  - platform: binary
    name: "panic"
    id: panic
    output: panic_relay

  - platform: binary
    name: "mainbedroom"
    id: mainbedroom
    output: mainbedroom_relay

  - platform: binary
    name: "upstairspattio"
    id: upstairspattio
    output: upstairspattio_relay
    
output:

  - platform: gpio
    id: panic_relay
    pin: GPIO12
  - platform: gpio
    id: mainbedroom_relay
    pin: GPIO05
  - platform: gpio
    id: upstairspattio_relay
    pin: GPIO04

Climate component

Hello!

I was using Home Assistant until now, and I'm trying to pass everything on Homebridge. The only thing that blocks me is my air conditioning, which works with a Wemos D1 mini and Esphome.

To be completely honest, it currently works thanks to a little miracle, because I don't understand much...
Currently I use this configuration: https://github.com/albetaCOM/esp-haier on Home Assistant.

Do you think I can use this plugin and help me configure it on Homebridge ?

This plugin is capable of operating a climate component ?

Merci

Alert when connection is lost

Hello, it would be good to know when the connection has been lost. Up to now, the last transmitted value is still displayed after a connection break. It then looks as if the sensor is still online, although it has gone offline. Testet with a DS18b20 sensor. Thanks.

esphome-ts can't start

Hi,
I want to use homebridge-esphome-ts to control esphome switch in homekit, but when install this plugin, homebridge can't start and report below error, could you help get what wrong for my config or setup?

[4/23/2020, 10:21:44 AM] TypeError: Cannot read property 'forEach' of undefined
at EsphomePlatform.onHomebridgeDidFinishLaunching (/homebridge/node_modules/homebridge-esphome-ts/dist/index.js:32:29)
at API. (/homebridge/node_modules/homebridge-esphome-ts/node_modules/homebridge-ts-helper/dist/index.js:21:18)
at API.emit (events.js:322:22)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:103:13)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:59:10)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)

config.json:
{
"platform": "esphome",
"device": [
{
"host": "light_bedroom.local",
}
]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.