News:

LATEST RELEASE:  FPP 5.5 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/5.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15187
Latest: 3636lightshow
New This Month: 4
New This Week: 0
New Today: 0
Stats
Total Posts: 123961
Total Topics: 15067
Most Online Today: 49
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 24
Total: 24

Need some help with getting a falcon script to work properly in Home Assistant

Started by wtstreetglow, May 15, 2022, 04:38:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wtstreetglow

@CaptainMurdoch Hello again and Hello all, hoping someone here can help me with a more than likely easy situation. I just don't understand enough about mqtt to make something work.

So, I'll start out by saying, I have Home Assistant connected to FPP and can start a script with some mqtt coding (I don't know if that's the proper terminology or not.) The problem I am running into is that I can't get the sequence to repeat for some reason. I think I have a syntax problem or something because I don't fully understand what I'm doing but I know what I want to do. Below is the code I am attempting to use. In my instance, the sequence runs once and then stops (doesn't repeat). Can someone here help me determine what I'm doing wrong? Thank you all in advance!!

sequence:
  - service: mqtt.publish
    data_template:
      topic: albero/falcon/player/FPP/playlist/name/set
      payload: GYMSIGNPLAYLIST
  - delay:
      seconds: 1
  - service: mqtt.publish
    data_template:
      topic: albero/falcon/player/FPP/set/playlist/start
      payload: '1'
      retain: false
  - delay:
      seconds: 1
  - service: mqtt.publish
    data_template:
      topic: albero/falcon/player/FPP/set/playlist/$(PLAYLISTNAME)/repeat
      payload: '1'
      retain: false


wtstreetglow

Sorry now I realize the capitalized areas can be replaced with "ALLPLAYLIST" or your playlist name and they will repeat appropriately. I'll leave the original post in place for others learning about mqtt with Home Assistant/ Falcon Pi Player behind me. Thank you all for everything you have built!!

CaptainMurdoch

You can also do the same thing in one MQTT message by sending a FPP Command to the {prefix}/falcon/player/{hostname}/set/command topic.  The body of the message would be the JSON for the FPP Command as documented on the API Help page in FPP.  For the "Start Playlist" command, the body would look similar to this:

{
  "command": "Start Playlist",
  "args": [
    "PLAYLIST_NAME_HERE",
    "false",
    "false"
  ]
}

The first 'false' is a true/false to indicate whether to start the playlist in repeat mode.  The second true/false indicates whether to only start the playlist if it is not already playing.  False would (re)start the playlist always, True would only start if not already playing.  All FPP Commands documented on the API Help page can be accessed over both the HTTP REST API and the MQTT interface.
-
Chris

Support FPP

+- Recent Topics

Bridging networks so show network can access internet by bloojoop
July 04, 2022, 03:08:03 PM

Looking for FPP Initial Setup screen by Poporacer
July 04, 2022, 11:51:56 AM

FPP 5.4 Released! by Poporacer
July 04, 2022, 08:42:52 AM

Falcon player dynamic tempo from some kind of input. How would I go about it? by JonD
July 03, 2022, 03:20:37 AM

FPP Startup - Newbee by Poporacer
July 02, 2022, 08:51:24 AM

EDM Audio FPP Plugin - RDS Expectations? by JonD
July 02, 2022, 06:12:35 AM

The Blenders - Rudolph by breese
July 01, 2022, 08:21:41 AM

fpp error when writing to emmc on BBB by neilric99
June 30, 2022, 11:28:59 PM

Any idea when more will be available by Poporacer
June 30, 2022, 09:39:31 PM

Trouble with wifi tethering/ initial setup by Poporacer
June 29, 2022, 09:14:53 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod