laetificat / stream-deck-denon-control

A Stream Deck plugin to control your WiFi enabled Denon AVR.
2 stars 0 forks source link

Documentation/ReadMe/Quickstart #1

Open GarrettBlackmon opened 9 months ago

GarrettBlackmon commented 9 months ago

Hello,

I found this project and am trying to reverse engineer how to run it right now. This is probably trivial for anyone who develops plugins for the stream deck, but I have no such experience. It's been quite confusing since the repo this was forked from is not using the rust SDK.

I bet I will have figured it out by the time anyone replies, but its just a suggestion to write a quick start guide. Nothing fancy, just how do you run it.

I'll also be trying to extend this project to change the source on the AVR which would be my main use-case. If successful, I'll raise a PR.

GarrettBlackmon commented 9 months ago

update: I think I found the SDK you used to create this project: rusty-patio

I was able to build the binary by using the commands found in build.ps1 and then moved the directory generated in /targets/release/nl.kevinheruer.denon.sdPlugin into my plugins folder.

Unfortunately, I'm still not seeing the plugin in the local plugins section of the stream deck application.

Any help would be greatly appreciated, I'd love to contribute to your project as I'm keen to use it to solve some of my own needs.

laetificat commented 9 months ago

Hello and thank you for your interest in this project.

Unfortunately this project is a quick fix specifically for my needs so it's not set up for contribution, however it should be pretty easy to get this running.

To get it to work you need to either symlink or checkout this project into your Elgato plugins directory, then you can run a cargo build which should create a binary in target/debug. Sometimes you need to restart the Elgato software but that should do the trick.

Since you mentioned you built it with a different project and the path you mentioned is pointing to the targets/release directory, make sure you either change the CodePath property in the manifest or put it in the targets/debug directory. The binary should be named denon.

For the changes you want to make you can refer to the Denon documentation here: https://github.com/jtangelder/denon-remote/blob/master/protocol.pdf (specifically the SI commands), so you would need something like reqwest::blocking::get("http://".to_owned()+self.ip.as_str()+":8080/goform/formiPhoneAppDirect.xml?SIGAME where you would replace GAME with the input source you want to choose.

I haven't built any binary since the last change which would be around a year ago because it has been stable and there was no need to make any changes, so there could be some issues with dependency and Rust versions when you build.

If I have time I'll write up a quick readme, feel free to ask me any question about this project and I'll help you with the best of my ability.

Good luck!

P.S. I have not used any SDK, it's all plain Rust with a couple of packages for network calls and JSON (de)serialization.

GarrettBlackmon commented 9 months ago

Thank you so much!

This makes everything much more clear, and your snippet about how to change the input really helps point me in the right direction. I'm new to rust just for this use case so it's a big help.

I do think a very simple readme containing exactly the commands needed to build and run the project for anyone who happens across this would be very helpful as I'm still unsure myself. If you're not open to a PR as its serving your purpose, I'd love to fork the project to extend it in the manner I've mentioned.

Thanks again, and I'll close this issue once I get it built and running with your current implementation.

GarrettBlackmon commented 9 months ago

Okay I had a moment to try your build suggestion.

cargo build runs fine and just has a deprecation warning for future versions so that should be fine. image

denon.exe is generated in /target/debug image

and all looks well aside from the pretty obvious deviation from the directory naming schema in StreamDeck/Plugins using the reverse DNS name and appending .sdPlugin. image

I tried it as is anyway since you did not mention any renaming and I could not see it in my plugins, I then tried renaming the directory as nl.kevinheruer.denon.sdPlugin with no change. image

I made a quick video so you can see my process

I've also taken the time to manually validate your manifest.json file as I happened across a thread that indicated that the standard has become more strict but you have all the required keys with valid and sensible values.

I think perhaps something has changed since you originally built this? It'd be great if you could build this on your end and let me know if it still works for you.

laetificat commented 8 months ago

Sorry for the late reply but I have noticed there was a bug in the property inspector and fixed it, however it shouldn't have had any impact on running the plugin, I've also updated the dependencies just in case.

As a testcase I uninstalled the plugin and reinstalled it and it seems to work fine. I took the following steps to install:

Kianouch commented 2 weeks ago

Thank you very much, it works !

I'm just wondering if it would be possible to have a knob for volume control ?

I checked the code a bit but don't really know where to start.