Giter VIP home page Giter VIP logo

Comments (13)

master2033 avatar master2033 commented on September 25, 2024 1

it works great. Right off the TV turns on and the AVR is on the right input.

Thank you so much.

Can I buy you a coffee or a beer?

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

Thanks for the positive feedback and for using this plugin!

Aren't the scene switches on the AVR what is covered by the YamahaAvrInputSelector?
(see https://github.com/mwittig/pimatic-yamaha-avr#yamahaavrinputselector). Did you try this?

As far as I understand this, the button id of the input selector must match the scene name given in capital letters (your owners manual should contain a summary of scene names). If your AVR has a printed button labeling it may be abbreviated in some cases, e.g. for the "Net" button the scene name is "NET RADIO". Unfortunately, there isn't a fixed list of scene names as these vary among the different AVR models and newer models even allow for changing the scene name. So, it may require a bit of poking to find the right scene name for your setup, but it should work.

from pimatic-yamaha-avr.

master2033 avatar master2033 commented on September 25, 2024

For the input sources I only have the following ones (see pictures in the appendix).

If I select the source "TV" as a rule I get an ERROR

My model is a HTR 4065 according to instructions is called the scene TV
yamaha input 1
yamaha input 2
yamaha input 3

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

Which error do you get?

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

I have digged a little deeper. The API specification documentation I'm aware of doesn't not even mention a "scene" concept, even though this feature has been provided with various AVRs in the past. Reading various manuals I came to the conclusion that "input selection" can't be the same than a "scene selection", even though some manuals are suggesting this (which is confusing). On one of the various libraries to control the AVR I have seen a (undocumented) scene command. I'll use this to draft a YamahaAvrSceneSelector which you can trial. So, please stay tuned.

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

Released [email protected] which contains an experimental YamahaAvrSceneSelector device class. Basically, it has the same properties than the input selector. Note, there is no action definition for scenes, yet.

Please give it a try a let me know if it works for you. Please also provide some debug output which you can get if you enable and set the debug property of the plugin to true. Particularly, I am looking for the debug output similar to the following:

15:26:47.883 [pimatic-yamaha-avr] [Plugin] Requesting status update
15:26:47.884 [pimatic-yamaha-avr] [Plugin] Request: <YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>
15:26:47.889 [pimatic-yamaha-avr] [Plugin] Response: {"YAMAHA_AV":{"$":{"rsp":"GET","RC":"0"},"Main_Zone":[{"Basic_Status":[{"Power_Control":[{"Power":["Off"]}],"Volume":[{"Mute":["Off"],"Lvl":[{"Val":["0"],"Exp":["1"],"Unit":["dB"]}]}],"Input":[{"Input_Sel":["TUNER"]}]}]}]}}

from pimatic-yamaha-avr.

master2033 avatar master2033 commented on September 25, 2024

I have tested the new plugin. The following is output in the logfile:

Unhandled rejection Error: Command <YAMAHA_AV cmd="PUT"><Main_Zone><Scene><Scene_Sel>TV</Scene_Sel></Scene></Main_Zone></YAMAHA_AV> failed with return code 3
    at /home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/yamaha-avr.coffee:120:19
    at tryCatcher (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

OK, thanks. Too Bad! Error 3 is returned on "Invalid Request (A method did not exist, a method wasn’t appropriate etc.)"

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

Can you please use Scene 1 instead of TV to see whether or not that works? Thanks!

EDIT: You may also try Scene 2, Scene 3, or Scene 4

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

Beer preferred as weekend is approaching!

I think the functionality around scenes can still be made somewhat nicer. Basically, it is possible to read all the scene configuration from the receiver to get it filed into the device configuration. For the time being, you can manually assign scene names to the scene ids by using the the text property as shown below.

{
      "id": "avr-5",
      "name": "AVR Scene Selector",
      "class": "YamahaAvrSceneSelector"
      "buttons": [
           {
             "id": "Scene 1",
             "text": "TV"
           }
      ]
}

Can you please also post me the debug output for the basic status updates? Thanks

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

@ccvh @joenex1 @M1rk0

Perhaps, you can also help with debugging the new feature? In particular, I would like to make sure status updates will be handled properly for scene selection.

from pimatic-yamaha-avr.

master2033 avatar master2033 commented on September 25, 2024

I have one more question.

it would be possible the error message for HOST not reachable. Off.

I would like to switch my technology as far as possible without power. Unfortunately, I then get the error message continuously.

error [pimatic-yamaha-avr]: [Plugin] Error: { [Error: connect EHOSTUNREACH 192.168.15.12:80] code: 'EHOSTUNREACH', errno: 'EHOSTUNREACH', syscall: 'connect', address: '192.168.15.12', port: 80, __trace: 'Error: From connect\n at Socket.connect (/home/pi/pimatic-app/node_modules/pimatic/startup.coffee:55:29)\n at Agent.exports.connect.exports.createConnection (net.js:68:26)\n at Agent.createSocket (_http_agent.js:180:16)\n at Agent.addRequest (_http_agent.js:149:23)\n at new ClientRequest (_http_client.js:142:16)\n at Object.exports.request (http.js:31:10)\n at new Request (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/restler-promise/node_modules/restler-base/lib/restler.js:76:26)\n at request (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/restler-promise/node_modules/restler-base/lib/restler.js:333:17)\n at Object.post (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/restler-promise/node_modules/restler-base/lib/restler.js:348:10)\n at /home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/restler-promise/lib/restler-promise.js:32:38\n at Promise._execute (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/debuggability.js:300:9)\n at Promise._resolveFromExecutor (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:483:18)\n at new Promise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:79:10)\n at Object.post (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/restler-promise/lib/restler-promise.js:31:20)\n at /home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/yamaha-avr.coffee:111:14\n at Promise._execute (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/debuggability.js:300:9)\n at Promise._resolveFromExecutor (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:483:18)\n at new Promise (/home/pi/pimatic-app/node_modules/pimatic/node_modules/bluebird/js/release/promise.js:79:10)\n at YamahaAvrPlugin.sendRequest (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/yamaha-avr.coffee:109:14)\n at YamahaAvrPlugin._requestStatusUpdates (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/yamaha-avr.coffee:86:8)\n at null._onTimeout (/home/pi/pimatic-app/node_modules/pimatic-yamaha-avr/node_modules/pimatic-plugin-commons/lib/index.js:311:27)\n at Timer.listOnTimeout (timers.js:92:15)' }

Thank you for the effort

from pimatic-yamaha-avr.

mwittig avatar mwittig commented on September 25, 2024

@master2033 Maybe you have overlooked my previous request on providing debug output. I'll need this to complete the implementation of the scene selector feature.

To obtain debug output you need to enable and set the debug property of the plugin to true. Particularly, I am looking for the debug output on the basic status updates, similar to the following:

15:26:47.883 [pimatic-yamaha-avr] [Plugin] Requesting status update
15:26:47.884 [pimatic-yamaha-avr] [Plugin] Request: <YAMAHA_AV cmd="GET"><Main_Zone><Basic_Status>GetParam</Basic_Status></Main_Zone></YAMAHA_AV>
15:26:47.889 [pimatic-yamaha-avr] [Plugin] Response: {"YAMAHA_AV":{"$":{"rsp":"GET","RC":"0"},"Main_Zone":[{"Basic_Statu

from pimatic-yamaha-avr.

Related Issues (8)

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.