mqttUrl isn't used when running the program.
frdbonif opened this issue · 1 comments
frdbonif commented
Hello,
I'm trying to setup a room-assistant node using Ansible. When I run the service it appears that is isn't using the correct MQTT address.
When I run room-assistant as a service or on the command line I see this output:
Sep 23 19:36:04 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:04 - info - RoutesResolver: EntitiesController {/entities}:
Sep 23 19:36:04 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:04 - info - RouterExplorer: Mapped {/entities, GET} route
Sep 23 19:36:04 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:04 - info - RoutesResolver: StatusController {/status}:
Sep 23 19:36:04 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:04 - info - RouterExplorer: Mapped {/status, GET} route
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - error - HomeAssistantService: connect ECONNREFUSED 127.0.0.1:1883
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - info - ConfigService: Loading configuration from /usr/lib/node_modules/room-assistant/dist/config/d
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - info - ClusterService: Starting mDNS advertisements and discovery
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - info - NestApplication: Nest application successfully started
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - info - ClusterService: bedroom has been elected as leader
Sep 23 19:36:05 ra-bedroom room-assistant[17710]: 9/23/2020, 19:36:05 - info - EntitiesService: Refreshing entity states
The Ansible playbook produces this file at ~/home-assistant/config/ra-bedroom.yml
global:
bluetoothClassic:
addresses:
- 90:**:**:**:**:**
- d4:**:**:**:**:**
- c0:**:**:**:**:**
hciDeviceId: 0
interval: 30
homeAssistant:
mqttOptions:
password: hj8976r7tyguhjikhy7
username: room-assistant
mqttUrl: mqtt://mqtt.fjla.uk:1883
integrations:
- homeAssistant
- bluetoothClassic
Just for completeness here is the hosts.yaml for Ansible.
hosts:
'ra-bedroom.fjla.uk':
ansible_user: pi
room_assistant_config:
global:
instanceName: bedroom
# Global configuration parameters
vars:
room_assistant_version: latest
room_assistant_global_config:
global:
integrations:
- homeAssistant
- bluetoothClassic
homeAssistant:
mqttUrl: mqtt://mqtt.fjla.uk:1883
mqttOptions:
username: room-assistant
password: **************************
bluetoothClassic:
hciDeviceId: 0
interval: 30
addresses:
# Fred's Personal Phone
- '90:**:**:**:**:**'
# Fred's Work Phone
- 'd4:**:**:**:**:**'
# Fred's Work Tablet
- 'c0:**:**:**:**:**'
I don't think it is a silly mistake on my part but I have checked it against the docs a few times and tried adding and removing quotes from around the mqttUrl
.
frdbonif commented
Yes, a silly mistake from me. The homeAssistant
and bluetoothClassic
entries were at the wrong level.