[MSR] reactor-mqtt-contrib package for additional MQTT templates
-
I think the template is in the correct place. Let's see what happens when you restart Reactor
C
-
@gwp1 Are you getting an error that the template
owntracks_sensor
doesn't exist? -
@toggledbits I am not receiving any errors.
Just not seeing anything populate the entity.
Is it something to do with the entity name by any random chance?
-
@gwp1 said in [MSR] reactor-mqtt-contrib package for additional MQTT templates:
@toggledbits I am not receiving any errors.
Then there's nothing wrong with
uses_template
.I'll make the same comment/question to you that I made to @CatmanV2 earlier in this same thread: you're on the latest MQTTController, right?
-
gwp1replied to toggledbits on Dec 12, 2022, 3:21 PM last edited by gwp1 Dec 12, 2022, 10:27 AM
@toggledbits MQTTController-22326 (double-checked the
CHANGELOG.md
)EDIT: ...which I now see is a version behind. You snuck one in on me. Updating to MQTTController-22340.
-
@toggledbits @therealdb @CatmanV2 Thank you all for your help here, this is a big step in my system. Really appreciate it!
-
@therealdb what are your updates set to on the iPhone app? The data is going to be useful, but on 'Significant' I appear to be only getting updates on
string
andregion
which makes sense.
I'm assuming thatbattery_power.level
won't update more frequently unless the app is configured to 'Move'Has anyone done that? Does it kill the iPhone battery?
Cheers
C
-
gwp1replied to CatmanV2 on Dec 12, 2022, 5:31 PM last edited by gwp1 Dec 12, 2022, 12:33 PM
@catmanv2
move
translates to any movement your phone is making - increases accuracy but kills battery life.significant
is defined by OwnTracks as "traveling a distance of at least 500 meters in 5 minutes" which lets the app nap and is much easier on the battery.Driving Flag
is a virtual switch I created based on distance from Home. I believe I currently have it set to .1 mile so it trips as soon as I pull out of the neighborhood. I use it as a safety to the GPS reporting for when I'm not home. I have a second one calledDriving Flag - Far Away
that kicks in at two miles. This is for use when I'm obviously not just puttering about the neighborhood but going to be gone while. Can be used to trigger HVAC, etc. -
Cool, ta
C
-
@toggledbits said in [MSR] reactor-mqtt-contrib package for additional MQTT templates:
@therealdb this may need a bit more documentation, since the relevance of
prefix
andtopic
aren't immediately clear (at least, not to me) without looking at the template itself and seeing how they are used, and likely the phone configuration as well (i.e. describe how configuration fields on the phone may appear in the final event topic).It’s in the readme. Maybe, when you’ll build an UI, we could provide descriptive text for parameters.
-
Version 22350 released.
What's new:- shelly_button1: for Shelly Button 1 (battery powered button) - all the button modes (short, long, double, triple) are supported.
- fullykiosk: to handle messages coming from FullyKiosk. You'll have battery and charging status, screen brightness and current app.
What's fixed:
- query for all shelly template
- owntracks: trying to better handle null values/spurious messages.
How to update: just replace the files and restart Reactor.
-
@therealdb I grabbed the latest
owntracks_sensor
and dropped it on top of the existing. (Yes, being late and I'm exhausted I failed to backup the original template.)owntracks_iphone14p: #entity ID - must be unique name: "iPhone14p J2A" # friendly name prefix: "msrmqtt" topic: "iphone14p-j2a" uses_template: "owntracks_sensor" homeRegionName: "Home" # owntracks_iphone8: #entity ID - must be unique name: "iPhone8 location" # friendly name prefix: "msrmqtt" topic: "iphone8-j2a" uses_template: "owntracks_sensor" homeRegionName: "Home" # owntracks_iphone14jay: #entity ID - must be unique name: "iPhone14max Jay" # friendly name prefix: "msrmqtt" topic: "iphone14max-jay" uses_template: "owntracks_sensor" homeRegionName: "CoralBerry" # owntracks_iphone14jen: #entity ID - must be unique name: "iPhone14 Jen" # friendly name prefix: "msrmqtt" topic: "iphone14-jen" uses_template: "owntracks_sensor" homeRegionName: "CoralBerry" # owntracks_iphone14addie: #entity ID - must be unique name: "iPhone14 Addie" # friendly name prefix: "msrmqtt" topic: "iphone14-addie" uses_template: "owntracks_sensor" homeRegionName: "CoralBerry" # owntracks_iphone14bella: #entity ID - must be unique name: "iPhone14 Bella" # friendly name prefix: "msrmqtt" topic: "iphone14-bella" uses_template: "owntracks_sensor" homeRegionName: "CoralBerry"
That's my config... and this is my log since replacing/restarting:
... le" content="{"groups": [], "environmentKey" ... ^ [-] [latest-22349]2022-12-19T04:51:40.735Z <MQTTController:CRIT> YAMLException: end of the stream or a document separator is expected at line 21, column 66: ... le" content="{"groups": [], "environmentKey" ... ^ [-] YAMLException: end of the stream or a document separator is expected at line 21, column 66: ... le" content="{"groups": [], "environmentKey" ... ^ at generateError (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:167:10) at throwError (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:173:9) at readDocument (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1545:5) at loadDocuments (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1588:5) at load (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1614:19) at Object.safeLoad (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1637:10) at MQTTController._load_implementation (/home/reactor/Documents/reactor/ext/MQTTController/MQTTController.js:753:38) at async MQTTController.start (/home/reactor/Documents/reactor/ext/MQTTController/MQTTController.js:81:13) [latest-22349]2022-12-19T04:51:40.744Z <MQTTController:ERR> MQTTController#mqtt2 can't read/load templates from /home/reactor/Documents/reactor/config/mqtt_templates/owntracks_sensor.yaml: [YAMLException] end of the stream or a document separator is expected at line 21, column 66: ... le" content="{"groups": [], "environmentKey" ... ^ [-] [latest-22349]2022-12-19T04:51:40.754Z <MQTTController:CRIT> YAMLException: end of the stream or a document separator is expected at line 21, column 66: ... le" content="{"groups": [], "environmentKey" ... ^ [-] YAMLException: end of the stream or a document separator is expected at line 21, column 66: ... le" content="{"groups": [], "environmentKey" ... ^ at generateError (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:167:10) at throwError (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:173:9) at readDocument (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1545:5) at loadDocuments (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1588:5) at load (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1614:19) at Object.safeLoad (/home/reactor/Documents/reactor/node_modules/js-yaml/lib/js-yaml/loader.js:1637:10) at MQTTController._load_implementation (/home/reactor/Documents/reactor/ext/MQTTController/MQTTController.js:753:38) at async MQTTController.start (/home/reactor/Documents/reactor/ext/MQTTController/MQTTController.js:81:13) [latest-22349]2022-12-19T04:51:40.759Z <HassController:NOTICE> HassController#hass connecting to ws://192.168.1.198:8123/api/websocket [latest-22349]2022-12-19T04:51:40.766Z <MQTTController:INFO> MQTTController#mqtt instance topic ident is mqtt [latest-22349]2022-12-19T04:51:40.767Z <Controller:INFO> MQTTController#mqtt 0 dead entities older than 86400000s purged [latest-22349]2022-12-19T04:51:40.769Z <MQTTController:NOTICE> MQTTController#mqtt connecting to broker at mqtt://192.168.1.198:1883/ [latest-22349]2022-12-19T04:51:40.843Z <MQTTController:INFO> MQTTController#mqtt2 instance topic ident is mqtt2 [latest-22349]2022-12-19T04:51:40.844Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone14p uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.853Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone8 uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.890Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone14jay uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.901Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone14jen uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.914Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone14addie uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.923Z <MQTTController:ERR> MQTTController#mqtt2 entity owntracks_iphone14bella uses_template=owntracks_sensor, template not defined [latest-22349]2022-12-19T04:51:40.944Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone14addie no longer available, marking BinarySensor#mqtt2>owntracks_iphone14addie for removal [latest-22349]2022-12-19T04:51:40.952Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone14bella no longer available, marking BinarySensor#mqtt2>owntracks_iphone14bella for removal [latest-22349]2022-12-19T04:51:40.960Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone14jay no longer available, marking BinarySensor#mqtt2>owntracks_iphone14jay for removal [latest-22349]2022-12-19T04:51:40.967Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone14jen no longer available, marking BinarySensor#mqtt2>owntracks_iphone14jen for removal [latest-22349]2022-12-19T04:51:40.974Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone14p no longer available, marking BinarySensor#mqtt2>owntracks_iphone14p for removal [latest-22349]2022-12-19T04:51:40.980Z <MQTTController:NOTICE> MQTTController#mqtt2 device owntracks_iphone8 no longer available, marking BinarySensor#mqtt2>owntracks_iphone8 for removal [latest-22349]2022-12-19T04:51:40.987Z <Controller:INFO> MQTTController#mqtt2 0 dead entities older than 86400000s purged [latest-22349]2022-12-19T04:51:40.988Z <MQTTController:NOTICE> MQTTController#mqtt2 connecting to broker at mqtts://7ef71f0117fe40d28c2df12205c4a0d0.s2.eu.hivemq.cloud:8883
-
@therealdb Stand down - I refetched the template file and replaced and everything is fine.
Bad download, perhaps?
-
@gwp1 said in [MSR] reactor-mqtt-contrib package for additional MQTT templates:
Bad download, perhaps?
Maybe. I'll start packing them in zip files very soon, since MQTTController has the ability to get them from a compressed zip file. I'll do a proper release and things should be easier going on.
-
gwp1replied to therealdb on Dec 19, 2022, 10:09 PM last edited by gwp1 Dec 20, 2022, 5:31 PM
@therealdb Many thanks to you and @toggledbits for the combined efforts on this specific app.
I've convinced a friend to join us here in the world of MSR. I'd originally written up a
reactor.yaml
that included his Hubitat and VeraSecure controllers so he could just drop it in and go. I updated that file with multiple entities for each member of his family, had him install MQTTController, and drop the updated version of the config file into his MSR.Created an accompanying install doc for the iOS app customized to their setup and it's working brilliantly. His phone is connected to my HiveMQ cluster which connects his household and mine together so we can do shared presence automations across homes.
Love this stuff!
EDIT: took it a step further and offloaded my OwnTracks config file, edited a couple details (UserID, etc) and sent it to all members of his family. He added it to OwnTracks and everyone is identical in setup as far as Regions goes and everything is working smashingly.
STILL love this stuff
-
I've pushed a new version of my templates, with small fixes everywhere, plus notHomeRegionName to configure the "not home" state (ie: be consistent with Home Assistant, that's using "not_home", if you want) and better handling in general of events. Thanks to @CatmanV2 for the samples!
-
T toggledbits locked this topic on Jun 12, 2023, 10:02 PM
-
I've just updated a bunch of templates, and added:
- shelly_relay_simple: you know, a simple template for a shelly relay
- shelly_scenecontroller: to map Shellies as scene controllers/buttons
- shelly_uni_adc: to map Shelly Uni's capabilities to measure ADC.
-
v 24111 with support for wifi_status just posted to https://github.com/dbochicchio/reactor-mqtt-contrib.
My system is stable at the moment and I'm not throwing new things at it, so there is no need for new templates. Let me know if you need a particular template or feel free to contribute.
-
v 24146 is out.
Mainly refactoring, with the addition of the first Shelly Gen 3 device (a relay).