diff --git a/src/.env.dev b/src/.env.dev index 1c8990e..470c0b1 100644 --- a/src/.env.dev +++ b/src/.env.dev @@ -1,5 +1,5 @@ DATABASE=sqlite:///endpoints.db -API_HOST=windows.local +API_HOST=RoomF7203.local SERVICE_NAME=RoomF7203 SERVICE_TYPE=_http._tcp.local. SERVICE_IP=192.168.137.1 diff --git a/src/register.py b/src/register.py index cd94662..6d9b093 100644 --- a/src/register.py +++ b/src/register.py @@ -1,6 +1,6 @@ from zeroconf import ServiceInfo, Zeroconf -from config import API_HOST, SERVICE_IP, SERVICE_NAME, SERVICE_PORT, SERVICE_TYPE +from config import SERVICE_IP, SERVICE_NAME, SERVICE_PORT, SERVICE_TYPE zeroconf = Zeroconf() @@ -9,10 +9,8 @@ info = ServiceInfo( name=f"{SERVICE_NAME}.{SERVICE_TYPE}", addresses=[SERVICE_IP], port=int(SERVICE_PORT), - server=API_HOST, - properties={ - "path": "/api/endpoints", - }, + server=f"{SERVICE_NAME}.local.", + properties={"path": "/api/endpoints"}, )