mirror of
https://github.com/acatoire/bipbipzizik.git
synced 2026-03-10 08:01:18 +00:00
Functional ClearQueu mode
Add Command mode
This commit is contained in:
@@ -72,6 +72,10 @@ sudo systemctl start musiccards.service
|
||||
```bash
|
||||
sudo systemctl status musiccards.service
|
||||
```
|
||||
- Restart service after file update
|
||||
```bash
|
||||
sudo systemctl restart musiccards.service
|
||||
```
|
||||
|
||||
## HomeAssistant Setup for Google Music
|
||||
TO BE CHECKED
|
||||
|
||||
9
box.py
9
box.py
@@ -43,17 +43,18 @@ while True:
|
||||
cardList.update_list()
|
||||
|
||||
# Find the card in bdd
|
||||
card = cardList.get_card(read_id).cmd
|
||||
card = cardList.get_card(read_id)
|
||||
|
||||
if card is not None:
|
||||
# Card execution
|
||||
print('Command : ', card.cmd)
|
||||
print('Modes : ', card.mode)
|
||||
print('Modes : ', card.str_modes())
|
||||
|
||||
# Update the previous card memory
|
||||
if (previousCard == read_id) and ("cancel" == cfg.multiReadMode):
|
||||
if (previousCard == read_id) and ("cancel" == cfg.multiReadMode) and (not card.has_mode("Command")):
|
||||
# Cancel the read
|
||||
print('Multi read : card canceled')
|
||||
else:
|
||||
# Update the previous card memory
|
||||
previousCard = read_id
|
||||
|
||||
if card.has_mode("ClearQueue"):
|
||||
|
||||
10
cardList.csv
10
cardList.csv
@@ -1,11 +1,13 @@
|
||||
|
||||
# Card Id, Command, Mode, Comment
|
||||
|
||||
# Command cards
|
||||
0013397903,playpause, Command,
|
||||
0013403195,next, Command,
|
||||
0013354327,volume/+5, Command,
|
||||
0005690629,volume/-5, Command,
|
||||
|
||||
# For Parents
|
||||
0013397903,playpause, ,
|
||||
0013403195,next, ,
|
||||
0013354327,volume/+5, ,
|
||||
0005690629,volume/-5, ,
|
||||
0013365376,spotify/now/spotify:album:4yYVqX2KierVI3nDV0M2UL, , M - Lettre Infinie
|
||||
0013193487,spotify/now/spotify:playlist:37i9dQZF1DWXTHBOfJ8aI7, , Légendes du Rock
|
||||
0003586576,spotify/now/spotify:album:45Hm9e77uZVaRnEIYzzpzM, , Adebert 2
|
||||
|
||||
|
@@ -5,7 +5,7 @@ addr=$1 # Mendatory - exemple : http://192.168.0.140:5005
|
||||
cmd=$2 # Mendatory - exemple : volume/50
|
||||
|
||||
|
||||
echo "Execute the command '$cmd' on the server at '$addr'"
|
||||
echo "Execute the command $addr/$cmd"
|
||||
|
||||
|
||||
# Execute the sonos api request using curl
|
||||
|
||||
Reference in New Issue
Block a user