Giter Club home page Giter Club logo

Comments (4)

pkmnct avatar pkmnct commented on June 17, 2024

I do need to get some example configs added to the repository.

As for your posted configuration, it looks like you are passing the serial path instead of the device name to the device key. If you need to specify a path, it should go in the devices key at the root level of the group, under the serial device for which it will control (see the "Sharp" device in the serial array below). You will then use that device's name key when referencing the device for the command.

Here is an example config for a Sharp TV with serial control (without RemoteKey configuration):

{
  "groups": [
    {
      "name": "Sharp Television",
      "devices": {
        "serial": [
          {
            "name": "Sharp",
            "path": "/dev/ttyUSB0",
            "getStatus": {
              "power": {
                "command": "POWR????\r",
                "onResponse": "1",
                "offResponse": "0"
              },
              "input": {
                "command": "IAVD?   \r"
              },
              "mute": {
                "command": "MUTE????\r",
                "onResponse": "0001",
                "offResponse": "0002"
              }
            }
          }
        ]
      },
      "power": {
        "on": {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["POWR1   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ]
        },
        "off": {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["POWR0   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ]
        }
      },
      "speaker": {
        "mute_on": {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["MUTE1   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ]
        },
        "mute_off": {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["MUTE2   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ]
        }
      },
      "inputs": [
        {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["IAVD1   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ],
          "name": "Composite",
          "type": 4,
          "getStatus": {
            "serial": [
              {
                "device": "Sharp",
                "response": "0001"
              }
            ]
          }
        },
        {
          "commands": [
            {
              "serial": [
                {
                  "commands": ["IAVD5   \r"],
                  "device": "Sharp"
                }
              ]
            }
          ],
          "name": "Chromecast",
          "type": 10,
          "getStatus": {
            "serial": [
              {
                "device": "Sharp",
                "response": "0005"
              }
            ]
          }
        }
      ],
      "manufacturer": "Sharp",
      "model": "LC-32SB28UT"
    }
  ],
  "platform": "TelevisionUniversalControl"
}

It does look like I told you the wrong escaped character for a carriage return, my device expects a \r rather than a \n.

You can enable debug mode under the Homebridge Settings (or start homebridge with -D) to get debugging output.

from homebridge-television-universal-control.

th3dogcow avatar th3dogcow commented on June 17, 2024

I also have a sharp tv, and this looks like what I have been trying to achieve. However, is it possible to send the serial commands over LAN instead of connecting the TV directly to the Pi?

I know the tv accepts commands via LAN as I have manually tested it via telnet, and it is also how the remote app from sharp works. What would I have to set the path to?

I appreciate your work. Thank you in advance.

from homebridge-television-universal-control.

pkmnct avatar pkmnct commented on June 17, 2024

I also have a sharp tv, and this looks like what I have been trying to achieve. However, is it possible to send the serial commands over LAN instead of connecting the TV directly to the Pi?

I know the tv accepts commands via LAN as I have manually tested it via telnet, and it is also how the remote app from sharp works. What would I have to set the path to?

I appreciate your work. Thank you in advance.

This should be possible, yes, however I do not have a television with such support to test/debug with. I have a separate homebridge plugin, specifically for Sharp TV's, where I started to explore this support. Unfortunately, even with a volunteer to test things, development was not straightforward without the device to test against.

from homebridge-television-universal-control.

th3dogcow avatar th3dogcow commented on June 17, 2024

I also have a sharp tv, and this looks like what I have been trying to achieve. However, is it possible to send the serial commands over LAN instead of connecting the TV directly to the Pi?

I know the tv accepts commands via LAN as I have manually tested it via telnet, and it is also how the remote app from sharp works. What would I have to set the path to?

I appreciate your work. Thank you in advance.

This should be possible, yes, however I do not have a television with such support to test/debug with. I have a separate homebridge plugin, specifically for Sharp TV's, where I started to explore this support. Unfortunately, even with a volunteer to test things, development was not straightforward without the device to test against.

Thank you for your kind reply. I understand. I came across the codes for the serial commands online and was manually testing them. They were hit and miss, depending on the model I guess. I did love the idea that you could set a specific value for the volume, whereas using an IR blaster, you can't. That's what I was hoping to achieve.

I know it is a lot to ask but would it be possible for you to point me in the right direction on how to emulate a serial port over LAN? I found something called socat which seemed to be maybe what I needed.

I am not completely code illiterate, merely a decade out of practice haha. If I could help advance your other project I would be interested.

from homebridge-television-universal-control.

Related Issues (6)

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.