probonopd / irdb

One of the largest crowd-sourced, manufacturer-independent databases of infrared remote control codes on the web, and aspiring to become the most comprehensive and most accurate one
Other
801 stars 149 forks source link

Automation tool for Windows #18

Closed kdschlosser closed 5 years ago

kdschlosser commented 5 years ago

@probonopd

IDK if you remember me or not. I did some work that you merged on your Pronto IR library for the Arduino. I made it so that it could be used as a library actually. I do not remember if i ever submitted a PR for adding support for most of the major Arduino boards.

I did have something you may want to have a look at. This is a project I have been working on for the past few years. It has a great system designed for accessing a whole slew of different IR transmitters and receivers. It supports Windows only at the moment. But there are plans to make it multi platform.

I am going to be bold and say that it supports every IR receiver and Transmitter made that can be used in Windows. Including all of the global cache pieces as well as some of the obscure serial ones.

The project is called EventGhost http:\www.eventghost.net you may or may not have heard of it.

I am not sure if your DB has an API or not. It would be pretty cool if we could add into EventGhost the ability to search and grab codes from your database. But to also be able to submit them to it if they learn a code. The IR functionality of EventGhost is probably the largest reason why people download and Use EventGhost. we have about 20K unique downloads a year 98% of the countries in the world have someone using EventGhost so that would give you access to remotes all over the world of every make and model.

Let me know what you think. It is an Open Source project https://github.com/eventghost/eventghost so you can have a look see at how we handle encoding and decoding

probonopd commented 5 years ago

Hello @kdschlosser. Sounds like an interesting project, although I am not using Windows at all myself. Yes, there is an API, and it is described at http://irdb.tk/api.

kdschlosser commented 5 years ago

That's why there is Virtual Box ;)

If you have the time would you be willing to have a look at the source code for my project. the IR specific bits are under eg/classes/irdecoder for the decoding end of things. and under plugins/mceremote_vista for the encoding parts. I am sure it can be improved upon.

and thanks for the fast response as well.

probonopd commented 5 years ago

Sorry I am not a Windows guy and I don't want to look at source code that it targeting Windows only. Why not write it in something like Python so that we all can use it, on Linux and Mac and Windows and whatnot.

On Sun, Nov 11, 2018 at 12:01 PM Kevin Schlosser notifications@github.com wrote:

That's why there is Virtual Box ;)

If you have the time would you be willing to have a look at the source code for my project. the IR specific bits are under eg/classes/irdecoder for the decoding end of things. and under plugins/mceremote_vista for the encoding parts. I am sure it can be improved upon.

and thanks for the fast response as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/probonopd/irdb/issues/18#issuecomment-437664417, or mute the thread https://github.com/notifications/unsubscribe-auth/ACXZuWciyMC_9Ui_HEx8GZB0GqmiIymmks5uuBGagaJpZM4YYR_p .

bengtmartensson commented 5 years ago

Even though this was directed to probonopd, I allow myself to chime in here.

The problem is that EG is, according to their own description, is "an automation tool for Windows" (my emphasis), not an automation tool that happens to run on Windows. Last time I looked at it, the emphasis was on automating Windows and programs that runs on Windows. Having said that, it certainly does have certain capabilities to e.g. IR-control of external devices over connected IR senders, in general using Pronto Hex as intermediate format. The commands for the IR device is in general collected in a plugin (which all are called __init__.py !!!!) (At least when I last looked at EG, many years ago.)

So, if the problem to be solved is to get an IRDB commandset ("device") into an EG plugin, I would propose the following solution. Using IrScrutinizer the IRDB devices can be conveniently browsed and downloaded, edited, merged, etc. Remains to export it so that EG can use the commands. For this, an export format for IrScrutinitzer can be written, generating the Python file (__init__.py). Implementing this export format is a matter of possibly a few hundred lines of XSLT.

Whatdoyouthink?

probonopd commented 5 years ago

Thanks for the clarification @bengtmartensson. It may be just me but I'm not interested in anything that requires me to deal with Windows. But I appreciate if Windows users incorporate irdb. Especially if it leads to more codes being submitted via GitHub.

kdschlosser commented 5 years ago

it is in python

kdschlosser commented 5 years ago

