Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Feb 2008
    Posts
    123

    pcp4 + jivelite + lirc can't power on squeezelite player

    I have the same problem as mutant_matt described in this post
    I run pCP4 on a RPi3b+ with a TSOP38438 wired directly to GPIO27, 3V3 and GND: no R, no C.
    My display is a cheap 320x480 LCD I run by the piscreen overlay.

    My SB remote control works flawlessly when I configure pCP without jivelite.
    But as soon as I run jivelite I nearly can't switch on the squeezelite player by remote. Once on, the remote works nicely again and can also switch off the player.
    But when off, a press of the power button very briefly switches on the player and in an instant the player goes off again.
    irw tells me that that only a single key-press is recorded.
    Sometimes I am lucky and two, three, or four presses of the power button on the remote start the player. But most often it just flashes up and goes off again.

    Any idea how I can make a remote work also for jivelite?
    What is the difference between the jivelite and non-jivelite configurations? I tried swapping the lircd.conf file for a test but to no avail.
    What can I test?

    Thanks in advance

    edit: I just realised that any keypress will start the player without problems. Its only the power button that doesn't work properly. I did try values from 0 - 10 for suppress_repeat in the config file. But nothing changes.
    Last edited by ElFishi; 2018-11-21 at 16:39. Reason: extra info

  2. #2
    Junior Member
    Join Date
    Apr 2010
    Posts
    18
    OK, I have a new theory (though, technically it's not my theory).

    I had my mate come round yesterday. He's the one I mentioned in the previous thread who is a bit of an electronics whizz. He looked at the IR sensor datasheet and the previous thread and doesn't think the suggested cap and resistor as suggested in the "application" diagram on the vendor datasheet would have anything to do with this, especially when IRW is showing single events (mostly).

    However, his theory is that it's to do with timing, and button press vs button release. He spends his day job working with interfaces ("screens and buttons") for a large car manufactuerer making car radios work, and this is the kind of thing he spends half his life working on.

    I wonder if it's not apparently been seen by very many people (yet) is because I'm running on a 3B+ and most (or at least many) people up until now have been using this IR setup on an older/slower Pi?

    Anyway, we looked at the config yesterday and whilst playing with it we realised that if you hold the power button long enough for the auto-repeat to kick in, it *will* then reliably turn Jive on (or off). He thinks it's a timing issue, coupled with the fact that there there might be an event in Jive taking place for both button press and button hold/release.

    His suggestion is, to remove the button press event for power, to be left with a hold event for power only in /opt/jivelite/share/jive/jive/InputToActionMap.lua. That would mean you would have to press and hold the power button to turn it on and off, but actually I like that idea, to make it a little more deliberate to turn it on or off.

    What would be the "best" (easiest/quickest) way of changing (removing) the "on press" event for power in /opt/jivelite/share/jive/jive/InputToActionMap.lua so I could test this (presumably, if you change this file, you need to restart Jive to re-read the file?) - is it possible to do this without making the change permanent, and to avoid having to do a reboot, so I can test this? Obviously, if it does fix it, I'd make it persistent later.

    I am also tempted to replace my 3B+ with a spare 2B I have lying around, to see if just changing to a slower Pi makes any difference. I have a pretty much standard piCore setup (just Pi 3B+, + 7" touch screen + Squeezelite + Jive + lirc, using inbuilt audio out (for now), with the "standard" IR module on the "default" GPIO pins. I'd expect many more people to have the same problem as me, but it seems not a common problem, at least at the moment.

    One other quick one, Raplhy, I thought that the Harmony discreet power-on and power-off were now part of the standard config, but it seems it's not enabled in my config (piCorePlayer v4.0)?

    I need to find time to play further, but any thoughts/comments/suggestions?

    Cheers,

    Matt.

  3. #3
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,003
    Copy your modified InputToActionMap.lua file into /home/tc/.jivelite/userpath/jive/jive

    You'll need to create the two jive folders as root, yes you need both.

    For example;

    cd /home/tc/.jivelite/userpath/
    sudo mkdir -p jive/jive

    Backup your pcp configuration and quit jivelite. On restart jivelite will read your modified file instead of the default.
    Ralphy

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

  4. #4
    Junior Member
    Join Date
    Apr 2010
    Posts
    18
    Super, thanks.

    I did that but it's deffo not reading the file in home:

    /home/tc/.jivelite/userpath/jive/jive/InputToActionMap.lua

    So, I put the file there, ran: pcp bu
    did: ps -ef | grep jive
    did: kill <the pid of /opt/jivelite/bin/jivelite >

    Watched the Pi screen restart Jive, did a test, same result.

    I removed ALL the power references in the file, to prove the power button no longer works at all, as there are now zero power entries, but it all still works exactly the same. It's gotta be it's not reading, /home/tc/.jivelite/userpath/jive/jive/InputToActionMap.lua, right?

    Permissions perhaps?

    Any ideas?

    Appreciate the help!

    Cheers,

    Matt.

  5. #5
    Senior Member
    Join Date
    Feb 2008
    Posts
    123
    Erm,

    count me out, I can't reproduce the fault in my system.
    I was chasing problems with spotty, synce'd players, flaky Wifi, the works.
    I must have pushed all buttons I found in pCP, but I can't honestly not tell you which button could have helped.
    Sry

  6. #6
    Junior Member
    Join Date
    Apr 2010
    Posts
    18
    Quote Originally Posted by ElFishi View Post
    Erm,
    count me out, I can't reproduce the fault in my system.
    I was chasing problems with spotty, synce'd players, flaky Wifi, the works.
    I must have pushed all buttons I found in pCP, but I can't honestly not tell you which button could have helped.
    Sry
    I did find that a long press on the power button (especially when Jive is off), will turn it on reliably (wait until it's turned on before releasing the button). If you're watching irw whist doing this, you'll see it's once the auto-repeat kicks in that it turns on without instantly turning off again.

    Turning it off with the remote (which uses power-toggle) is fine, it's instant and it never comes back on again. As you found, you can also reliably turn it on with any other button other than power.

    Just for a bit more background.

    I've now tried 755 permissions on the file, but that didn't seem to help. It really doesn't seem to want to read the version in /home...

    root@piCorePlayer:/home/tc# ls -l /home/tc/.jivelite/userpath/jive/jive/InputToActionMap.lua
    -rwxrwxr-x 1 root staff 7561 Nov 27 17:54 /home/tc/.jivelite/userpath/jive/jive/InputToActionMap.lua

  7. #7
    Senior Member
    Join Date
    Feb 2008
    Posts
    123
    Quote Originally Posted by mutant_matt View Post
    I did find that a long press on the power button (especially when Jive is off), will turn it on reliably (wait until it's turned on before releasing the button). If you're watching irw whist doing this, you'll see it's once the auto-repeat kicks in that it turns on without instantly turning off again.
    When I still had the problem, long presses were hit and miss. I use the Power On/Off GPIO setting in Squeezelite to switch the backlight of my screen. I could see the screen flicker when pressing the power button for longer. But I had a (perceived) 50% chance of ending - and staying - in "on" state.

  8. #8
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,003
    Sorry it should only be one jive folder according to some of my previous posts.

    Home directory is different than /opt/jivelite
    Last edited by ralphy; 2018-11-28 at 05:17.
    Ralphy

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

  9. #9
    Senior Member
    Join Date
    Feb 2008
    Posts
    123
    OK, I'm back.

    I put the raspberry and the screen in a new case, changed some wiring and fired it up again. It turns out the system works, but the touchscreen has gone numb. I switched off jivelite by setting the autostart to no and rebooting to try ts_test. After I set jivelite autostart to yes and rebooted, the IR power-on problem was back.

Posting Permissions

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