Closed codegrau closed 1 year ago
Ok that worked:
And my MQTT Server (IPSymcon) received the publish and saved it in the attribute:
Alright, I think I fixed it. Please download the script once again from latest dev (see link above).
Perfect! It is working now ;-)
Awesome! Thanks for the patience and enjoy it. Let me know if there's something missing that you need/want.
Are you kidding me?! Thanks for your patience and your help!
I committed the last pull requests to master:
And thanks for the lively discussion and great input!
Thanks and sorry if we flooded your mailbox... 😜
PS: the new Function for Folderplay(which is incredible when i get this work as Switch and then in Google Home :-)) need some Parameters , are these the directory Path to Musicalbums ? like : /RPi-Jukebox-RFID/shared/audiofolders/Album1 or only Album1 ?
You simply pass the folder name (Album1). BTW: I primarily use the Basic UI to control openHAB and therefore would implement that with a String element that is linked to the MQTT topic "phoniebox/cmd/playfolder" and make a dropdown in the sitemap with pre-set folder names. Something like that:
Selection item=phoniebox_playfolder mappings=["Album1"="Tool - Fear Inocolum", "Album2"="Slipknot - We are not your kind"]
So if I select the Slipknot album from that dropdown the value "Album2" would be sent to the
playfolder
command. Not sure how you would handle that with your Google Home though.
Hey andreasbrett, If i select only 1 Album , i can handle this as Switch with 1 Value (Album1). Items create as Switch et voila my Son is happy ;-) . Volume are configured as Dimmer and Lightning. The Reaction Time is awesome fast. Sleeptimer also as Switch with Value in my Case 60 for 60min. Play and Pause also works good as Switch.
Thank you guys a lot for this addon! I can't wait to realize a wake-up-alarm for my kids with it!
I can run it and it also works if I run it manually like so: python3 RPi-Jukebox-RFID/scripts/daemon_mqtt_client.py
.
But when I follow the instructions on the wiki page and then run sudo systemctl status phoniebox-mqtt-client
at the end, I always get error messages:
pi@phoniebox:~ $ sudo systemctl status phoniebox-mqtt-client
● phoniebox-mqtt-client.service - Phoniebox MQTT Client Service
Loaded: loaded (/etc/systemd/system/phoniebox-mqtt-client.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2019-10-13 19:59:43 BST; 1min 42s ago
Process: 531 ExecStart=/home/pi/RPi-Jukebox-RFID/scripts/daemon_mqtt_client.py (code=exited, status=203/EXEC)
Main PID: 531 (code=exited, status=203/EXEC)
Oct 13 19:59:42 phoniebox systemd[1]: phoniebox-mqtt-client.service: Failed with result 'exit-code'.
Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Service hold-off time over, scheduling restart.
Oct 13 19:59:43 phoniebox systemd[1]: Stopped Phoniebox MQTT Client Service.
Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Start request repeated too quickly.
Oct 13 19:59:43 phoniebox systemd[1]: Failed to start Phoniebox MQTT Client Service.
Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Unit entered failed state.
Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Failed with result 'exit-code'.
Do you guys have any idea what the problem might be? I already tried rebooting... but didn't work.
Thank you guys a lot for this addon! I can't wait to realize a wake-up-alarm for my kids with it! I can run it and it also works if I run it manually like so:
python3 RPi-Jukebox-RFID/scripts/daemon_mqtt_client.py
. But when I follow the instructions on the wiki page and then runsudo systemctl status phoniebox-mqtt-client
at the end, I always get error messages:pi@phoniebox:~ $ sudo systemctl status phoniebox-mqtt-client ● phoniebox-mqtt-client.service - Phoniebox MQTT Client Service Loaded: loaded (/etc/systemd/system/phoniebox-mqtt-client.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Sun 2019-10-13 19:59:43 BST; 1min 42s ago Process: 531 ExecStart=/home/pi/RPi-Jukebox-RFID/scripts/daemon_mqtt_client.py (code=exited, status=203/EXEC) Main PID: 531 (code=exited, status=203/EXEC) Oct 13 19:59:42 phoniebox systemd[1]: phoniebox-mqtt-client.service: Failed with result 'exit-code'. Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Service hold-off time over, scheduling restart. Oct 13 19:59:43 phoniebox systemd[1]: Stopped Phoniebox MQTT Client Service. Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Start request repeated too quickly. Oct 13 19:59:43 phoniebox systemd[1]: Failed to start Phoniebox MQTT Client Service. Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Unit entered failed state. Oct 13 19:59:43 phoniebox systemd[1]: phoniebox-mqtt-client.service: Failed with result 'exit-code'.
Do you guys have any idea what the problem might be? I already tried rebooting... but didn't work.
Show was going on with : journalctl -u phoniebox-mqtt-client.service
Sorry for the super late reply... so much stuff going on currently and so little time for the fun stuff... The message I am getting was essentially:
phoniebox-mqtt-client.service: Failed at step EXEC spawning /home/pi/RPi-Jukebox-RFID/scripts/daemon_mqtt_client.py: Permission denied
So I simply ran chmod +x daemon_mqtt_client.py
any everything is now working as expected... awesome :)
Excited to see how long my kids will like "Guten morgen Sonnenschein" as their wake up sound :) haha
Again... thanks for that MQTT plugin! Love it!
So I simply ran
chmod +x daemon_mqtt_client.py
any everything is now working as expected
Ah I see. I had not pushed the file via git but instead pasted its contents here on github. That's why the file attributes are missing. Thanks for pointing out!
Hi @andreasbrett can you create a pull request, please?
Hi @andreasbrett can you create a pull request, please?
Of course. It's done.
Description for MQTT in https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/Smart-Home-remote-control-with-MQTT
Closing this issue now.
Hi there, thank you @MiczFlor and all contributors for this wonderful project.
Since mqtt is very common for smart home and home automation stuff I was wondering: wouldn't it be cool for phonieboxes to connect to a mqtt broker for other devices to know, which tune is playing and control phoniebox remotely?
This way you could easily integrate phoniebox to openHAB or HomeAssistant or even use cheap ESP8266 to control or visualize phoniebox contents.
Looking forward to your thoughts.