it automates anything that has the ability to communicate. there are over 400 available plugins, from zwave to mqtt, serial Sony TV's Marantz AVR's. the core of EG is designed to run on Windows. I am not the original author of the EventGhost. I am now one of the maintainers. There is a lot of code in the core that has hooks into Windows. I am not familiar with Linux enough as of yet to be able to make a cross platform version of EventGhost. This is one of those things that we want to do. The project was stale for almost a decade with no progression of the core. I started working on the project 2 years ago and it has seen many changes so far. But there are a lot more needed.

@bengtmartensson That wording on the main website has been brought up in conversation before. I was at the losing end of that battle. I do agree with you that it sounds like a tool to automate Windows and nothing more. I am going to use this as proof that there are others that see it in the same manner that you and I do.

Each plugin is it's own package that is the reason why it has it's own initalso why they are located in the plugins directory. the directory name is the name of the package and it typically a pretty good indicator as to what the plugin does. and if it is not clear then opening the init.py and near the top of the file reading where the plugin gets registered will yield a description.

EventGhost already has the ability to transmit pronto codes. as well as converting raw IR codes to pronto format. Making a plugin that would attach to the current IR plugins and be able to collect and send data vie a web API is a snap. it would take maybe a few hours to key. It appears that the pronto codes can be gotten from the API. But as far as adding codes I did not see anything in the API for doing that. and I am guessing that @probonopd 's comment of adding the codes via github is the wat to do that. Unfortunately we live in a world where most people do not go out of their way to do something nice. unless it is easy for them to do. most people do not have a clue how to use GitHub never mind have an account or are willing to spend the time to be able to submit a code. If there was a way to add the codes via the web API then a simple check box could be added along with 3 fields to be filled in. brand/model/button. no other software would be required. and it is very simple for them to do.

@probonopd The reason I mentioned having a look at the source code was more for the purpose of being able to add codes to the database. to make sure how the codes are generated was correct. instead of adding codes that have some kind of an issue. You have a lot more experience dealing with IR codes then I and you would be able to catch any potential code issues.

probonopd commented 5 years ago

@kdschlosser can you point me to some codes generated by that tool? Finding a way to bulk-load IR codes from a system that has many users with many different IR devices sure sounds like a good idea.

kdschlosser commented 5 years ago

You are going to have to explain some on that one.

The program is able to generate raw pronto codes that a user is then able to use in order to blast a code. I can plug in my receiver and locate some remotes to show you the output. Dunno if that is hat you are looking for.

My idea was this. when a code is learned using EventGhost the user will then be asked if they want to submit the code they just learned to your database. if they say yes. then they would be given 3 fields to fill out. Manufacturer, Model, and key name. the key name would be a choice control this way it keeps the names of he keys uniform across all devices and models. and it is also easier to see if you already have the code stored and perhaps only need to add the model number of the device to the database for that code.

the program also does some error checking. you have to keep on pressing the button until 3 of the codes it receives are identical. this is nice to make sure that the code that is learned is a good code. and also for protocols that have changing codes.

you name it we can do it with this program. right down to requiring that the new code that has been learned has to be tested before it gets submitted.

Microsoft actually did something right. they made the ehome drivers and the consumer IR portion of Windows correctly. It is pretty bullet proof so to speak. we wrote a service that shanghais the data when it gets passed form the driver to Windows. so we do not let windows process the IR codes. then the receiver code gets sent over a named pipe to our software that runs on python. I use a pinnacle MCE IR receiver/blaster and I have never see a code that it has not been able to create a pronto code from. I know that with my Samsung TV (the remote that has the keyboard on the underside of it) I had tried many different tools and programs to learn the code with no success. EventGhost had no issue learning the codes.

I know that you dislike Windows. and to be honest I do as well. Linux is starting to become a fat cow like Windows is. and forget about crapintosh.

so tell me what you need and I can get it done for ya. You may want to install windows onto a VM so you can poke about it some. (or you could use appveyor.. hehehehe). If I had my server running I would setup a VM for ya. (RAID controller failure, actually 2 of them)

probonopd commented 5 years ago

Just looking for a way to work with your stuff without having to deal with Windows myself. Is there a way? Otherwise let's close this, as I am not interested in spending my free time with Windows, even if in a VM.

kdschlosser commented 5 years ago

LOL.

when i get some spare time I will work on adding this feature to our software. at that point in time i may have some questions about the API

fair enough?

probonopd commented 5 years ago

OK. Thanks.