Max2Play Home › Forums › Max2Play on Raspberry PI › Max2Play on STRETCH + FHEM + 97_SB_SERVER problem
- This topic has 8 replies, 2 voices, and was last updated 4 years ago by MarioM Moderator.
-
Posted in: Max2Play on Raspberry PI
-
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 4 years, 7 months ago by remyb.
12. Mai 2020 at 15:36 #48765Hi 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 #48776Hi 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 #50286Hi, 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 #50327Hi 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 #50440Hi 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 #50457hi,
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!
10. Dezember 2020 at 12:45 #50473Hi 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!
-
You must be logged in to reply to this topic.