Author Topic: I can control my FPP from my Home Automation System (OpenHAB)  (Read 868 times)

Offline TexasStingray

  • Full Member
  • ***
  • Join Date: Mar 2014
  • Location:
  • Posts: 132
  • Kudos: 0
I can control my FPP from my Home Automation System (OpenHAB)
« on: December 09, 2017, 10:15:35 AM »
Just thought I would share a little information of what I am working on. This is still work in progress and I know this will more then likely be replace with FPP 2.0. But I was able to create a php file that make a call the to operating system fpp command and start and stop a playlist. I then setup a item in OpenHAB 2, where I passed in 2 parameters an Action with an ON or OFF and a Playlist. Then php then issues a fpp -p with playlist name to start playing and to stop or OFF it passes an Action of OFF. My OpenHAB is also linked to Alexa which also works to turn them on and off. This is still work in progress but I thought I would share what I have done so far.
« Last Edit: December 09, 2017, 10:31:07 AM by TexasStingray »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,505
  • Kudos: 193
I can control my FPP from my Home Automation System (OpenHAB)
« Reply #1 on: December 09, 2017, 10:27:45 AM »
Sounds interesting.  I currently pull in status to Home Assistant using FPP's fppjson.php and parsing the JSON in HA.

I have a new code branch which I am working on right now which has the playlist rewrite as well as MQTT publish and subscribe.  The new playlist code has a MQTT playlist entry type so I can publish MQTT messages right from the playlist.  FPP also subscribes to "falcon/player/#" and I can start a playlist by publishing a message from another system such as my Home Assistant install.  I will be working on adding more status and control topics as I work on the playlist code updates over the next few weeks.  I have already used the new code to run my overnight playlist manually for a while to get some burn in time while working on the rest of the integration.
-
Chris

Offline arw01

  • Hero Member
  • *****
  • Join Date: Oct 2013
  • Location:
  • Posts: 891
  • Kudos: 0
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #2 on: December 10, 2017, 09:45:40 AM »
Oh fun stuff, someday have to get a little further into this media player over the HA.

Just think I fixed a nagging problem with the system thinking the garage door was open when it was not.  Moved the reed switch just a touch and changed the connection point on the garage door to give it a little more down travel.  Hopefully that false positives will be done forever and can move onto the next issue!

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,505
  • Kudos: 193
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #3 on: December 10, 2017, 07:48:22 PM »
"Alexa, tell Falcon Player Master to ask the people in the red truck to turn down their radio a little while enjoying the lights"

Offline TexasStingray

  • Full Member
  • ***
  • Join Date: Mar 2014
  • Location:
  • Posts: 132
  • Kudos: 0
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #4 on: December 11, 2017, 04:16:52 PM »
"And tell them to turn only their parking light on so others can enjoy that light also."

Offline jmb

  • Newbie
  • *
  • Join Date: Sep 2018
  • Location:
  • Posts: 4
  • Kudos: 0
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #5 on: December 30, 2018, 02:27:31 PM »
Now that MQTT is supported, have you guys switched to using MQTT with openHAB? I am trying to do that but I can't get it to connect to MQTT on the Pi running FPP.

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,505
  • Kudos: 193
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #6 on: December 30, 2018, 09:14:33 PM »
Now that MQTT is supported, have you guys switched to using MQTT with openHAB? I am trying to do that but I can't get it to connect to MQTT on the Pi running FPP.

The PI isn't running a MQTT server, fppd acts as a client and connects to another MQTT server to send and receive messages.  Does OpenHAB have a MQTT server?  I'm using Home Assistant on another Pi and I had to setup my own MQTT server on that Pi and point fppd and Home Assistant at the same MQTT server.

Offline jmb

  • Newbie
  • *
  • Join Date: Sep 2018
  • Location:
  • Posts: 4
  • Kudos: 0
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #7 on: January 10, 2019, 12:25:39 PM »
The PI isn't running a MQTT server, fppd acts as a client and connects to another MQTT server to send and receive messages.  Does OpenHAB have a MQTT server?  I'm using Home Assistant on another Pi and I had to setup my own MQTT server on that Pi and point fppd and Home Assistant at the same MQTT server.
Thanks CaptainMurdoch. After some trial and error I did figure out that the Pi with FPP is not running an MQTT server. OpenHAB (running on another Pi) works with an MQTT server on the same Pi. I can now get FPP status information to show up on my OpenHAB console. My primary concern was making sure the show was running on the nights that I wasn't home. I got around this by displaying the FPP status (playing, idle etc), name of playing sequence and repeat flag. That is enough data for me to know with a quick glance if all is ok.

A method to restart FPP from openHAB if FPP stops would be great, but FPP has never stopped unexpectedly so that has become a low priority task.



Offline TexasStingray

  • Full Member
  • ***
  • Join Date: Mar 2014
  • Location:
  • Posts: 132
  • Kudos: 0
Re: I can control my FPP from my Home Automation System (OpenHAB)
« Reply #8 on: January 21, 2019, 08:03:36 PM »
FYI, OpenHAB does not have a builtin MQTT Server, I has a plugin that can be enabled to communicate with an MQTT Server. I have used it before with the Mosquito MQTT Server.

 

Back to top