@reviewsfornerds Hi. Apologies for the late reply. Was away for the weekend.
Can you share your script that you are calling? Also the output of wlr-randr
.
@reviewsfornerds Hi. Apologies for the late reply. Was away for the weekend.
Can you share your script that you are calling? Also the output of wlr-randr
.
Hey guys,
Just a little note for for those who are struggling.
I have recently upgraded from my RPi 3B+ to RPi 5 4GB. MM has been running fine for a while now and all my modules are running sweet.
One thing I have been struggling with was getting the Pi to shut off the output at night and then on again in the morning. The old way, vcgencmd display_power 0
and vcgencmd display_power 1
does not work on the RPi5.
In order to get things working again, and after a lot of research I have managed to get this working now. Below are 2 scripts that I have which are called from crontab at specified times.
You have to ensure that both of the below scripts are executeable. To do this you need to run the following command. chmod +x mon.sh mof.sh
from the command prompt.
mof.sh - Monitor Off.
Create a file: nano mof.sh
and add the below.
#!/bin/bash
export WAYLAND_DISPLAY=wayland-1
export XDG_RUNTIME_DIR=/run/user/1000
/usr/bin/wlr-randr --output HDMI-A-1 --off
Explanation
mon.sh - Monitor On
Create a file: nano mon.sh
and add the below to it.
#!/bin/bash
export WAYLAND_DISPLAY=wayland-1
export XDG_RUNTIME_DIR=/run/user/1000
/usr/bin/wlr-randr --output HDMI-A-1 --on --mode 1920x1080@60Hz --transform 270
Explanation
--mode 1929x1080@60Hz
and to ensure it is flipped 90 degrees I pass the option --transform 270
.To obtain your current screen settings you run wlr-randr
from the command prompt and you will be shown the current settings for your mirror. You can then use those values and substitute them for the values above if yours is different. This will also confirm if your monitor is HDMI-A-1
or if it is called something else.
Crontab
To instantiate a crontab you do crontab -e
from the command line.
Add the following entries at the bottom of the file.
00 06 * * * /home/pi/mon.sh >> /home/pi/mon.log 2>&1
00 21 * * * /home/pi/mof.sh >> /home/pi/mof.log 2>&1
From the above, it will turn the output on at 6am and turn it off at 9pm.
Hope this helps somebody.
@dadAndEl Check that it is not set to private as I could not see it as well now.
@manu85340 Hi. I have updated the module. You can now do a gitpull and test if all is working ok. There seem to have been an issue with the call that refreshes the league data. Should be working fine now.
@manu85340 I have now looked at the API and it looks like the data has changed. I need to have a look at it a little more. Will advise when I have an update available.
@manu85340 You can have the rankings but not the scores. As they are out of date, they will not be displayed unless you set the apiSportDaysPast
value to say 365 then they will display again.
@manu85340 No. That is not how it works. The module looks at the date of each game and does calculations based on your apiSportDaysPast
and apiSportsDaysFuture
configs to work out if there is games data to display.
If I change the apiSportDaysPast
config to 124 days then I get data displayed. But after a few days that will disappear again.
Until a new league season starts you will not have data again. Unless you follow an active league.