pophttp is run as a service on a computer and acts like a fake LIFX light running on your LAN. You then configure the Logitech pop app to make this fake light different colors for each different switch and each unique color is translated into a standard HTTP request.
pip install -r requirements.txt
to install the required dependencies.pophttp.py
with -vv
from the local directory.
git clone https://github.com/brokeh/pophttp
cd pophttp
config-sample.ini
file to config.ini
to start making your changespython pophttp.py -vv
2017-04-23 22:05:07,742 192.168.1.25 request 31851h,36751s,32768b,3612k,on not mapped to a URL
The 31851h,36751s,32768b,3612k,on
is the ID for the colour you chose, and what is going to be used to identify the light in the config file. Each component of the ID is optional and can be omitted if you want to match multiple actions. You will likely want to omit the final ,on
or ,off
so that it will match the same filter for both the on and off action.
config.yml
file under the switches
section. You can include parameters from the fake light in the URL if required using {}
. See the comments in the config file for full details on how to specify the URL.
switches:
31851h,36751s,32768b,3612k: http://example.com/switch1?power={onoff}
Notice that the ,on
is not included, but instead, the power state is included in the URL as power={onoff}
.
-vv
can be removed from the command to reduce the amount of output to the console.If you already have LIFX hardware it is recommended to also include the ip_filter
option in the config.yml
file to only respond to your pop bridge. You can find the IP of the bridge in the logs when running with -vv
. This will prevent the fake light showing up in the LIFX app.
There are further configuration options available too. Check out the config-sample.yml
provided to see a list of all configuration options and details on how to use them.
This repository also contains a Dockerfile
to allow it to be built into a Docker image.
config.yml
file and run it with the verbose logging so the unconfigured switches can be seen
docker build -t pophttp .
touch config.yml
docker run -p 56700:56700/udp -v `pwd`/config.yml:/pophttp/config.yml -t pophttp -vv
config.yml
.docker restart pophttp