elupus / arcam_fmj Goto Github PK
View Code? Open in Web Editor NEWPython module for interacting with a arcam fmj receiver
License: MIT License
Python module for interacting with a arcam fmj receiver
License: MIT License
Conflicting setup requirement with standard library for Python 3.7 / 3.8
setup.py
file is used it means updating the install_requires
list and removing or updating the conflicting requirements.
install_requires
: https://hynek.me/articles/conditional-python-dependencies/asyncio
Thanks for your support of Home Assistant!
I was searching for some CLI documentation but couldn't find any.
Could you also indicate me what is the right command to power an SA20 amp knowing the host and port of the amp?
While I was adding my PA720s into Home Assistant, I noticed that there is a long timeout before they are added. I actually thought that it had failed but in fact it eventually succeeds. I seem to remember a similar issue with the AV40.
I took a look under the hood and I see that it is to do with the code that tries to identify a unique id. The PA720s don't support a device description xml (although they do support SSDP discovery) and the AV40 device description xml is on a different URL to the one that is used in get_uniqueid_from_host
. Worse, the AV40 URL is a function of the UDN - which is what we need the URL for in the first place.
I've put together a gist showing a proof of concept that uses the async_upnp_client
package to do the same thing.
Take a look here. It would be interesting to know whether it works for other devices than the AV40. It takes a --host <ip>
argument.
I noticed that your code caters for "possibly invalid xml". I suspect that async_upnp_client
will be unforgiving of invalid xml so that may be a reason not to go this way.
It's probably worth noting that async_upnp_client
is already used in Home Assistant. An example of its use is the samsungtv
component.
By the way. The reason that I carried on to get the serial number from the device description XML is because I looked at this in the distant past and still have test data. I noticed that at some point between November 2021 and now the UDN used by my AV40 has changed - while the serial number has not. My guess is that the UDN may change after firmware updates or perhaps after a factory reset. Assuming that serial number is available in the device description for all supported Arcam models, it might be preferable as a unique id compared to the UDN.
What do you think?
I am currently testing the project with an Arcam SA10 Integrated Amplifier. While the models are different, the command to turn on the device is the same as the AVR450 which this project was intended for.
as per the SA-10 Datasheet:
All other RC5 commands when tested work but not the power on. I was able to turn the power on the device by referencing this section of the datasheet:
related python code data
being defined in src/arcam/fmj/__init__.py:723
:
data = bytes([
0x21,
0x01,
0x00,
0x01,
0x01,
0x0D
])
Does anyone know if the RC5 power on command works for their devices?
Thanks for this great Python module and the related Home Assistant integration!
I've just forked the repository with a view to adding support for the HDA series. It looks like a relatively simple extension to the 860 series. Before I go to the effort of doing so I wanted to just check whether or not that was already work in progress? If not, then I will dive in.
Just to make sure that I'm on the right track, I have a couple of questions:
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.
Hello,
I would like check if this library is also compatible with Arcam ST60 DAC/Streamer?
If not maybe I can try collaborate and extend or maybe create a new lib all together. What you think?
I'm planning to acquire one and integrate it with HA.
Regards,
Leandro
See e.g. https://github.com/elupus/arcam_fmj/actions/runs/3510023546/jobs/5879522235:
tests/test_fake.py ssssssss [ 22%]
tests/test_standard.py sssssss [ 42%]
tests/test_state.py ssssssssssssssss [ 88%]
tests/test_utils.py ssss [100%]
35 skipped, 55 warnings in 0.35s
Hi,
I am facing some issues when it comes to the connection with my AVR 360. I know it might be not supported, but would like to make sure and will not waste my time with it anymore.
From the logs, I can see following:
Logger: arcam.fmj.utils
Unable to get device description from http://192.168.0.101:8080/dd.xml
Unable to get device description from http://192.160.0.101:8080/dd.xml
But if I am accessing Arcam directly from a browser, response is received.
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11" xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0" xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<presentationURL>/web</presentationURL>
<pnpx:X_hardwareId>VEN_2A2D&DEV_0001&SUBSYS_0001&REV_01 VEN_0033&DEV_0005&REV_01</pnpx:X_hardwareId>
<pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
<pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
<df:X_deviceCategory>Multimedia.DMR</df:X_deviceCategory>
<microsoft:magicPacketWakeSupported>0</microsoft:magicPacketWakeSupported>
<microsoft:magicPacketSendSupported>1</microsoft:magicPacketSendSupported>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
<friendlyName>Arcam media client 002261a55190</friendlyName>
<manufacturer>A & R Cambridge</manufacturer>
<manufacturerURL>http://www.arcam.co.uk</manufacturerURL>
<modelDescription>ir-ser-FS2026-0200-0115_V2.2.14.37060-8</modelDescription>
<modelName> </modelName>
<modelNumber> </modelNumber>
<modelURL>http://www.arcamradio.co.uk</modelURL>
<serialNumber>0b05031407351f2701005201xxxxxxxx</serialNumber>
<UDN>uuid:3dcc7100-f76c-11dd-87af-xxxxxxxxxxx</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>32</depth>
<url>/icon.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>32</depth>
<url>/icon.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>32</depth>
<url>/icon2.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>32</depth>
<url>/icon2.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>AVTransport/scpd.xml</SCPDURL>
<controlURL>AVTransport/control</controlURL>
<eventSubURL>AVTransport/event</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>ConnectionManager/scpd.xml</SCPDURL>
<controlURL>ConnectionManager/control</controlURL>
<eventSubURL>ConnectionManager/event</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>RenderingControl/scpd.xml</SCPDURL>
<controlURL>RenderingControl/control</controlURL>
<eventSubURL>RenderingControl/event</eventSubURL>
</service>
</serviceList>
</device>
</root>
Can you please have a look what might be wrong?
Thanks in advance!
Best regards,
T
$ python3.11 -c 'import arcam.fmj'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/nix/store/qgj2dy01385nbga6vw4xny7d5l7rs3dy-python3.11-arcam-fmj-1.2.0/lib/python3.11/site-packages/arcam/fmj/__init__.py", line 143, in <module>
class IntOrTypeEnum(enum.IntEnum):
File "/nix/store/qgj2dy01385nbga6vw4xny7d5l7rs3dy-python3.11-arcam-fmj-1.2.0/lib/python3.11/site-packages/arcam/fmj/__init__.py", line 153, in IntOrTypeEnum
def _create_pseudo_member_(cls, value):
File "/nix/store/l87x5cpmxpfxb93nl4madnr4mmmlvhy4-python3-3.11.1/lib/python3.11/enum.py", line 382, in __setitem__
raise ValueError(
ValueError: _sunder_ names, such as '_create_pseudo_member_', are reserved for future Enum use
Hello,
When do you think is possible to have a new release that includes ST60 functionality so we can include it in HA?
I tested the master branch with HA assistant locally and seems to work quite fine. Not sure if other kind of tests are needed.
Regards,
Leandro
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.