Home of the Squeezebox™ & Transporter® network music players.
Page 7 of 10 FirstFirst ... 56789 ... LastLast
Results 61 to 70 of 95
  1. #61
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Quote Originally Posted by hopeful View Post
    I ran irw and, as suspected, just saw the [0] entries for all button presses. BTW, I am using the remote that came with my Squeezebox Boom.

    I've read the whole thread and I'm not sure what I need to change and, more importantly, how!

    I was going to temporarily remove the line
    suppress_repeat 6
    and then run itw again to see if I then get repeats and, if so, how many. However, when I've read your discussion of this before, it was concerned with suppressing all key repeats wasn't it?

    More basically, when I edit the lircd.conf file, how do I save it? It appears to be read-only.
    Copy the modified file to /tmp/lircd.conf , then from the pcp 3.02 web gui,

    click Beta tab at the bottom
    click Tweaks tab at the top
    click on LIRC page button about half way down.
    click on the Custom button

    save your pcp config and reboot.

    Note that you don't need to provide an lircrc file if you're using a squeezebox remote.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  2. #62
    Junior Member
    Join Date
    Nov 2015
    Posts
    26
    Thanks Ralphy
    I followed your instructions and deleted the lines
    min_repeat 1
    suppress_repeat 6

    I then ran irw again but still see no repeats when I press buttons on the squeezebox remote?

  3. #63
    Senior Member
    Join Date
    Apr 2006
    Posts
    111
    Running the latest version of PiCorePlayer with an official Pi 7" screen and a HiFiBerry Digi+. From what I've read, the Digi+ uses GPIO pins 2,3,16,18-21. I soldered on an IR receiver to use a 3.3V input and GPIO 22.

    Using the beta tweaks page, I installed LIRC, rebooted, then set the GPIO to 22 and rebooted again.

    At this point, nothing is happening. When I looked in the boot log, I found this:
    Code:
    tc@piCorePlayer:/dev$ dmesg | grep lirc
    [    8.272591] lirc_dev: IR Remote Control driver registered, major 243 
    [    8.273440] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
    [    9.243095] lirc_rpi: auto-detected active low receiver on GPIO pin 22
    [    9.243454] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
    [    9.243465] lirc_rpi: driver registered!
    [   16.452526] input: lircd as /devices/virtual/input/input1
    I had hoped to do a:
    Code:
    tc@piCorePlayer:/dev$ sudo mode2 -d /dev/lirc0 
    mode2: could not open /dev/lirc0
    mode2: default_init(): Device or resource busy
    ... any help would be appreciated!

  4. #64
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    863
    Quote Originally Posted by Juggler View Post
    Running the latest version of PiCorePlayer with an official Pi 7" screen and a HiFiBerry Digi+. From what I've read, the Digi+ uses GPIO pins 2,3,16,18-21. I soldered on an IR receiver to use a 3.3V input and GPIO 22.

    Using the beta tweaks page, I installed LIRC, rebooted, then set the GPIO to 22 and rebooted again.

    At this point, nothing is happening. When I looked in the boot log, I found this:
    Code:
    tc@piCorePlayer:/dev$ dmesg | grep lirc
    [    8.272591] lirc_dev: IR Remote Control driver registered, major 243 
    [    8.273440] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
    [    9.243095] lirc_rpi: auto-detected active low receiver on GPIO pin 22
    [    9.243454] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
    [    9.243465] lirc_rpi: driver registered!
    [   16.452526] input: lircd as /devices/virtual/input/input1
    I had hoped to do a:
    Code:
    tc@piCorePlayer:/dev$ sudo mode2 -d /dev/lirc0 
    mode2: could not open /dev/lirc0
    mode2: default_init(): Device or resource busy
    ... any help would be appreciated!
    Did you kill lircd before you tried the mode2 ?
    Otherwise Lircd will be using the resource
    Try irw
    Players: SliMP3,Squeezebox3 x3,Receiver,SqueezePlayer,PiCorePlayer x3,Wandboard
    Server: LMS Version: 7.9.1 - 1503129892 on Centos 7 VM on ESXi 6.5.0U1 on Dell T320
    Plugins: AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud
    Remotes: iPeng8/Orangesqueeze/PC/Jivelite
    Music: 383GB,1269 albums 17756 songs 4381 artists mostly FLACs

    Want a webapp ? See http://forums.slimdevices.com/showth...Webapp-for-LMS

  5. #65

    Picoreplayer and Sending IR Signals!

    Because i had some trouble to set this up i thought about writing this how to.
    i hope this helps someone!


    Picoreplayer and Sending IR Signals!

    Sending IR Signals via the GPIO on a Raspberry Zero (1.3) and Picoreplayer 3.xx (is used 3.09?) to e.g. switch on a receiver or active speakers from standby.

    Hardware:

    I used a Raspi Zero, a PHATDAC and an IR-LED and some resistors and cables.
    Connect the PHATDAC as seen here: (https://pinout.xyz/pinout/phat_dac)
    It needs BCM 18, 19 and 21 and ground and 5 V power (hopefully this is correct!, I just soldered every pin just to be sureů)


    Attach a IR LED to Pin 22 e.g. with the help of resistors 220Ω and 4.7Ω and a NPN Transistor compare here and adapt it to your hardware ( if somebody needs my setup, i can look it up later):
    http://www.raspberry-pi-geek.com/Arc...y-Pi-IR-remote or here https://klenzel.de/3588 or https://tutorials-raspberrypi.de/ras...teuerung-lirc/

    Download the correct Version of Picoreplayer for the Zero and flash it onto the SD (I used the non audio-optimized version).
    To have wifi working (I used a cheap red and black nano wifi usb receiver for 1 Euro) you have to create a file named newconfig.cfg with a file mager on your computer.
    Download the newconfig.cfg file from HERE (http://sourceforge.net/projects/pico...g.cfg/download)
    And edit the first section of newconfig.cfg file so it fits your wireless lan:

    Code:
    #########################
        # Edit the variables below to setup a wifi based system without LAN access
        # Change Wifi to "on". Valid options for Encryption are "WEP", "WPA" or "OPEN" 
        WIFI="on"
        SSID="wireless"
        PASSWORD="password"
        ENCRYPTION="WPA"
        # End Wifi setup
        
        ##########################
    Save the newconfig.cfg file to the SD-card.

    Use your SD-card for booting up the raspberry, then it will load your settings from the newconfig.cfg file and automatically connect to your wifi.
    Use the ip of the Raspi and open the webfrontend of picoreplayer.

    Click on beta (bottom).

    Set Squeezelite audio output to HIFIBERRYDAC (without+, selecting the wrong card here will result in a non-running squeezelite after reboot) if you have a PHATDAC as myself.

    Change the name of squeezelite, if you wish and go on to the tweaks page:

    Click on LIRC page button about half way down (on the tweaks page) and install LIRC.
    You need a LIRC.conf file fitting to your remote (at least for the buttons you want to use):
    if you have an IR receiver than via ssh (User: tc, Password: piCore) create an LIRC.conf file.
    if not than create it on another pc, or download it for the remote you want to replace

    Then:
    Copy the modified file (in my Case lircd-fernbedienungPEAQ.conf) to /tmp/lircd.conf via WINSCP or else (or upload it from the webgui , LIRC page (Custom button)).

    After uploading the LIRCD.conf file using the custom button, another button is created, there you can change the gpio of ir led to in my case 22 in the web gui.

    After that create a startup (custom command) command (on the tweaks page of the webgui on the bottom):

    Eg.: In my case
    Code:
    irsend SEND_ONCE PEAQ KEY_POWER
    or more general:
    Code:
    irsend SEND_ONCE ônameoftheremoteö KEY_POWER
    the name of the remote is specified in the LIRCd.conf file you just uploaded, normally under line 17.
    and restart picoreplayer.


    Then it should start your receiver (from standby in my case).


    Great that you guys included the IR function!!!Thanks!

  6. #66
    Senior Member
    Join Date
    Apr 2006
    Posts
    111
    PCP v3.11, Pi Touch screen

    I've successfully got an IR receiver working the Jivelite on my PCPľamazing work, thank you! My only remote is a Harmony Hub which I use to control the PCP, receiver, TV... etc. My official Harmony remote died several years ago, which is the reason I went the Pi route.

    My issue is that the Harmony Hub has pre-defined profiles (http://forums.slimdevices.com/showth...-Harmony-users) for a Squeezebox. I'm using the Squeezebox v3 profile.

    The problem is that the Hub is assuming PCP can use the discrete on/off commands, not the toggle power. Looking at the logs, the discrete on/off are not seen, whereas the toggle gives:
    Code:
    00000000768940bf 00 KEY_POWER Slim_Devices_Squeezebox3
    Is there a way to add the discrete power commands to PCP?

    cheers,
    J.

  7. #67
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Quote Originally Posted by Juggler View Post
    PCP v3.11, Pi Touch screen

    I've successfully got an IR receiver working the Jivelite on my PCPľamazing work, thank you! My only remote is a Harmony Hub which I use to control the PCP, receiver, TV... etc. My official Harmony remote died several years ago, which is the reason I went the Pi route.

    My issue is that the Harmony Hub has pre-defined profiles (http://forums.slimdevices.com/showth...-Harmony-users) for a Squeezebox. I'm using the Squeezebox v3 profile.

    The problem is that the Hub is assuming PCP can use the discrete on/off commands, not the toggle power. Looking at the logs, the discrete on/off are not seen, whereas the toggle gives:
    Code:
    00000000768940bf 00 KEY_POWER Slim_Devices_Squeezebox3
    Is there a way to add the discrete power commands to PCP?

    cheers,
    J.
    Currently, only the power toggle is exposed to the keyboard emulation layer of jivelite. The jivelite lircd config is emulating a keyboard currently.

    That was the easiest way I found to support many different remotes without having to modify jivelite/share/jive/jive/irMap_default.lua file for each set of ir remote codes.

    The IR implementation supports the discrete power on/off codes in addition to the toggle but on/off have not been mapped to the keyboard layer.

    The mapping is done in jivelite/share/jive/jive/InputToActionMap.lua

    I've been investigating changing the jivelite IR hooks to use the SDL lirc driver instead of the keyboard for pcp, but I have nothing useable ATM.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  8. #68
    Junior Member
    Join Date
    May 2017
    Posts
    4

    some questions to the lircrc file

    Hello,
    I'm completly new and I have installed an IR sensor from Logitech Ipod dock on my pi zero.
    I have created sucessfull the lircd.conf file and I have adjusted the lircrc file.

    To get a proper function I need one more thing:

    Toggle Play/Pause (the remote has only one button)

    EDIT: The volume up/down holding doesn't work. It's only possible to make one step.
    irw test shows the repetition of the signal.


    I hope it's clear where I need help and I'm looking forward to your answers.


    cheers,
    bastelfreak
    Last edited by bastelfreak; 2017-05-05 at 14:58.

  9. #69
    Senior Member
    Join Date
    Apr 2006
    Posts
    111
    Looking for the quickest/dirtiest solution. It looks like the power_on/power_off IR commands are already mapped in irActionMappings.press. Would it then be as simple as updating InputToActionMap.lua with the following:
    Code:
    charActionMappings.press = {
    .
    .
    .
    	["s"]  = "sleep",
    	["q"]  = "power",
    	["I"]  = "power_on",
    	["i"]  = "power_off",
    .
    .
    .
    Or am I oversimplifying?


    Quote Originally Posted by ralphy View Post
    Currently, only the power toggle is exposed to the keyboard emulation layer of jivelite. The jivelite lircd config is emulating a keyboard currently.

    That was the easiest way I found to support many different remotes without having to modify jivelite/share/jive/jive/irMap_default.lua file for each set of ir remote codes.

    The IR implementation supports the discrete power on/off codes in addition to the toggle but on/off have not been mapped to the keyboard layer.

    The mapping is done in jivelite/share/jive/jive/InputToActionMap.lua

    I've been investigating changing the jivelite IR hooks to use the SDL lirc driver instead of the keyboard for pcp, but I have nothing useable ATM.

  10. #70
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    1,794
    Yes, it's that simple, except that the lircd used in pcp does not support any key that requires the Shift key modifier, so you'll need to change "I" to another lower case letter. The lower letter k is available. See jivekeys.csv for the full key list.

    Just copy the modified InputToActionMap.lua to /home/tc/.jivelite/userpath/jive/InputToActionMap.lua and quit jivelite. When it automatically restarts jivelite will use your version instead of the one in the tcz package.

    I will add the distinct power on/off keys to the next pcp jivelite tcz package I build.

    Code:
    diff --git a/share/jive/jive/InputToActionMap.lua b/share/jive/jive/InputToActionMap.lua
    index a07177b..c98ec6f 100644
    --- a/share/jive/jive/InputToActionMap.lua
    +++ b/share/jive/jive/InputToActionMap.lua
    @@ -24,6 +24,8 @@ charActionMappings.press = {
            ["f"]  = "go_favorites",
            ["s"]  = "sleep",
            ["q"]  = "power",
    +      ["k"]  = "power_on",
    +      ["i"]  = "power_off",
            ["t"]  = "go_current_track_info",
            ["n"]  = "go_home_or_now_playing",
            ["m"]  = "create_mix",
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •