Home of the Squeezebox™ & Transporter® network music players.
Page 18 of 19 FirstFirst ... 816171819 LastLast
Results 171 to 180 of 187
  1. #171
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Quote Originally Posted by Greg Erskine View Post
    hi pputzer,

    Please keep an eye on the following thread, IR is changing for pCP5.0.0
    Thanks, Greg, I've seen it. I don't think it applies to my usecase (IR sending, not receiving; and the solution above is GPIO-based).


    Gesendet von iPad mit Tapatalk

  2. #172
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,292
    Jivelite doesn't really create local events. It responds to keyboard presses, or server commands, and sends requests to the server. You will need to create your own handler monitoring the player state from the server.

    If your device is also running LMS, then IR Blaster plugin would work if updated for the RPI.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #173
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Yes, I've reread the LIRC documentation and it looks like events only work in the other direction. I had already found a python implementation (https://github.com/ahebrank/squeezeb.../watchpower.py) as stop gap.

    While I'd like to use IRBlaster, I wonder if it will work without a helper application on the player. Having a local daemon configured via an rc file (or the pCP web interface) might be a better longterm solution. What shells/interpreters are available on pCP by default? Ash, Perl, ... ?


    Gesendet von iPhone mit Tapatalk

  4. #174
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,292
    Busybox ash, and micropython.

    If you are running LMS, then Perl is obviously there too.

    You can add others if you want
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #175
    @pputzer: If it's just the power you want to control, you're in luck: squeezelite already offers the option to call an external script on power events.

    If you want to control other things (I'd guess: volume) as well, you're in a similar boat as me. I have squeezelite running (although not in pCP) on three Pis connected to external amps and am also looking for a solution to control these through the LMS/Squeeze controls. I think doing this via an external scripts presents challenges: Besides controlling the amp, the script would also need to a) keep squeezelite from changing it's internal volume setting as well and b) somehow report a suitable volume back to LMS.

    I see basically two ways to go here: Write an LMS plugin or patch squeezelite to allow it to call on external script on volume events as well. The latter is probably easier. The former might be more flexible but is also somewhat challenging: I found that plugin development for LMS is not very well documented and what documentation there is tends to be quite old, so the only useful documentation is basicall the source code. I don't know about your Perl skills but mine are rather basic and Perl is not exactly famous for its readability.

    If you'd like to join forces in following either of these (or a completely different) approaches, let me know. In that case I'd suggest we brainstorm in a separate thread.

  6. #176
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Quote Originally Posted by Manul View Post
    @pputzer: If it's just the power you want to control, you're in luck: squeezelite already offers the option to call an external script on power events.
    I've seen that option, but I didn't seen any information about passed parameters, and I don't want a simple "power toggle", so I dismissed that path.

    Quote Originally Posted by Manul View Post
    If you want to control other things (I'd guess: volume) as well, you're in a similar boat as me. I have squeezelite running (although not in pCP) on three Pis connected to external amps and am also looking for a solution to control these through the LMS/Squeeze controls. I think doing this via an external scripts presents challenges: Besides controlling the amp, the script would also need to a) keep squeezelite from changing it's internal volume setting as well and b) somehow report a suitable volume back to LMS.
    Yes, I'd like to include volume as well (like the old IR Blaster plugin does for the genuine squeezeboxes). I'm exploring whether subscribing to these events together with the VolumeLock plugin is a feasible solution. The Python script I linked to works well in principle (for power events currently), but could easily extended to other subscribable events more flexible configuration.

    Quote Originally Posted by Manul View Post
    I see basically two ways to go here: Write an LMS plugin or patch squeezelite to allow it to call on external script on volume events as well. The latter is probably easier. The former might be more flexible but is also somewhat challenging: I found that plugin development for LMS is not very well documented and what documentation there is tends to be quite old, so the only useful documentation is basicall the source code. I don't know about your Perl skills but mine are rather basic and Perl is not exactly famous for its readability.

    If you'd like to join forces in following either of these (or a completely different) approaches, let me know. In that case I'd suggest we brainstorm in a separate thread.
    With volume, some kind of plugin is surely needed (I think I remember that the author of IR Blaster wrote that this was one of the major challenges in writing that plugin). I'm hoping VolumeLock will be sufficient. Anyway, yes, I'm all for joining forces and I already have some ideas for an initial implementation.

  7. #177
    Quote Originally Posted by pputzer View Post
    I've seen that option, but I didn't seen any information about passed parameters, and I don't want a simple "power toggle", so I dismissed that path.
    The passed parameters are 1 for power on and 0 for power off, so no toggle there. I can't remember whether I found that information somewhere or just tried it out with a dummy script.

    Quote Originally Posted by pputzer View Post
    With volume, some kind of plugin is surely needed (I think I remember that the author of IR Blaster wrote that this was one of the major challenges in writing that plugin). I'm hoping VolumeLock will be sufficient. Anyway, yes, I'm all for joining forces and I already have some ideas for an initial implementation.
    Great. I tried volume lock and had two issues with it: a) it fixes the volume at 100% which might not be optimal for analog outputs and b) it only allows (surprise, surprise) for a fixed volume. I have one digital amp the volume of which I could actually determine and report back to LMS. Even for those with just relative volume control, I think it would be nice if the "official" volume in LMS was not fixed but limited to, say, 5..95 so one could at least have a relative indication of how the volume changed compared to the start of the player.

    Would you like to open a thread for brainstorming, possibly in the developer's forum? I probably won't be able to contribute much before beginning to mid of next week though.

  8. #178
    Senior Member
    Join Date
    Mar 2010
    Posts
    114
    Quote Originally Posted by Manul View Post
    Great. I tried volume lock and had two issues with it: a) it fixes the volume at 100% which might not be optimal for analog outputs and b) it only allows (surprise, surprise) for a fixed volume. I have one digital amp the volume of which I could actually determine and report back to LMS. Even for those with just relative volume control, I think it would be nice if the "official" volume in LMS was not fixed but limited to, say, 5..95 so one could at least have a relative indication of how the volume changed compared to the start of the player.

    Would you like to open a thread for brainstorming, possibly in the developer's forum? I probably won't be able to contribute much before beginning to mid of next week though.
    I've opened a new thread in the Developers' forum. Let's continue the discussion there.

  9. #179
    Senior Member Jeff07971's Avatar
    Join Date
    Aug 2011
    Location
    London, England
    Posts
    1,383
    Great. I tried volume lock and had two issues with it: a) it fixes the volume at 100% which might not be optimal for analog outputs and b) it only allows (surprise, surprise) for a fixed volume.
    That is not the case, you can set a maximum volume also

    Jeff
    Players: SliMP3,Squeezebox3 x3,Receiver,SqueezeLite-X,PiCorePlayer x3
    Server: LMS Version: Latest Nightly on Centos 8.0 VM on ESXi 6.5.0U3 on Dell T320
    Plugins: AutoRescan/BBCiPlayer/PowerSave/PowerSwitchIII/Squeezecloud/Spotty/Player Groups
    Remotes: iPeng9/Orangesqueeze/PC/Jivelite/SqueezeLite-X
    Music: 522GB,1.5K albums with 25K songs by 5K artists mostly FLACs

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

  10. #180

    My custom .lircrc is only read if squeezelite is running as tc

    [edit, added piCorePlayer version info]

    I've been getting a headless pi & IQaudio DAC+ working with the little silver Apple remote (A1294). I'm almost there (after a bit of digging and poking).

    I'm using piCorePlayer v4.1.0:

    Code:
    spare | piCorePlayer v4.1.0 | linux 4.14.81-pcpCore_v7 | piCore v9.2pCP | Squeezelite v1.9.0-1121-pCP | No Timezone
    I've installed custom .lircrc and lircd.conf files via the "Custom" button under the LIRC button on the Tweaks page (w/ the Beta tab selected).

    The contents of those files are the result of Internet searches, for the record, they're here: https://gist.github.com/hartzell/209...36890806211da3. Be careful, the lircd.conf file from the remotes table/page on the LIRC web site doesn't work, perhaps because it's for an older version of LIRC or perhaps because it's broken....

    My last problem is that squeezelight fails to load the .lircrc file when running as root.

    With debug logging enabled in squeezelight, I see this in /var/log/pcp_squeezelite.log:

    Code:
    [22:49:43.733760] ir_init:227 error reading config: ~/.lircrc
    After a bunch of poking and prodding, I noticed that the remote would work if I ssh'ed in to the system, killed squeezelite and then ran it by hand (e.g. using the command string available on the squeezelite page). The config file error (above) did not get logged.

    It works when running as tc or when run as tc with sudo. It does not work when started via the web interface or if I `sudo su` and then start it from the root account.

    I suspect that the problem is that when running as root it's looking for `/root/.lircrc`, which doesn't exist, but when running as tc it uses `/home/tc/.lircrc`.

    I tried unpacking /mnt/mmcblk0p2/tce/mydata.tgz, adding `/root/.lircrc`, repacking it, and rebooting, but the mydata.tgz file was replaced and .... I suspect that I don't know/remember the proper magic for adding my own things by hand.

    I see a couple of ways to work around this:

    - install the custom .lircrc file in /root
    - install the custom .lircrc file in /usr/local/etc/lirc/lircrc (squeezelite is using liblirc_client, which seems to also check /usr/local/etc/lirc/lircrc)
    - invoke provide the path to the .lircrc file as the argument to the `-i` parameter when we invoke squeezelite
    Last edited by hartzell; 2019-07-06 at 16:43.

Posting Permissions

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