SOLVED: Emlulated_hue wont start: 500 error server got itself in trouble - RPi3

Hello everyone :slight_smile:
2nd Edit: Solved my own issue - solution below as it may help someone else.

Original issue:
I’m having some trouble getting emulated_hue running on the Raspberry Pi3.

Some background info:
I installed hass.io on the Pi3 - it found my two limitless LED’s - bedroom and bathroom after I added this conf yaml:

Lights

light:

  • platform: limitlessled
    bridges:
    • host: 192.168.1.32
      port: 8899
      version: 2
      groups:
      • number: 1
        name: Bedroom
        type: rgbw
      • number: 2
        name: Bathroom
        type: rgbw

This allows full RBGW control from my web UI.
First win!

Today I opened up my google home then got it all setup, then tried to enabled Emulated_hue but no luck on getting this to run.

the code in the config yaml
emulated_hue:
listen_port: 80

I have changed this many times and tried all different config including adding type: googlehome etc without any change in status.

(Port 80)
When I open: http://192.168.1.33/api/pi/lights
500 Internal Server Error

Server got itself in trouble

When I open: http://192.168.1.33/description.xml
I get an XML with details as expected.

urn:schemas-upnp-org:device:Basic:1
HASS Bridge (192.168.1.AA)
Royal Philips Electronics
http://www.philips.com
Philips hue Personal Wireless Lighting
Philips hue bridge 2015
BSB002
http://www.meethue.com

I have spent hours on google and going through all the 500 errors on these forums and nothing has worked. I saw a comment on a hass forum post saying to create: emulated_hue_ids.json but no idea what goes into that file? Didn’t help too much.

Log from hass:

The following errors have been logged this session:

2017-08-05 11:29:33 WARNING (MainThread) [homeassistant.components.emulated_hue] Failed to open emulated_hue_ids.json: Expecting value: line 1 column 1 (char 0)

thanks for any help! :nerd_face:

Edit:
I THINK I FIXED IT:
I added some generic text from the GIT into the json file
it auto updated to the correct led config!

Solution:
Google Home/Pi/Port 80: The command on hassio site for pi user to access port 80 does not work (hassbian)
port 80 for pi please use:
sudo setcap ‘cap_net_bind_service=+ep’ /usr/bin/python3.4

to Enable Hue please use commands below: navigate to the /.homeautomation folder (raspberry pi terminal).

cd /home/homeautomation/.homeautomation
sudo mk emulated_hue_ids.json
sudo nano emulated_hue_ids.json

paste in this text - HASS will change it to match your config! :slight_smile:
You likely don’t need a reboot but I did.

{“10”: {“modelid”: “HASS123”, “name”: “Bedroom”, “state”: {“bri”: 0, “on”: false, “reachable”: true}, “swversion”: “123”, “type”: “Dimmable light”, “uniqueid”: “light.bedroom”}, “8”: {“modelid”: “HASS123”, “name”: “all lights”, “state”: {“bri”: 0, “on”: false, “reachable”: true}, “swversion”: “123”, “type”: “Dimmable light”, “uniqueid”: “group.all_lights”}, “9”: {“modelid”: “HASS123”, “name”: “Bathroom”, “state”: {“bri”: 0, “on”: false, “reachable”: true}, “swversion”: “123”, “type”: “Dimmable light”, “uniqueid”: “light.bathroom”}}

Docker may differ for folder locations.

Getting same symtptom/error using docker.
Can you detail what generic text you are referring to?

solution in first post :slight_smile:

How do I fix this on HassIO