GithubHelp home page GithubHelp logo

Comments (17)

probonopd avatar probonopd commented on September 27, 2024 1

Does the APi also require IrpTransmogrifier to be installed too to do the conversion ?

Yes.

Since the website is calculating these on-the-fly which costs CPU, we are not offering them through the API but expect client-applications to render the codes themselves.

image

One could think about pre-rendering all codes on the server in a batch process, though, if there is demand for it. But then, tools like IrScrutinizer that use the codes have the rendering already built-in.

from irdb.

probonopd avatar probonopd commented on September 27, 2024

What kinds of devices are those?

I am not aware of something like you suggest, but for example it would be possible to script something that sends the "Power" signal of each known codeset to the device.

This is similar to how some of the commercial universal remotes work - they send one key (e.g., "Power" - because most devices support it) from every codeset until one that works is found.

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Hi @probonopd

Thanks for responding - those two are AV companies (http://www.cypeurope.com/ & https://www.sy.co.uk/) - Perhaps more UK\Europe based. I have a hdmi matrix and an av presentation switch

That’s exactly the sort of thing I was thinking - just having power on/off would be a blessing - but not being someone who can code - I’m wondering if this ‘feature’ might be something someone has already created or would be willing to work on (with me).

It would be awesome, once it’s found something that works, that it could then cycle trough another command, all the time filtering out manufacturers and models - ideally leaving you with a compatible IR code base/set (I would expect it’s not unlikely that many are just a rebadged product of something else)

from irdb.

bengtmartensson avatar bengtmartensson commented on September 27, 2024

Check out the TV B Gone project, even available as a commercial product. As soon as you have bound one signal that works, you can analyze that signal, and look for the rest, for example in this DB. Also most "standard" universal remotes from e.g. One4All have a similar function.

from irdb.

probonopd avatar probonopd commented on September 27, 2024

Yes I was thinking of it @bengtmartensson but it's only for TVs, right?

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Thanks, it does indeed look to focus on TVs, plus I was hoping for something a little less ‘off the shelf’ as I have a various pieces of kit at home already (Raspberry Pi, IR emitters, Android/iPhones etc.) that I was hoping to make use of..

Any other ideas/suggestions/ thoughts..

from irdb.

probonopd avatar probonopd commented on September 27, 2024

Yes, I know how to do this but I don't have the time to do it. Write a script that fetches the power button code of all codesets from this database, and feed it into something that can send codes, e.g., an Arduino that gets fed by the computer with the codes to be sent. Make the script print which codeset it is sending, so that when your device switches on/off, you know which code caused it.

If @bengtmartensson finds this feature useful, then maybe it could even be added to IrScrutinizer? (Which is my absolute number one go-to tool for all things IR codes. A true "category killer".)

from irdb.

bengtmartensson avatar bengtmartensson commented on September 27, 2024

@probonopd:
Thanx for those nice words! However, I do not have any short-time plans to implement a code-scanner in IrScrutinizer. (After all, the OP "just" wants codes for his equipment, and is not primarily interested in developing a new tool.)

In the long time run, I might implement an extension language (Jython, JavaScript,...) which would make it possible to to implement such things with a quite small amount of code in the extension language.

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Thanks all for the comment and for potential future consideration,

in the interim is there a way to retrieve just the on and off commands from every device you have listed, into some sort of list/table ?

If so, I could try and rig something up and use one of my home automation IR senders to cycle through them and I can report back ?

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

I’ve tried a number of Ir senders over the years, currently I’m using a Broadlink device with my Vera home automation controller and a great plug-in for it from @a-lurker https://github.com/a-lurker/Vera-Plugin-BroadLink-Mk2.

Using the Vera software (Lua) and the above plug-in - I would need to retrieve the pronto codes etc. And somehow populate them into the format below and send them one by one, each time pausing briefly looking for a response, before automatically moving in to the next one...

-- Yamaha YSP off

luup.call_action('urn:a-lurker-com:serviceId:IrTransmitter1', 'SendProntoCode', {ProntoCode = '0000 006C 0022 0002 015B 00AD 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0041 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0016 0041 0016 05F7 015B 0057 0016 0E6C'},49) `

from irdb.

bengtmartensson avatar bengtmartensson commented on September 27, 2024

Assuming you have the irdb tree locally on $IRDB_BASE, this pseudo code should do it

for file in $IRDB_BASE/codes/*/*/*.csv:
    for line in $file:
       (cmd_name,protocol,D,S,F) = split $line ','
       if match('power', $cmd_name):
               echo "Trying signal $protocol $D $S $F" 
               pronto = $(irptransmogrifier render -p  -n D=$D,S=$D,F=$F $protocol)
               sendIr $pronto
               sleep $a_while
       endif
   endfor
endfor

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Great, many thanks .

I can look to download the irdb tree and try this, although is that Java ?

Unfortunately my programming skills are very limited, I only really have a small ability when it comes to Lua.

By any chance are you aware of any online tools that could do a Java -> Lua the conversion ?

from irdb.

bengtmartensson avatar bengtmartensson commented on September 27, 2024

Just install IrpTransmogrifier as shell command and call it (as shell program) using (I think) os.execute or io.popen in Lua. No need to call java from lua.

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Many thanks

Ok, using the Samsung TV .csv and finding the ‘POWER’ code as an example (extract below)

functionname	protocol	device	subdevice	function
INPUT SOURCE	NECx2	7	7	1
POWER	NECx2	7	7	2

Is the eventual goal of the code to generate a command line like this?

irptransmogrifier render -p -n D=7,S=7,F=2 NECx2

Side question.

Are there any other options available to avoid the command line approach, maybe a http request/api route that could use something similar within the url to pull the actual Pronto ‘Power’ IR code ?

0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e

from irdb.

bengtmartensson avatar bengtmartensson commented on September 27, 2024

Is the eventual goal of the code to generate a command line like this?

irptransmogrifier render -p -n D=7,S=7,F=2 NECx2

Yes. Make sure there are no spaces around the commas.

Are there any other options available to avoid the command line approach, maybe a http request/api route that could use something similar within the url to pull the actual Pronto ‘Power’ IR code ?

I am not sure if I understand your request, but you may like to access the IRDB API from your Lua program.

from irdb.

nodecentral avatar nodecentral commented on September 27, 2024

Hi,

Thanks again for all your help, I looked at the IRDB API, but I couldn’t find the url format to retrieve the full pronto ir code for a particular key e.g “POWER’ on any device.

Does the APi also require IrpTransmogrifier to be installed too to do the conversion ?

BTW - I posted a question on your IrpTransmogrifier repository about how to install/run IrpTransmogrifier- installing things on linux never seem straightforward/ logical to me..

I’m close to finalise my Lua code to extract content from the code folder and generate the following to call IrpTransmogrifier

irptransmogrifier render -p -n D=7,S=7,F=2 NECx2

from irdb.

probonopd avatar probonopd commented on September 27, 2024

Please use something like IrScrutinizer for this task.

from irdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.