Parsing IPod and Internet Radio Data
dsmith
Posts: 30
I have a Denon AVR-3312CI A/V receiver which is controlled by RS-232. The 3312CI has a RJ-45 connection to the Internet for Internet Radio and an USB connection for an iPod/iPhone. How can I display the Internet Radio data or the iPod metadata on a touch panel?
Thanks, Donald
Thanks, Donald
0
Comments
Thanks.
What are you? Are you an AMX programmer trying to get additional features to work from an AMX or home grown and rolled module? If memory serves me the doc you specified should have all the commands needed but using them requires knowledge of AMX programming and access to the code including the Denon module code if you didn't roll it yourself.
If you're not an AMX programmer you'll need to get one cuz is ain't plug and play and you can't just flip a switch to make it work. To add those features could take 20-40+ hours to do right depending on what you're starting with for a good programmer. It would take me 40-80+.
Any way the Denon api should give you specific commands needed to impliment those features and then give the possible replies that you'll need to parse and process.
In reading the forums. I came across this snipet of code:
If I modify the variables to suit my needs, this looks like it would work. My confusion is two fold: 1) how to display the text in Netlinx Studio for troubleshooting 2) how to display the text on the Modero.
Thanks, dsmith
Thanks, dsmith
A new Programmer-1 training might be the way to go!
Regarding your questions...
Q1: Look at the "Debug" window in NS. You can track your variables "real time"
Q2: Have a read through in the AMX PI under your Touchpanel model. Its all covered there
Does anyone have some parsing code that I use to test parsing or tell me why my code isn't working. I'm new to parsing and my end result is to parse Ipod and Internet Radio data from my Denon AV receiver and display it on my MVP-8400.
My code:
I've also reattached the Denon Protocol list. My code compiles with no errors but I can't see the iPod output in Netlinx. Thanks for the help.
dsmith
My iPod connects directly to the Denon receiver via the Denon's USB or by using Airplay in the Denon, so I don't understand how the snippet of code can help, due to my not knowing how parsing works.
dsmith
I am going to have to apologize. I want to be helpful, but I am currently buried at work, and don't have the time in next few weeks to do more than what I have currently posted. I wish I could be of further help. Maybe after the holidays.
I completely understand. Please post what you can when you can.
Happy Thankgiving to you.
dsmith
Next you then have DENON_DATA = (DATA.TEXT) which you don't want since your want to fill that from your buffer when you find $0D which you do later in your code.
instead of being global, DENON_DATA should be a stack_var so in every pass of the while loop it starts fresh (empty). I changed that var's name so it doesn't get confused with your global var.
I then made a few minor changes and added send_string 0's so you can see what's coming in, in diagnostics to assist in fine tuning your parsing techniques.
Your send command to the TP was also messed up so that a look at how I did it.
Vining,
First, thanks for the help.
When the program is compiled, I get these errors:
Line 130 in my code is this: nLINE = ATOI(REMOVE_STRING(cStrDATA,"' '",1) +1);
If I comment it out with //, my program show no compiles errors.
Also, I now can see the NSE information is the Netlinx Notification window but nothing in the button on the touch panel.
My next questions would be 1) how to parse the data, so the album name, song, album art and elapsed time show on the touch panel?
Thanks again, Vining and Happy Thanksgiving.
dsmith
This looks proper now although still untested or compiled. I'll give it a go when i get to a pc and verify.
I'll try and look at your other questions then.
Vining,
The added parenthesis' worked.
dsmith
dsmith wrote: In your code you're sending to a virtual so unless that virtual is combined (define_combine) with a real TP or your virtual has a command event to relay to a real TP it won't show. I personally don't used define_combine and I would just send it directly to the TP unless I'm passing this data out of a module back to the main code but then I would use send_string not send command. For now you should just send directly to the TP and leave the other crap until you got this crap figured out.
To get the other info you'll need a seperate VT channel for each line you want to display and then parse based on the line numbers. The only real funky thing is with line 1-6 once you get rid of NSE and the line number you'll need to do bitwise comparisons on the first byte that remains and each bit in that byte will give the specific info that's spelled out in the protocol. Example bit 1 of that byte is whether or not that location is playable.
PHSJason's code has this all done in the code he posted so you should use that as a reference and learning tool. If you have questions regarding his code just ask the forum and even though he's busy someone else will likely help if they have time. If you're trying to learn more so than trying to get a project completed in a hurry I would take snippets of his code and paste them into yours and play with it a little at a time to get an understanding of how this all works. When you get past one hurdle move on to the next. Got a question on why or how just ask.
I've decided to give up on the parsing Ipod & Internet Radio data for for now for something easier (I hope). I would like to parse the Denon's volume level to be displayed on the panel. So I've changed my code to look for the 'MV' parameter:
Going back to one of my older questions, how do I parse this data and display it on the touch panel?
Thanks, dsmith