hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
552 stars 51 forks source link

homebridge-optoma-projector-telnet fails to start accessory #1846

Open davidjbradshaw opened 1 year ago

davidjbradshaw commented 1 year ago

Description This plugin connects to Optoma Projectors and allows HomeKit to turn them on and off

Expected behavoir Connect to projector and create device in HomeKit

Plugin name homebridge-optoma-projector-telnet

Please report the issue to the plugin developer https://github.com/simonrauch/homebridge-optoma-projector-telnet/issues/6

Version 1.0.7

Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version None

Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

If this is a custom install, what's your operating system? Raspberry PI OS-lite (64 bit) Bullseye

Post your config

{
    "accessories": [],
    "platforms": [
        {
            "platform": "homebridge-optoma-projector-telnet",
            "accessories": [
                {
                    "accessory": "OptomaProjectorTelnet",
                    "name": "Projector",
                    "address": "192.168.0.139",
                    "model": "UHZ65",
                    "projectorId": 1
                }
            ]
        }
    ]
}

Post your log You can get the log from the intercafe. This is in the Log section.


16/12/2022, 22:21:54hub is running on port 80
16/12/2022, 22:21:56Pi Hole starting
16/12/2022, 22:21:56Niko Home Control starting
16/12/2022, 22:21:57Homeconnect Bridge starting
16/12/2022, 22:21:58Optoma Projector Telnet Bridge starting
16/12/2022, 22:21:59Pi HoleLoaded plugin 'homebridge-pihole'
16/12/2022, 22:22:00Pi HoleLoading 2 accessories...
16/12/2022, 22:22:00Pi HoleBridge is running on port 51826.
16/12/2022, 22:22:03Optoma Projector Telnet BridgeLoaded plugin 'homebridge-optoma-projector-telnet'
16/12/2022, 22:22:03Optoma Projector Telnet BridgeLoading 1 platforms...
16/12/2022, 22:22:03Optoma Projector Telnet BridgeBridge is running on port 51856.

Additional context I added extra logging to this plugin, but as far as I can tell it never calls the constructor.

davidjbradshaw commented 1 year ago

I seem to have made some progress by directly editing /var/lib/hoobs/optomaprojectortelnetbridge/config.json

I had to do this using vi, when I try and do it in Hoobs it just hangs on the save.

Edited Version

{
  "bridge": {
    "name": "Optoma Projector Telnet Bridge",
    "pin": "xxx-xx-xxx",
    "username": "C7:91:9F:39:84:5C",
    "advertiser": "bonjour-hap"
  },
  "accessories":[
    {
        "accessory": "OptomaProjectorTelnet",
        "name": "Projector",
        "address": "192.168.0.139",
        "model": "UHZ65",
        "projectorId": 1
    }
  ]
}

Original Version

{
  "bridge": {
    "name": "Optoma Projector Telnet Bridge",
    "pin": "xxx-xx-xxx",
    "username": "C7:91:9F:39:84:5C",
    "advertiser": "bonjour-hap"
  },
  "accessories": [],
  "platforms": [
    {
      "platform": "homebridge-optoma-projector-telnet",
      "accessories": [
        {
          "accessory": "OptomaProjectorTelnet",
          "name": "Projector",
          "address": "192.168.0.139",
          "model": "UHZ65",
          "projectorId": 1
        }
      ]
    }
  ]
}
davidjbradshaw commented 1 year ago

It would be really good to understand why the above change to the config makes a difference, I noticed your Pi-Hole template also moves accessories up a level and removes platforms. But the web interface seems to get upset when I try and do this directly in Hoobs.