**** BEGIN LOGGING AT Mon Sep 12 02:59:57 2022 Sep 12 06:04:11 is there a way to use cron to play music at a certain time each day? Sep 12 17:17:16 I'm trying to use a 1-wire temp sensor using the instructions at https://elinux.org/EBC_Exercise_31_Dallas_1-Wire Sep 12 17:19:04 It works using the default P9_12 pin, but I need to move it to P8_7.  I built a new overlay file as instructed, but when I boot I get errors saying "pinctrl-single 44e10800.pinmux: pin PIN30 already requested by ocp:P9_12_pinmux; cannot claim for onewire" Sep 12 17:21:40 I notice the instructions for moving the pin start with "Follow the unconfiguring instructions for the GPIO pin of your choice", which I haven't done (not sure how), but I'm not sure that's the problem because the error suggests that P9_12 is still claiming the 1-wire role. Sep 12 17:21:43 Suggestions? Sep 12 17:23:22 Here's the full error message, btw: https://pastebin.com/8GDgKj9n Sep 12 17:26:27 Oops, sorry: I meant I want to move to pin P8_11. Sep 12 17:28:08 Actually, pin P8_7 or P8_11 would suffice. Sep 12 17:48:43 Guest4494: my overlay-utils has an example for 1-wire => https://github.com/mvduin/overlay-utils/blob/master/onewire.dtsi Sep 12 17:49:36 the USES_PIN macro of overlay-utils will disable cape-universal and the exported gpio for that pin, resolving the conflict Sep 12 17:50:04 the ability to avoid gpio conflicts requires a sufficiently new kernel: https://pastebin.com/2w2XtJBP Sep 12 17:51:04 my guess would be the wiki page you linked to is probably very old and predates cape-universal Sep 12 17:54:04 brb Sep 12 17:54:51 zmatt, hey thanks, that looks promising.  How do I use overlay-utils?  Does it generate dtbo files? Sep 12 18:01:18 Oops, meeting time.   Back in a while... Sep 12 18:04:12 Guest4494: yeah, e.g. "make onewire.dtbo" Sep 12 18:05:27 Guest4494: btw, do be aware that w1-gpio (onewire via a gpio) is inherently inefficient and unreliable since onewire requires precise timing which is difficult to make using a gpio controlled by linux... so whenever possible I'd recommend using i2c sensors rather than onewire sensors Sep 12 19:33:02 Good evening Sep 12 19:42:16 Hello! Sep 12 19:42:31 Hope everyone is doing good today Sep 12 19:44:31 I have a question about cron Sep 12 19:45:08 I recently setup my beagleboard with pulseaudio and want to know if I can use cron to control when my music will playback Sep 12 19:58:37 I am new to beagleboard and have no experience Sep 12 20:04:01 DoubleA: just like last time you left out the important bit in your setup: mpd Sep 12 20:04:08 pulseaudio is irrelevant, it's about mpd Sep 12 20:04:31 you can use mpc to control mpd Sep 12 20:07:01 e.g. "mpc play" will start playing songs from the start of the queue Sep 12 20:07:59 see "man mpc" for documentation Sep 12 20:12:47 Hello my friend! Sep 12 20:12:58 I got the music working after we last spoke Sep 12 20:33:03 I am attempting to install cron and once it finished installing, it said crontab: usage error : no arguments permitted after this option Sep 12 20:33:21 sudo apt-get update Sep 12 20:33:22 sudo apt-get install cron Sep 12 20:33:38 ^^^these commands were used to install cron Sep 12 20:33:51 uhh, cron is installed by default Sep 12 20:34:47 not on debian Sep 12 20:34:52 yes Sep 12 20:35:19 i tried running the crontab -e [username] command and that was the error Sep 12 20:36:15 uhh, based on the manpage that syntax is wrong Sep 12 20:36:24 you should just run crontab without arguments anyway Sep 12 20:36:27 i looked into the same forum i got the instructions from and it said that it wasn't installed by default so i assumed that i had to install Sep 12 20:36:32 I think Sep 12 20:36:44 no sorry, crontab -e Sep 12 20:36:47 without any further argument Sep 12 20:37:10 its now telling me to select editor Sep 12 20:37:20 recommends /bin/nano Sep 12 20:37:36 sounds fine, nano is the same as pico, which you've been using so far Sep 12 20:38:49 perfect Sep 12 20:39:14 i just have to figure out how to create a cron command for mpc now Sep 12 20:40:05 zmatt, I edited onewire.dtsi to change it to use the pin P8_7, but when I run make, I get an error on line 19 which is the PIN_PULLUP() call.  What is that second parameter to PIN_PULLUP()?  (Default value is 7) Sep 12 20:41:58 Guest4494: here's the snippet modified for P8.07: https://pastebin.com/raw/tysGESx3 Sep 12 20:42:02 mode 7 is gpio mode Sep 12 20:43:44 Ah, need a leading 0 on the pin #beagle, that is, P8_07 not P8_7. Sep 12 20:44:20 yep, you can find those macros here: https://github.com/mvduin/overlay-utils/blob/master/include/bone/black.h .. it also lists the gpio number for each of them in comments Sep 12 20:45:56 the second argument to the PIN_PULLUP/PIN_PULLDN/PIN_NOPULL macros is the mux mode, range 0-7, where mode 7 is gpio mode for all pins and the remaining modes vary per pin Sep 12 20:52:16 It compiles now, and I've updated uEnv.txt to use the new onewire.dtbo, and when the BBB boots, I'm not seeing the errors anymore. Sep 12 20:52:47 But there's nothing under /sys/class/hwmon, i.e., an hwmon0 directory. Sep 12 20:53:22 Oops, it's there.  Apparently I was too impatient. Sep 12 20:53:52 patience is a virtue Sep 12 20:54:17 That's probably why no one ever called me virtuous. Sep 12 20:54:22 lol Sep 12 20:55:25 I did some research about cron and want to play a song at 3:15 on 09/12 from mpc Sep 12 20:55:34 is this the right command? Sep 12 20:55:50 15 15 12 09 %songname% play Sep 12 20:56:08 no Sep 12 20:56:24 15 15 12 09 * mpc %songname% play Sep 12 20:56:38 ^^^is this right? Sep 12 20:57:13 closer but it's just mpc play to start playing from the start of the queue, i.e. that wil work for when you put the song in the queue in advance Sep 12 20:57:31 BTW, saw your note about 1-wire being unreliable.  It's okay in our case since we're looking at temperature change trends and we sample once per minute then average those all together to look for trends.  So, the measurements don't have to be terribly precise.  And we already have the sensors. Sep 12 20:57:38 mpc also has a searchplay command if you want it to play a specific song from your music library Sep 12 20:58:21 DoubleA: I suggest getting the mpc command right by executing it manually *before* attempting to use cron to execute it at a particular time Sep 12 20:58:36 Guest4494: fair enough Sep 12 20:59:40 ok Sep 12 21:00:10 But thanks for the tip.  We're just prototyping some stuff currently; down the road we may need more precision, and if so I'll push for I2C-based sensors. Sep 12 21:11:04 how do i remove songs from mpd Sep 12 21:11:20 from the queue Sep 12 21:12:22 nevermind i just had to update Sep 12 21:13:04 note that you can also enable "consume" mode to automatically remove songs from the queue after they've played Sep 12 21:13:51 i just changed the name of the song on the sd so that it would be easier to reference Sep 12 21:14:43 for the command i put mpc search play %songname% Sep 12 21:14:48 is that correct? Sep 12 21:15:00 no Sep 12 21:15:48 do we have to include the .mp3 extension perhaps? Sep 12 21:16:36 you can search by "artist, album, title, track, name, genre, date, composer, performer, comment, disc, filename, or any (to match any tag)" Sep 12 21:16:57 i have only the title of the track Sep 12 21:17:06 e.g. mpc searchplay filename "name-of-file.mp3" Sep 12 21:17:33 or mpc searchplay title "Title Of Song" Sep 12 21:18:08 (quotes are optional if the search query doesn't contain any spaces or other special chars) Sep 12 21:18:41 it does a substring search so even when searching for the filename, including the .mp3 extension in the search query is optional Sep 12 21:20:57 it says playlist contains no matching song Sep 12 21:21:24 huh it searches the playlist not the library? that's... not what I expected Sep 12 21:23:54 oh search, 'search' searches the library but 'searchplay' searches the queue Sep 12 21:24:39 i will try search Sep 12 21:24:48 search will just return the filename though Sep 12 21:25:14 your right Sep 12 21:25:16 I guess you need to add it to the queue using the add command and then use searchplay to play it Sep 12 21:25:25 or clear the queue, add the song, and then just play Sep 12 21:27:09 so i could do mpc add title song.mp3  followed by a mpc searchplay title song.mp3 Sep 12 21:27:13 https://pastebin.com/raw/PQGUSN54 Sep 12 21:27:48 (the -q suppresses the status information from mpc) Sep 12 21:29:35 to combine them all on one line use && between then: Sep 12 21:29:46 mpc -q clear && mpc -q add filename.mp3 && mpc -q play Sep 12 21:31:46 it says mpc-q :command not found Sep 12 21:31:51 i will try without the q Sep 12 21:31:57 DoubleA: spaces are not optional Sep 12 21:32:00 please pay attention Sep 12 21:32:46 i didn't know since most of the commands involved spacing Sep 12 21:33:01 ? Sep 12 21:33:17 do we have to add spacing or not? Sep 12 21:33:22 i added spaces Sep 12 21:33:40 I said mpc -q ... you evidently typed mpc-q Sep 12 21:34:08 the former is the "mpc" command with the -q flag passed as argument Sep 12 21:34:25 the latter is an attempt to execute the (non-existent) command named "mpc-q" Sep 12 21:34:31 apologies for the mistakes Sep 12 21:37:13 it works Sep 12 21:37:48 i just have a huge delay from when it starts playing on the beagleboard until it starts playing on my speakers Sep 12 21:38:26 well yeah, that's a consequence of how you've setup this whole architecture Sep 12 21:38:53 you're basically running an internet radio station hosted on your beaglebone and have your devices play that Sep 12 21:39:26 there will be a significant amount of buffering going on Sep 12 21:39:56 since normally people would have no way to notice latency when listening to an internet radio station Sep 12 21:40:23 even if the beagleboard is connected via ethernet Sep 12 21:40:35 how it's connected is irrelevant Sep 12 21:40:36 i tried to connect the board via wifi Sep 12 21:40:51 the wifi didn't work even when the agent was registered Sep 12 22:37:14 hello Sep 12 22:37:39 i tried the crontab and used the following command Sep 12 22:37:50 it didn't work Sep 12 22:38:40 35 16 12 09 * mpc - q clear && mpc -q add song.mp3 && mp -q play Sep 12 22:39:13 it should have played at 4:35 today(09/12) but it didn't Sep 12 22:50:24 DoubleA: is the beaglebone's timezone set to your local timezone? Sep 12 22:51:19 how do i know that? Sep 12 22:51:36 if you execute the "date" command it'll show you the current time and timezone Sep 12 22:51:59 its on UTC not CST Sep 12 22:52:05 how do i change it to cst Sep 12 22:52:29 i assumed that connecting it to the internet would set the time automatically Sep 12 22:52:35 time yes, timezone no Sep 12 22:53:11 you can list valid timezones using: timedatectl list-timezones Sep 12 22:54:42 once i find the timezone, what should i do Sep 12 22:55:01 sudo timedatectl set-timezone America/whatever Sep 12 22:55:30 ok Sep 12 22:55:33 i will try now Sep 12 22:57:22 does it stick or will it be reset upon reboot? Sep 12 22:57:28 it's persistent Sep 12 22:57:35 i am asking due to reading the forum from another site Sep 12 22:59:45 my guess would be you may need to restart cron (or the entire beaglebone) for it to use the newly selected timezone Sep 13 02:04:53 For toggling GPIOs using python, is Adafruit's library still the way to go?  Or is there an alternative since Adafruit's attention on the BB seems to have diminished? Sep 13 02:05:45 pretty straightforward to just use pure python... https://pastebin.com/UwDFNb9Z Sep 13 02:07:16 (using named gpios here requires that you have an udev rule that created symlinks in /dev/gpio/: https://pastebin.com/MMC6u7pR ) Sep 13 02:07:55 *that creates Sep 13 02:13:14 Thank you zmatt.  That's just the kind of thing I was looking for. **** ENDING LOGGING AT Tue Sep 13 02:59:57 2022