Hello Everyone,
Newbie here. I just complete the bridge emulator setup via home assistant, added my bridge and able to find my lights in DIY Hue. I also have a sync box that connected to my tv but I don’t know how to connect that to the DIYHue bridge.
I saw that I need the token in one discussion on gitHub and able to get that.
Can someone point out the direction that I need to take for the next steps?
Also, I found this script on Reddit yesterday night to automate the access token reading.
I could not find the original link to it but I am pasting it here anyway so someone else can use it.
import requests
import json
from time import sleep
url = "https://192.168.68.113/api/v1/registrations"
data = {
"appName": "DiyHue",
"appSecret": "MDAwMTExMDAwMTExMDAwMTExMDAwMTExMDAwMTExMDA=",
"instanceName": "DiyHue"
}
headers = {'Content-type': 'application/json'}
while True:
sleep(1)
r = requests.post(url, data=json.dumps(data), headers=headers, verify=False)
if r.json().get('accessToken') != None:
print("Your accessToken is " + r.json().get('accessToken'))
break