|
Post by marekobu on Oct 10, 2021 7:39:12 GMT -5
I've put a small example, which includes communication implementation examples - it can send ping request to broadcast (for device discovery), listen for responses, send commands and get their acknowledgements. I didn't implement subscribe/updates there, but it could work as a good starting point for you. This tool is also callable from cli: ./emotiva.py --host 1.2.3.4 power_on ./emotiva.py optical2 ./emotiva.py set_volume -30
etc.
Have fun. Has been tested on XMC-1 only. Let me know, if it's usable on any other devices.
|
|
|
Post by marekobu on Oct 11, 2021 8:56:44 GMT -5
I've implemented a basic example of UDP-based communication - it includes discovery (UDP broadcast is used for sending) and request/response handling for commands. There are no updates/subscriptions implemented there yet - I guess example could be useful for anyone stuck on communication layer. It works with my XMC-1, did not test on any other Emotiva device.
Source python code: https://gist.github.com/marek-obuchowicz/7d1ea1f2f3e104891c441ad9802a11f9
|
|