SmartIR icon indicating copy to clipboard operation
SmartIR copied to clipboard

[Feature request] Add support for irplus LAN spec (HTTP service)

Open duhow opened this issue 2 years ago • 3 comments

This request is to add support for HTTP endpoint with syntax provided by irplus LAN, very simple:

http://192.168.1.104:8080/?carrier=38000&code=9000+4500...
  • carrier: frequency to send the signal (defaults to 38000)
  • code: Raw signal separated by spaces without signs - note that + is the [ ] (space) in URL encoding.

Allow the user to provide a full URL with path, as there may be some device integrations that do not provide this service at the / path.

duhow avatar Apr 14 '22 18:04 duhow

Replace controller.py from rc branch and configure smart ir as follows (media player example):

smartir:

media_player:
  - platform: smartir
    name: Living room TV
    unique_id: living_room_tv
    device_code: 1000
    controller_data: '192.168.10.15:8080'

The json code file should look like this:

{
    "manufacturer": "Test",
    "supportedModels": [
      "Test"
    ],
    "supportedController": "irplusLAN",
    "commandsEncoding": "Raw",
    "commands": {
        "off": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "on": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "previousChannel": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "nextChannel": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "volumeDown": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "volumeUp": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "mute": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
        "sources": {
            "EXT1": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"},
            "EXT2": {"carier": 38000, "code": "9022 4498 572 1690 572 1690 572 1690 572 572 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 572 572 1690 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 1690 572 572 572 572 572 39702 9022 2262 572 1"}
        }
    }
}

vassilis-panos avatar Apr 15 '22 04:04 vassilis-panos

Do you have any feedback?

vassilis-panos avatar Apr 18 '22 13:04 vassilis-panos

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 13 '22 10:08 stale[bot]