Code Monkey home page Code Monkey logo

homebridge-onkyo-avr's People

Contributors

gw-wiscon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-onkyo-avr's Issues

TX-NR646

Hi,

Does this support the 646?

Best regards,
Patrick

Volume

How to control volume with Siri?

Straight after installing

I tried running the homebridge after installing and when it tried to instalize the plugin I received this error
"/usr/local/lib/node_modules/homebridge/lib/api.js:47
throw new Error("The requested accessory '" + name + "' was not registered by any plugin.");
^

Error: The requested accessory 'OnkyoAVR' was not registered by any plugin.
at API.accessory (/usr/local/lib/node_modules/homebridge/lib/api.js:47:13)
at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/lib/server.js:164:42)
at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:36:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:23:16)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3
"

error installing

how to solve this problem?

npm ERR! code 128
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/tillbaks/node-eiscp.git /root/.npm/_cacache/tmp/git-clone-e190aad7
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-e190aad7': Toegang geweigerd
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2017-12-09T20_34_07_777Z-debug.log

many thanx !

Change port

it keep looking for port 60128 but my AVRs port is 8102. How do i change it?

Using TX-NR545

Hey thanks for the plugin.

I am trying to use it with a TX-NR545. I have only changed the ip and the name. It finds but the switch on/off doesn't work. Can I do anything to make it work.

Thanks

[My Onkyo] eventError: ERROR (arg_not_in_range) Command volume=19 is not available on this model

Hello,

