I have an ESP32_CAM running on Node-Red. It’s working exactly as I want with Node-Red and I’m trying to transition to HA without changing the software. It responds to 4 MQTT messages on Node-Red which are: go, stop, photo and wdt. These relate to the functions, turn on the camera PIR, turn off the camera PIR, take a photo and a watchdog timer trigger.
I am trying to write a configuration for this device and I have tried to use chat GPT to generate it. This is what it suggests:
- platform: mqtt
name: “Hall Output”
state_topic: “hall/output”
qos: 0
value_template: “{{ value_json[‘wdt’] }}”
device_class: “motion”
I have other modules that are just sensors that also run on Node-Red and they work fine with HA, but they only give out values. This module has to respond to the 4 commands, the one shown being ‘wdt’.
HA doesn’t like it. I tried various combinations without the -platform:mqtt
Here is part of my configuration file.
<
mqtt:
sensor:
- name: “Garage Temp”
unique_id: Gar_Temp
state_topic: “garage/tempC”
unit_of_measurement: C
device_class: temperature
- name: "Hall RSSI"
unique_id: Hall_RSSI
state_topic: "bc_cam3/RSSI2"
unit_of_measurement: dB
device_class: signal_strength
- name: "Hall PIR"
unique_id: Hall_PIR
state_topic: "bc_cam3/PIR"
device_class: enum
- name: "House Current"
unique_id: Util_Current
state_topic: "utility/current"
unit_of_measurement: W
device_class: power
- name: "Hall Output"
state_topic: "hall/output"
qos: 0
value_template: "{{ value_json['wdt'] }}"
device_class: "motion"
Any assistance would be gratefully received.