Jump to content
Flirc Forums
newguy1234

Sending IR commands through script?

Recommended Posts

I've seen this asked a couple times on this forum in the past, but I'm wondering if it changed.  Can the Flirc USB send IR commands now?  The "New Hardware Features" section shows an IR Transmitter, as does the technical specs, so it seems the answer should be "yes", but previous forum posts say "no"

If that is the case, how does one go about sending an IR signal?  My use-case is that I want to send commands from my computer (via a Python script, ideally, but an API from any language would be fine) to essentially use my PC as a universal remote.  To be clear, I don't want to use a remote control to control my PC, I want to use my PC as a remote control to control other devices.  The PC is Windows 10, if that makes a difference.

The website mentions an SDK.  Is there some place I can see that (or the documentation) before ordering one of these?

Thanks!

Share this post


Link to post
Share on other sites

Hi,

All previous posts regarding sending IR signals are in regard to older Flirc hardware (Flirc USB in clear plastic cover and Flirc-SE) and are still true. Old hardware doesn't contain IR transmitting capabilities (no IR transmitting diode and not enough program space on the chip).

The new hardware indeed contains hardware required for transmitting IR signals but the feature is not yet ready on the software/firmware part and so is not available yet. It's one of the features I'm also eagerly waiting on. I don't know how the feature is going to be exposed to the user, but I like your idea of controlling it with external script or software.

Share this post


Link to post
Share on other sites

Any insight as to when this will be available? I bought the device after seeing that it had a transmitter, so its a bit disappointing not to be able to use the transmitter... 

Share this post


Link to post
Share on other sites

@KenJs unfortunately there's no timeline yet on when that feature will be implemented. There's still no consensus on how the blaster will be accessible to the OS and apps/scripts.

@brunoland I've already answered your question about that in a different thread about a month ago: http://forum.flirc.tv/index.php?/topic/2393-new-features-for-the-old-flirc/&do=findComment&comment=13015

 

Share this post


Link to post
Share on other sites

This is a flirc gen2 feature, the feature is done, and I'm doing some final testing on the firmware. You'll need firmware v4.2.x (attached).

The SDK is also published here: https://github.com/flirc/sdk/tree/master/cli I'm missing a windows library, I'll be adding that in the next couple of days. 

It's implemented in a very basic form. Basically with my latest version of software/firmware/device, you can capture the raw signal from a remote, a comma delimited list of edges.

The api looks like: flirc_transmit_raw(uint16_t *buf, uint16_t len) 

My commandline utility has been updated to send a command with the output directly from the GUI. It parses the comma delimited list, puts it into a buffer, and calls the api, which can be seen in the SDK here: https://github.com/flirc/sdk/blob/master/cli/src/cmds/ir_transmit.c

An example of the using the commandline: http://cl.flirc.io/lrs8

The transmitter in flirc is not the greatest, you'll need line of sight, and it's limited to about 6-8 feet. The IR LED is only like 2mm big. I'm exploring other options but it'll mean a new hardware update/sku. 

There is a lot to do with this, but I'll be moving on for the time being for a few other promised features.

nemo.release-4.2.0.bin

dori.release-4.2.0.bin

Share this post


Link to post
Share on other sites
On 06/08/2017 at 5:02 AM, jason said:

I successfully flashed dori.release to my v2 flirc on my Windows 7 machine, but I couldn't detect any IR emissions & the GUI broke.  I followed the following instructions to undo it:

On 19/06/2015 at 10:59 AM, alankeny said:

I found the steps to downgrade in the Firmware > Bugs forum.  Based on a post from another user, I went back to firmware version 2.6, and my FLIRC was usable again.  A firmware downgrade was the only thing that worked for me, so hopefully it's OK to post this:

  • Download and install the GUI+Firmware version you want from http://downloads.flirc.tv/release/gui/
  • Open a command prompt, change to the FLIRC directory, and run flirc_util dfu
  • Start the FLIRC GUI

When the GUI starts, it will detect the FLIRC boot loader and download the version of the firmware bundled with the GUI.  I was never able to get the Force Upgrade button in the GUI to work, but these steps worked every time.

 

Share this post


Link to post
Share on other sites

Is there a way to retrieve the IR sequence from (or via) FLIRC (V2)? Like, I put flirc_util in 'record_ir' mode and I point my remote control onto FLIRC, and press a remote control button. Flirc_util will than show me the sequence that is necessary to put in flirc_util send_ir_raw .... (like in your example: http://cl.flirc.io/lrs8)

Or is there a way to retrieve the current recorded IR sequence codes from FLIRC (V2)?

Share this post


Link to post
Share on other sites

@Cheater yes, you can. Open the Flirc GUI and go to File menu. There's a Device Log option. It opens Log window. You need to check the IR Debug checkbox. After that you'll get the IR sequence for each key press.

Share this post


Link to post
Share on other sites

@yawor Tnx! That does the trick! 

Do you know if there is already a EventGhost plugin for Flirc? I want to know if it's viable to develop a plugin for EventGhost, so I don't have to work with keyboard presses. I rather not want to sacrifice keyboard buttons / combinations. At the moment I have used keys like 'Alt + Ctrl + 1', 'Alt + Ctrl + F5', 'Alt + Ctrl + PageUp' and a whole lot more. 

Afbeeldingsresultaat voor Rm-f04

However my rm-f04 (shown above) remote control offers the whole set of buttons, times 4 (due to the contextual mode 'PVR / TV / DVD / AUDIO' buttons on top which enables the remote control to operate other devices).  Let's say I use 41 buttons (bottom part not included), than this makes it effective 164 IR codes and thus 164 keyboard presses/combinations which I cannot use anymore by myself, because they are attached to EventGhost to process a task. 

What I rather want to is to have all infrared events from the Flirc, displayed as raw input in EventGhost. These raw inputs can than be used to trigger events. No keyboard keys will be used. I know the Flirc was designed to be seen as a keyboard for the Operating System. 

What do you think? 

Share this post


Link to post
Share on other sites

Look around the How To forum. There's my topic somewhere describing how to use Flirc with EventGhost's Generic HID plugin. Well, at least partially. I've had to modify the Generic HID plugin a little for it to behave correctly. You'll find all the details in the topic.

--edit--

Ok, here's the topic:

Please take into account, that the attached custom generic hid plugin code is quite old. There might have been many changes to the EG plugins over the years and it may not work anymore.

Share this post


Link to post
Share on other sites

fwiw, the microsoft USB eHome IR dongle (for the windows MCE Media Center Edition) has the ability to transmit IR commands from windows.

The better part of a decade ago, I  successfully experimented sending IR signals with the eHome dongle using HIP software and tools from a site in Australia.

http://www.byremote.com.au/HIP/Default.htmI

Can't remember the details, but it was pretty straight forward to output IR commands to the dongle, so, I wonder if this software might be able to access the ir transmitter in the Gen2 Flirc.

My goal at the time was to see if I could build a locally served html page with mapped images of remotes so that when a button on the image was tapped, the link associated with that button would trigger HIP to issue the IR command for that button to the eHome dongle which would then control the device associated with that remote image.

Unfortunately, my low level programming skills were not up to the task and could not find anyone with the skills and the interest to help.

Sound interesting to anyone here?

Beverly Howard

 

 

Share this post


Link to post
Share on other sites
On 1/7/2019 at 11:38 AM, yawor said:

Look around the How To forum. There's my topic somewhere describing how to use Flirc with EventGhost's Generic HID plugin.

Unfortunately my EventGhost hangs / freezes when I add the Generic HID plugin. (Tested on 2 machines, EventGhost freezes when adding).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...