Akj
(Asger)
June 29, 2019, 7:06pm
1
I can’t find the path to the config file in a specific add-on.
The add-on i’m talking about is the one called “motion1” for USB cameras (https://github.com/lovejoy777/hassio-addons/tree/master/motion ).
What I would like to do is similar to this part of the automation for zigbee2mqtt, i’m thinking specifically about the part after topic:
- id: enable_zigbee_join
alias: Enable Zigbee joining
hide_entity: true
trigger:
platform: state
entity_id: input_boolean.zigbee_permit_join
to: 'on'
action:
- service: mqtt.publish
data:
topic: zigbee2mqtt/bridge/config/permit_join
payload: 'true'
Any help would be much appreciated.
Tinkerer
(aka DubhAd on GitHub)
June 29, 2019, 9:23pm
2
That’s an MQTT topic, not a file path.
1 Like
Akj
(Asger)
June 30, 2019, 11:08am
3
Thank you.
What i’m trying to do is to make an automation where everytime the alarm panel is in away mode, this part "picture_output": "off"
from the config for the motion1 add-on changes to “on”.
The full config for the add-on is
{
"config": "",
"videodevice": "/dev/video0",
"input": 0,
"width": 640,
"height": 480,
"framerate": 5,
"text_right": "%Y-%m-%d %T-%q",
"target_dir": "/share/motion",
"snapshot_interval": 1,
"snapshot_name": "snapshot",
"picture_output": "off",
"picture_name": "%v-%Y%m%d%H%M%S-%q",
"webcontrol_local": "on",
"webcontrol_html": "on"
}
The automation i have written, that does not work is:
- id: take_pics_when
alias: Take Pictures when
hide_entity: true
trigger:
platform: state
entity_id: alarm_control_panel.armed_away
to: 'on'
action:
- service: mqtt.publish
data:
topic: motion/config/picture_output
payload: 'on'
Can this be done with the service mqtt.publish (and how) or should i use another service?
Tinkerer
(aka DubhAd on GitHub)
June 30, 2019, 12:16pm
4
No, MQTT is a protocol for passing messages, see here . The add-on will need to expose a service you can use to control that.
1 Like