I own an Onkyo TX-NR53 amplifier and I would use homebridge-onkyo-avr. So I added this into the config.json file

    "accessories": [
      {
        "accessory": "OnkyoAVR",
        "name": "My Onkyo",
        "ip_address": "192.168.1.90",
        "model" : "TX-NR535",
        "poll_status_interval": "900"
      },

Testing

But it is not working. Can you help me please?

[6/28/2016, 9:56:14 PM] Loading 5 accessories...
[6/28/2016, 9:56:14 PM] [My Onkyo] Initializing OnkyoAVR accessory...
[6/28/2016, 9:56:14 PM] [My Onkyo] start long poller..
[6/28/2016, 9:56:14 PM] [Thermostat Demo] Initializing Thermostat accessory...
[6/28/2016, 9:56:14 PM] [Thermostat Demo] Thermostat Demo http://192.168.1.46
[6/28/2016, 9:56:14 PM] [Lumiere bureau] Initializing HttpJeedom accessory...
[6/28/2016, 9:56:14 PM] [Lumiere bureau] Defining a switch module
[6/28/2016, 9:56:14 PM] [Temperature jardin] Initializing HttpJeedom accessory...
[6/28/2016, 9:56:14 PM] [Humiditee sous-sol] Initializing HttpJeedom accessory...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

    ââââââââââââââ
    â 031-45-156 â
    ââââââââââââââ

[6/28/2016, 9:56:14 PM] Homebridge is running on port 51826.
[6/28/2016, 9:56:14 PM] [My Onkyo] start polling..
[6/28/2016, 9:56:14 PM] [My Onkyo] event - status poller - new state:  false
[6/28/2016, 9:56:14 PM] [My Onkyo] setPowerState - polling mode, ignore, state: false
[6/28/2016, 9:56:14 PM] [My Onkyo] getVolume - actual mode, oldValue: 0
[6/28/2016, 9:56:14 PM] [My Onkyo] eventError: ERROR (cmd_not_supported) Command volume in zone main is not supported on this model.
[6/28/2016, 9:56:14 PM] [My Onkyo] getPowerState - actual mode, return state:  false
[6/28/2016, 9:56:14 PM] [My Onkyo] eventError: ERROR (cmd_not_supported) Command system-power in zone main is not supported on this model.
[6/28/2016, 9:56:14 PM] [My Onkyo] getPowerState - PWR QRY: ERROR - current state: false
[6/28/2016, 9:56:14 PM] [My Onkyo] setPowerState - polling mode, ignore, state: false
[6/28/2016, 9:56:14 PM] [My Onkyo] eventConnect: 192.168.1.90
[6/28/2016, 9:56:14 PM] [My Onkyo] eventConnect: 192.168.1.90
[6/28/2016, 9:56:29 PM] [My Onkyo] eventSystemPower - message: on, new state true
[6/28/2016, 9:56:29 PM] [My Onkyo] setPowerState - polling mode, ignore, state: true
[6/28/2016, 9:56:29 PM] [My Onkyo] eventVolume: 2
[6/28/2016, 9:56:29 PM] [My Onkyo] setVolume - polling mode, ignore, volume: 2
[6/28/2016, 9:56:43 PM] [My Onkyo] setVolume - actual mode, volume: 19
[6/28/2016, 9:56:43 PM] [My Onkyo] eventError: ERROR (arg_not_in_range) Command volume=19 is not available on this model
[6/28/2016, 9:56:48 PM] [My Onkyo] setVolume - actual mode, volume: 7
[6/28/2016, 9:56:48 PM] [My Onkyo] eventError: ERROR (arg_not_in_range) Command volume=7 is not available on this model
[6/28/2016, 9:56:57 PM] [My Onkyo] setPowerState - actual mode, power state: false, switching to OFF
[6/28/2016, 9:56:57 PM] [My Onkyo] eventError: ERROR (cmd_not_supported) Command system-power in zone main is not supported on this model.
[6/28/2016, 9:56:57 PM] [My Onkyo] setPowerState - PWR OFF: ERROR - current state: false
[6/28/2016, 9:56:57 PM] [My Onkyo] setPowerState - polling mode, ignore, state: false
[6/28/2016, 9:57:01 PM] [My Onkyo] setPowerState - actual mode, power state: true, switching to ON
[6/28/2016, 9:57:01 PM] [My Onkyo] eventError: ERROR (cmd_not_supported) Command system-power in zone main is not supported on this model.
[6/28/2016, 9:57:01 PM] [My Onkyo] setPowerState - PWR ON: ERROR - current state: false
[6/28/2016, 9:57:01 PM] [My Onkyo] setPowerState - polling mode, ignore, state: false

Other test

Controling the volume is working fine with a Lua Device script

--[[
!! WARNING !!
Before to use the slider volume, beware to put a maximum volume value in your amplifier.
This slider sends the number you see and shows the same on your amplifier. At 75, the volume is set to maximum.
Be careful if you don't want to destroy your speakers (and your ears!)
--]]

fibaro:debug('Set Volume LEVEL v1.1.0');
fibaro:log('Try to set Volume LEVEL');

local _deviceIp = fibaro:get(fibaro:getSelfId(), "IPAddress");
local _devicePort = fibaro:get(fibaro:getSelfId(), "TCPPort");
local _vd_id = fibaro:getSelfId();
local _vd_icon = fibaro:get(_vd_id, "deviceIcon");
local _maxRetryProcess = 5;
local _trace = false;

-- Set VD icon with general icon ------------------------------
fibaro:call(_vd_id, "setProperty", "currentIcon", _vd_icon);
---------------------------------------------------------------


-- Functions' declarations ------------------------------------
function trace(value)
  if (_trace) then
    return fibaro:debug(tostring(value));
  end
end

local function _setVolume(retry)
    local retry = retry or 0;
    local cmd = nil;
    --notify user
    trace("Try to Set Volume LEVEL, #" .. retry .. " please wait...");
    --send packet
    bytes, errorCode = _tcpSocket:write(string.format("ISCP\0\0\0\16\0\0\0\10\1\0\0\0\!1MVL%02X\0x1A\r\n",_sliderValue_));
    -- check for error
    if errorCode == 0 then
        trace("Set Volume LEVEL command successufully transmited.");
        -- amplifier sould return the string sent if success
        while (cmd == nil and retry < _maxRetryProcess) do
            local result = _tcpSocket:read();
            -- check if result is equal than command to confirm success
            trace("Result's lenght : " .. result:len() .. " char");
            cmd = string.match(result, "MVL");
            local cmd2 = string.find(result, "MVL");
            if (cmd ~= nil) then
                trace("Result OK")
                trace("Check result of command : " .. cmd .. " position " .. cmd2);
            else
                trace("Result fail, retry process, #" .. retry .. " please wait...");
                retry = retry + 1;
            end
        end
        return true;
    else
        if retry < _maxRetryProcess then
        trace("Retry process, please wait...");
        fibaro:sleep(2000);
        return _setVolume(retry + 1);
        end
        return false;
    end
end
---------------------------------------------------------------


-- Main script ------------------------------------------------
--open a local socket
_tcpSocket = Net.FTcpSocket(_deviceIp, _devicePort);
--set the read timeout
_tcpSocket:setReadTimeout(2000);

local f, result = pcall(_setVolume);

-- close socket
_tcpSocket:disconnect();
-- destroy object
_tcpSocket = nil;

if (f) then
    if (result == true) then
        fibaro:debug("Set Volume LEVEL successufully.");
    else
        fibaro:debug("Set Volume LEVEL failled !");
    end
else
    fibaro:debug("Error: " .. f);
end
[DEBUG] 23:49:07: Set Volume LEVEL v1.1.0
[DEBUG] 23:49:08: Set Volume LEVEL successufully.

Regards,

Assertion error

Recently I have been getting this error. The commands still work as expected but with this terminal output each time.

onkyo volume:15
<eISCP(TX-NR545) 10.0.1.43:60128>: MVL0F
Traceback (most recent call last):
File "/usr/local/bin/onkyo", line 9, in
load_entry_point('onkyo-eiscp==1.0', 'console_scripts', 'onkyo')()
File "build/bdist.macosx-10.12-intel/egg/eiscp/script.py", line 134, in run
File "build/bdist.macosx-10.12-intel/egg/eiscp/script.py", line 127, in main
File "build/bdist.macosx-10.12-intel/egg/eiscp/core.py", line 436, in raw
File "build/bdist.macosx-10.12-intel/egg/eiscp/core.py", line 259, in filter_for_message
ValueError: Timeout waiting for response.

Suport to TX-NR616

How can I help to add support to TX-NR616 ?

At this moment this model are not supported:
eventError: ERROR (cmd_not_supported) Command system-power in zone main is not supported on this model.

If onkyo is unplugged, plugin crash at load homebridge

hi gw-wiscon, i have went out a week, i come back jeje,

If Onkyo is unplugged, plugin crash at load homebirdge.

Homebridge is running on port 51826.
[Ordenador Portatil] start polling..
[Ordenador Portatil] getPowerState - actual mode
[My Philips TV] start polling..
[My Philips TV] getPowerState - actual mode
[My Onkyo] start polling..
[My Onkyo] event - status poller - new state: false
[My Onkyo] setPowerState - polling mode, ignore, state: false
[My Onkyo] getPowerState - actual mode, return state: false
[Ordenador Salon] start polling..
[Ordenador Salon] getPowerState - actual mode
[My Onkyo] eventError: ERROR (send_not_connected) Not connected, can't send data: "PWRQSTN"
[My Onkyo] getPowerState - PWR QRY: ERROR - current state: false
/usr/local/lib/node_modules/homebridge-onkyo-avr/index.js:191
that.switchService.getCharacteristic(Characteristic.On).setValue(powerOn, n
^
ReferenceError: powerOn is not defined
at Object. (/usr/local/lib/node_modules/homebridge-onkyo-avr/index.js:191:70)
at Object.callback (/usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/eiscp.js:429:17)
at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:906:35
at _arrayEach (/usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:85:13)
at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:898:17
at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:44:16
at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/eiscp.js:414:5
at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:987:13
at Immediate.q.process as _onImmediate
at processImmediate as _immediateCallback
root@DiskStation:/# service avahi-daemon start

Regards

Input selection

Hi,

Thanks for the great work. This works well with a TX-NR509.

Feature request: could you please look into adding Input Change support as per this page:
https://raw.githubusercontent.com/miracle2k/onkyo-eiscp/master/eiscp-commands.yaml

Thanks,
Nick

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.