-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RC5 mappings are not compatible with the AVR390 line #2
Comments
Yes annoying. Why could they not keep to the same standard... Will see if I can look at resolving this. |
Right!? I cloned to test with HA here https://github.com/sam808/arcam_fmj_avr390 with changes to the code mapping, but that'll break any of the existing devices. I thought about adding AVR390_xxx code mappings, but to be fair, this is the first time I'm using Python in any meaningful way, so it's going slow. |
I have an AVR550 and an AVR850 with same issues as above - both of these units do not accept the codes being sent, though Volume works fine so must the same code across all devices. Do we know what unit is this module intended for in terms of the codes currently embedded into the code? Thanks. |
450 |
I saw there was an update to this repo and see references in the code to different API versions now. Is there a way to use this integration with the annoyingly different AVR390/550/850 RC5 codes now or should I use the forked version from @sam808 ? |
@fastknight I have not seen these changes merged into the main repo, but I am currently using my fork with an AVR390 and you’re welcome to it. Aside from some annoying comm issues with the AVR, the mapping works, but also requires config in HA if you want any custom input names to show up. |
I've started to work on getting some additional support in. Will need help testing later. |
Hey many thanks @sam808 - I will try pulling your component into my HAS install and see how it goes as i believe the 390 and 550 share the same codes. I have no idea how Arcam have managed to change codes across these models - so frustrating! :) |
So far the only fixes is for sound modes. No fixes for rc5 codes yet, so you can hold of for now. |
Yep I could see those added. Theres lots of RC5 code changes for inputs etc, I'm happy to help pull all those out the Arcam docs if thats of any help as its probably a right pain to sift through it all. |
If anybody could help out with filling out the rc5 mappings here: arcam_fmj/src/arcam/fmj/__init__.py Line 278 in 89e1f04
for the API860_SERIES (should include 360) too, we should be closer to support. |
I can do this - how do you want the codes presented? I have the Arcam document with all the codes so can work through it and create a 390series API section if you like? It also shares the same codes as 550/850/860 apparently. |
I have the doc as well. I wanted a pull request with the codes added where i mentioned above. I don't benefit much from having extracted codes, i can do that while adding them to the python lib. |
I've added the support to the lib now here: ffa0f37 would be nice to get another set of eyes on the mappings. I've not verified this at all yet with home assistant. Will need to be done once we open a pull request for it. |
Thanks, I will run through the codes and check/add them against the docs. I can check they work with my 850 receiver locally before creating a pull request, how do I get the addon code to use the API860_series RC5 codes instead of the default API450_series. Sorry I'm not a developer but am technically proficient-ish |
You should be able to bump the version number in the manifest file for arcam_fmj component in home assistant once I've created a release for 0.9.0. Then it should hopefully detect it as an 850 and use those codes. |
Ah very cool - many thanks. I will run through the codes in the Arcam docs as a second set of eyes and report any differences. Many thanks for updating the script - really appreciated. |
I've opened a draft pull request on home assistant here: home-assistant/core#53843 I need help testing this out on real devices. |
I tried to test this out - I git cloned a copy of 0.9 into /config/custom_components but had same errors as before when switching inputs so I assumed HA was still using the old version. How do I force my install to use the new 0.9 version to do testing? I had thought custom_components folder overrode builtin components but maybe not? |
It's not this repo you need to put in custom components. It's the files from That is the arcam component in home assistant with me changes for it to use the new version of the library. You also need to add a "version": "9.9.9" tag to the manifest file there for it to be accepted as a custom component. |
Apologies - this is my first time with this. I did the following;
Arcam device is always found, but always comes up as unavailable in the integration. Many apologies for taking up so much time! |
Looks correct. Can you check your logs for errors/warnings? |
I removed the new code from the custom_component folder and confirmed it all went back to semi-working state (ie wrong codes being sent to receiver) but device was available again in HA (power button works for example). Then I re-added the https://github.com/elupus/home-assistant/tree/arcam_fixes/homeassistant/components/arcam_fmj back into custom_components again, am now getting device as available but still getting code errors. I restarted HA, same thing. Though I must admit to being confused as to how HA is even getting access to the new codes as the files in that link don't include the code shown here; https://github.com/elupus/arcam_fmj/tree/master/src/arcam/fmj I'm unfamiliar with how this works - so I must admit I expected it to be a case of dropping new Integration code into a folder to override existing shipping code but seems way more complex that. It's also hard to tell in HA what version of the integration is being used? |
You can test the library manually first on a standard computer using python.
That should give you a printout of current state, as well as what model you have. Ps. Did you remember to add the version key to manifest.json after you copied back? Otherwise it is ignoring the custom component install. |
The HA logs look like the old version. My guess is it didn't accept the custom component. The other log is more confusing. Can you make sure home assistant doesn't have arcam integration enabled when testing the command line stuff. The receiver is weird. Also next time run with. arcam-fmj --verbose state --host x.x.x.x |
I agree I just don't think its using the new component under /config - I'm using HassOS if that makes any difference so I can't see /usr/src/homeassistant as its part of the HA docker image which I cant easily access not that it would make much of a difference I guess. |
Ok realised I was missing the , after version. Think its picking it up now, but still getting code errors when switching inputs. Power control is fine |
Success - removed, resetup and restarted and I can switch inputs now - will continue testing. |
Check the sound modes too. |
Been testing it this morning - manually changing inputs/volume on the media card in Lovelace work great. If I setup a scene with the Amp on and in a particular input it I get an error every time with a reference to turn on command and the scene does not execute for the Amp. Seems like its confused about its on state maybe. Error message is below.
|
That seems to be the turn on command failing. I wonder if it rejects turn on, if it is already on. |
Thats what it looks like. The scenes do not seem to run well at all - interested to know how your model copes. I think I will have to send individual commands with pauses rather than use scenes as it just seems to randomly reject input changes, even if the device is starting up from being off. |
Could be a timing issue. If it's slow to start up, it might reject further commands. |
What happens if you call turn on service for media player directly from developer pages in home assistant? do you get an error then too? |
Did some tests here using Developer Tools - looks like a timing issue; First ON command from services works fine, sending another ON command just creates an Unknown Error. So for a scene I'd need to add a pause between the On command and anything subsequent or use a script I guess. |
Also for sound modes I get: STERRO: Error |
Odd that neither stereo or mch_stereo works. What type of source was this on? was it a 2ch source or not? |
I just checked mine. I can send any number of turn_on service calls without error to mine. But you say yours will always fail if the device is already turned on? |
The current mappings of RC5 codes (specifically for input selection) don't map to the RC5 codes for the AVR390. https://www.arcam.co.uk/ugc/tor/avr390/RS232/RS232_860_850_550_390_250_SH274E_D_181018.pdf
For instance,
class RC5Codes(enum.Enum): SELECT_STB = bytes([16, 1])
.. and per the above spec,
STB 16-100 0x10 - 0x64
This results in all input selection erroring with a
CommandInvalidAtThisTime
error.The text was updated successfully, but these errors were encountered: