Mercurial > code > home > repos > homeauto
changeset 771:3f6055cfccb2
move mqtt port
Ignore-this: c073796027dbda80f17fc2ae708e4f96
author | drewp@bigasterisk.com |
---|---|
date | Fri, 05 Jun 2020 17:49:56 -0700 |
parents | 11712539f4df |
children | 2500a3ee9102 |
files | service/frontDoorLock/door.yaml service/frontDoorLock/front_door_lock.py service/frontDoorLock/tasks.py |
diffstat | 3 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/service/frontDoorLock/door.yaml Thu May 14 22:29:55 2020 -0700 +++ b/service/frontDoorLock/door.yaml Fri Jun 05 17:49:56 2020 -0700 @@ -4,7 +4,6 @@ board: lolin32 build_path: . arduino_version: espressif32@>=1.4.0 - esphome_core_version: latest switch: - platform: gpio @@ -17,10 +16,8 @@ mqtt: broker: '10.2.0.1' - port: 10010 - keepalive: 5 - username: '' - password: '' + port: 10210 + keepalive: 5s logger: baud_rate: 115200
--- a/service/frontDoorLock/front_door_lock.py Thu May 14 22:29:55 2020 -0700 +++ b/service/frontDoorLock/front_door_lock.py Fri Jun 05 17:49:56 2020 -0700 @@ -1,4 +1,6 @@ """ +this service is generalized by mqtt_graph_bridge and rdf_from_mqtt, so delete when those are stable + :frontDoorLock :state :locked/:unlocked is the true state of the lock, maintained in this process. @@ -183,7 +185,7 @@ verboseLogging(arg['-v']) masterGraph = PatchableGraph() - mqtt = MqttClient(brokerPort=10010) + mqtt = MqttClient(brokerPort=10210) autoclose = AutoLock(masterGraph, mqtt) def toGraph(payload): log.info('mqtt->graph %r', payload)
--- a/service/frontDoorLock/tasks.py Thu May 14 22:29:55 2020 -0700 +++ b/service/frontDoorLock/tasks.py Fri Jun 05 17:49:56 2020 -0700 @@ -41,15 +41,15 @@ @task def tail_mqtt(ctx): - ctx.run(f'mosquitto_sub -h bang -p 10010 -d -v -t \#') + ctx.run(f'mosquitto_sub -h bang -p 10210 -d -v -t \#') @task def mqtt_force_open(ctx): - ctx.run(f'mosquitto_pub -h bang -p 10010 -t frontdoorlock/switch/strike/command -m ON') + ctx.run(f'mosquitto_pub -h bang -p 10210 -t frontdoorlock/switch/strike/command -m ON') @task def mqtt_force_lock(ctx): - ctx.run(f'mosquitto_pub -h bang -p 10010 -t frontdoorlock/switch/strike/command -m OFF') + ctx.run(f'mosquitto_pub -h bang -p 10210 -t frontdoorlock/switch/strike/command -m OFF') @task(pre=[build_image])