Max2Play on STRETCH + FHEM + 97_SB_SERVER problem

Max2Play Home Forums Max2Play on Raspberry PI Max2Play on STRETCH + FHEM + 97_SB_SERVER problem

Viewing 9 posts - 1 through 9 (of 9 total)
  • 11. Mai 2020 at 12:31 #48750

    Hi,

    I’m reporting a problem I encountered.
    I reinstalled this week-end my 2 raspberry pi3B on M2P with the last STRETCH image (249).

    When :
    – I installed FHEM
    – I copied the 97_SB_SERVER.pm and 98_SB_PLAYER.pm files in opt/fhem/FHEM directory (this file are in opt/fhem/contrib)
    – I restarted M2P
    then FHEM don’t work anymore (service is lauch but the web interface don’t load)

    So i reinstall M2P with the JESSIE image (244) and FHEM work very well with SB files.

    For information i use FHEM to control GPIO on LMS state.

    Cordially

    • This topic was modified 3 years, 11 months ago by remyb.
    12. Mai 2020 at 15:36 #48765

    Hi remyb,

    Do you have to copy the two SB files to the other directory for your application to work? Did the FHEM work before copying?

    12. Mai 2020 at 23:13 #48776

    Hi MarioM,

    1) Yes i have to copy the two filse from opt/fhem/contrib to opt/fhem/FHEM so that they are loaded. Otherwise i can’t use the commands DEFINE SB_SERVER in FHEM (https://wiki.fhem.de/wiki/Squeezebox_Modul).

    2) Yes, FHEM work before copying the files.

    19. November 2020 at 22:29 #50286

    Hi, did you manage to make it work 97_SB_SERVER.pm with the latest version of M2P?

    I plan to modify and update my installation and would like to upgrade to the latest version.

    this is very useful to activate the start of my power supply when LMS play.

    Thx

    24. November 2020 at 13:25 #50327

    Hi remyb,

    We haven’t looked into it yet. Unfortunately, the problem is very specific and therefore not very high on our agenda. It may be that the problem was automatically solved by updating the kernel versions. However, we have not checked. Please test our buster image yourself and let us know if it works.

    6. Dezember 2020 at 20:33 #50440

    Hi MarioM,

    Thx for your answer. I will receive a PI4 this week.
    I will test SB FHEM module on the new buster image.

    10. Dezember 2020 at 0:39 #50457

    hi,

    I received my RPI 4B and i installed the new M2P 1.53.
    After that i did all RPI update.

    it seem that 97_SB_SERVER.pm work with M2P 1.53 and FHEM 6.0.23320 with the file here :
    https://github.com/ChrisD70/FHEM-Modules/blob/master/autoupdate/sb/FHEM/97_SB_SERVER.pm
    This file is uptaded from 2019-04-15 while the file installed with FHEM is older.

    however

    when i reboot M2P FHEM didn’t work anymore (service is lauch but the web interface don’t load).
    To fix this
    -i had to click on „kill“ FHEM process. The process failed to stop but FHEM work again.
    -I had to comment this 2 lines in fhem.
    `#define initialUsbCheck notify global:INITIALIZED usb create
    #setuuid initialUsbCheck xxx`

    Now it’s work well for me.

    If somebody need this, i use fhem to activate a relay and a amplifier power supply if one of my squeezeboxplayer (multi usb DAC with multisqueeze plugin) play music:

    
    define squeezebox_Server SB_SERVER 192.168.1.xxx
    
    
    define SB_PLAYER_b825ebc171f0 SB_PLAYER b8:25:eb:c1:71:f0
    

    (auto detected by 98_SB_PLAYER.pm when SB_SERVER is define with the previous line)

    
    define etat_playstatus dummy 
    

    (a variable for save the state if one player is running)

    
    define GPIO17 RPI_GPIO 17
    attr GPIO17 direction output
    define GPIO17 RPI_GPIO 18
    attr GPIO18 direction output
    
    
    define SB_PLAYER_playStatus notify SB_PLAYER_b823ebc171f0:.*|SB_PLAYER_b824ebc171f0:.*|SB_PLAYER_b825ebc171f0:.*|SB_PLAYER_b826ebc171f0:.*|SB_PLAYER_b827ebc171f0:.*|SB_PLAYER_b828ebc171f0:.*|SB_PLAYER_b829ebc171f0:.* {\
    if (\
    ReadingsVal ("SB_PLAYER_b823ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b824ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b825ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b826ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b827ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b828ebc171f0", "playStatus", "") eq "playing" ||\
    ReadingsVal ("SB_PLAYER_b829ebc171f0", "playStatus", "") eq "playing"\
    )\
    {\
    	fhem ("set etat_playstatus on");;\
     }\
    else\
    {\
           fhem ("set etat_playstatus off");;\
     }\
    }
    

    (catch notification from squeezebox player and look the state of „playStatus“. If one of them is „playing“ etat_playstatus is set to „on“)

    
    define ETAT_AMPLIFICATEUR DOIF ([etat_playstatus] eq "on")\
    (set GPIO17 off)\
    (set GPIO18 off)\
    DOELSE\
    (set GPIO17 on)\
    (set GPIO18 on)
    attr ETAT_AMPLIFICATEUR wait 0,0:30,0
    

    (look for „etat_playstatus“ state. If „etat_playstatus“ is on then GPIO turn off and switch on the amplifier power supply (reverse logic pin). If „etat_playstatus“ is off then GPIO turn on and switch off the power supply after 30s).

    It’s work very well!

    • This reply was modified 3 years, 4 months ago by remyb.
    • This reply was modified 3 years, 4 months ago by remyb.
    • This reply was modified 3 years, 4 months ago by remyb.
    • This reply was modified 3 years, 4 months ago by remyb.
    10. Dezember 2020 at 0:50 #50461

    after edit my post was delete. Can you find it?

    • This reply was modified 3 years, 4 months ago by remyb.
    10. Dezember 2020 at 12:45 #50473

    Hi remyb,

    Your post has been marked as spam by our system. I’ve just unlocked it again. Thank you for sharing your experience with the FHEM solution!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.

Register here