Jump to content
Flirc Forums

MikeP

Members
  • Posts

    11
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MikeP's Achievements

Rookie

Rookie (2/14)

  • One Month Later Rare
  • Collaborator Rare
  • Week One Done Rare
  • Conversation Starter Rare
  • First Post Rare

Recent Badges

1

Reputation

  1. A forum member asked how I converted a CSV file I had created originally into a JSON file and I figured I would share with everyone. I pulled my codes from here https://www.remotecentral.com/cgi-bin/codes/yamaha/rx-v1000/ Here is how I got my json file. I am familiar with the Linux command line so I performed the following steps. Before I show these let me say that an easier way could be to open a spreadsheet program and copy the button name into one column and the code for the button into another column. The second column needs to have the spaces between the numeric codes replaced with commas. You should then be able to save to the CSV file. It is possible you spreadsheet program may be able to save the file to JSON. If not, you may be able to use an online tool to do that basic work. I followed the following steps to dump the html page into a bit more of a manageable file. The steps below have been modified from the blog post. lynx -dump 'https://www.remotecentral.com/cgi-bin/codes/yamaha/rx-v1000/' | sed -e 's/^ *//' | tr -s ' ' ',' | sed 's/$/,/' > dumped_page.txt I then ran the following commands to strip out more of what I did not need. sed -i '/\[filler\.gif\]/d' dumped_page.txt sed -i '/\(Copy,to,Clipboard\)/d' dumped_page.txt sed -i '/\[filler\.gif\]/d' dumped_page.txt I then opened the dumped_page.txt file into a text editor and removed all the text I did not need. How I found that was by looking for these couple of lines of text Remote Model: RAV222 [filler.gif] Power ([23]Copy to Clipboard) Power is where my first button started so I removed every line above Power in the file. I then looked for the equivalent of the bottom the button codes. [filler.gif] [ < Back | Page: 1 [43]2 | [44]Next > ] [filler.gif] I removed everything starting from the first filler.gif line to the bottom of the file. I then combined all the codes for each button onto one line. BEFORE Stadium, 0000,006b,0022,0002,0156,00ad,0015,0015,0015,0041,0015,0015,0015,0041, 0015,0041,0015,0041,0015,0041,0015,0015,0015,0041,0015,0015,0015,0041, 0015,0015,0015,0015,0015,0015,0015,0015,0015,0041,0015,0041,0015,0015, 0015,0041,0015,0041,0015,0015,0015,0015,0015,0015,0015,0041,0015,0015, 0015,0041,0015,0015,0015,0015,0015,0041,0015,0041,0015,0041,0015,0015, 0015,05f8,0156,0057,0015,0e57, AFTER Stadium,0000,006b,0022,0002,0156,00ad,0015,0015,0015,0041,0015,0015,0015,0041,0015,0041,0015,0041,0015,0041,0015,0015,0015,0041,0015,0015,0015,0041,0015,0015,0015,0015,0015,0015,0015,0015,0015,0041,0015,0041,0015,0015,0015,0041,0015,0041,0015,0015,0015,0015,0015,0015,0015,0041,0015,0015,0015,0041,0015,0015,0015,0015,0015,0041,0015,0041,0015,0041,0015,0015,0015,05f8,0156,0057,0015,0e57 Since I know I am working with a CSV file I removed the last comma from each line since I do not need it and it could cause problems when creating the JSON file I saved that file which now gives me 20 lines for my remote and then i ran another script to convert the CSV into a JSON file. Notice that I filled in the "types", "brand", and "model" with what was relevant to me. I redirected the output of the script to a file. #!/usr/bin/env bash cat << EOF { "header": { "version": "2.0" }, "types": [ "devices.audio" ], "brand": "Yamaha", "model": "RX V-1000", "signals": [ EOF while read -r line; do _label=$(echo "${line}" | cut -d ',' -f 1) _code=$(echo "${line}" | cut -d ',' -f 2- | tr '[:lower:]' '[:upper:]') cat << EOF { "label": "${_label}", "code": "${_code}", "protocol": "PRONTO" }, EOF done < dumped_page.txt cat << EOF ] } EOF One thing to keep on mind is that JSON is picky about commas and where then end up and the end of blocks. I will show what I mean with the last two entries of my JSON file. { "label": "RO Concert", "code": "0000,006B,0022,0002,0156,00AD,0015,0015,0015,0041,0015,0015,0015,0041,0015,0041,0015,0041,0015,0041,0015,0015,0015,0041,0015,0015,0015,0041,0015,0015,0015,0015,0015,0015,0015,0015,001 5,0041,0015,0015,0015,0015,0015,0041,0015,0041,0015,0015,0015,0015,0015,0015,0015,0041,0015,0041,0015,0041,0015,0015,0015,0015,0015,0041,0015,0041,0015,0041,0015,0015,0015,05F8,0156,0057,0015,0E57", "protocol": "PRONTO" }, <----- NOTICE THIS COMMA { "label": "Stadium", "code": "0000,006B,0022,0002,0156,00AD,0015,0015,0015,0041,0015,0015,0015,0041,0015,0041,0015,0041,0015,0041,0015,0015,0015,0041,0015,0015,0015,0041,0015,0015,0015,0015,0015,0015,0015,0015,001 5,0041,0015,0041,0015,0015,0015,0041,0015,0041,0015,0015,0015,0015,0015,0015,0015,0041,0015,0015,0015,0041,0015,0015,0015,0015,0015,0041,0015,0041,0015,0041,0015,0015,0015,05F8,0156,0057,0015,0E57", "protocol": "PRONTO" } <----- IT CANNOT EXIST AT THE END ] }
  2. The only pattern is the remote has not been touched for quite some time. More than 30 minutes maybe but I have not paid enough attention. I will do that from now on.
  3. I want to make sure I understand so I can capture the logs properly if it happens again. Do you mean that if the buttons are not working, I have to wait for 8 seconds after a button press and then pull the logs?
  4. I am running 4.12.12-0-g5306d89 firmware and I have run into a periodic problem where the remote stops responding to all button presses and the only solution is to pull the batteries and put them back in. I have two log files and I hope they are helpful but not having timestamps in the log file makes it difficult to know when the log entries were created. I think this is the relevant log file name flirc-remote-control20230331.log Thank you and the team for all the hard work. flirc-remote-control20230409.log flirc-remote-control20230331.log
  5. Is it possible to provide an option to change the font color to black rather than gray. Looking in the screenshot the text is hard to read. The font color is a bit better in the second screenshot but, for me, a darker font color would make the UI easier to read. Thanks for all the work you are doing on the app.
  6. I do notice duration and delay sliders for the Power Toggle and Power On actions above Input HDMI 2. When does the duration and delay take place? Is it before the action or after the action?
  7. I am noticing a difference between the documentation and what I am seeing in the app related to button timing. This section of the documentation says that I should be able to change the duration and delay but I only see a repeat slider when trying to set a delay on an input select button for my TV. https://skip-org.gitbook.io/skip-remote-guide/edit-your-activity-buttons/advanced-editing#adjust-button-timing
  8. I was able to successfully test power on, power off, mute, volume up, and volume down. I made a couple of changes to the json file to properly label the power functions and added a devices.av type. Yamaha-RXV1000-AV.json
  9. Thank you so much for information. I will test this out tonight and reply back with my results.
  10. I have a Yamaha RX V-1000 AV receiver, which is not in the database, and I followed the directions above but when I went to import, I get an error saying the format is invalid. I noticed in the Admin panel that the expected format is a json file. I believe I have a properly formatted file and when I found a relevant forum post I believe my format is correct. What am I missing with my file? I have attached what I found and here is where I got the codes. https://www.remotecentral.com/cgi-bin/codes/yamaha/rx-v1000/ This is a fantastic product and I cannot wait to start using it with my devices. Thank you and the team for all the hard work. Yamaha-RXV1000-AV.json
×
×
  • Create New...