Been over 18 months since I released the first Monitor App I wrote, to assist with the integration of the great Monitor Script by @andrewjfreyer, and this is an update to it. This new version brings some upgrade to the previous one, thanks to the work by @shbatm and @TheStigh. It is hoped that with this upgrade, you should be able to install your monitor system and forget about it (literally). As the app now should be able to assist in making your system more reliable, by even rebooting the nodes if for example the script was to go offline but the hardware still on the network; all options are configurable of course, for those that fear security vulnaribilities . To access the app and read its full features, kindly access it via this repository. A summary of a few of its new features are outlined below:
Integration via HACS
Ability to auto reboot the the nodes on the network. Either via MQTT (if wanting to do it from HA), service call or via a pre-configured scheduler
Added service calls, that can be called from other AD apps
If wanting to use device_trackers , it is possible to config the app to use device_tracker instead of binary_sensors for each device. The app will update the state as required; that is use home / not_home instead of on / off . - contributed by shbatm
The name of the sensors for everyone_home , everyone_not_home and someone_is_home can be modified to use other names as required. - contributed by shbatm
Added install script, which can assist in installing both AD and the App or upgrading the App, for non-Hass.io users. - contributed by TheStigh
Publishing of the entire monitor system’s state over MQTT using monitor/state. This can be used to create sensors in HA like telling when its scanning and how many nodes on the network
Publishing of per node’s state over MQTT eg monitor/<location>/state. This can be used to create sensors in HA, like telling if online/offline and when it was last_rebooted
The binary_sensors created per device now has a nearest_monitor attribute, which shows the devices closest node. - contributed by shbatm
Other improvements to the app’s over all performance.
In addition to the above, unfortunately there are some breaking changes, from the previous version to take note of:
Confidence sensors have been renamed from sensor.<device name>_<location> to sensor.monitor_<device name>_<location>_conf
The binary_sensors for presence have been renamed from binary_sensor.<device name>_home_state to binary_sensor.monitor_<device name>
The default MQTT event listened by the app is MQTT_MESSAGE from MQTT
Hope you enjoy the new upgrades, and await your feedbacks from those that have been using it. Those new to it, hope you enjoy the app, and the simplicity it brings to your monitor installation.
I just saw this post. Went back and read some of the previous posts.
Can you explain to me once it is installed in HACS what I do.
I do not understand what to do or where to place the app config.
Thank you.
carltonb
Thanks for your interest in the app. Honestly I don’t use HACS, but you can read more about it here. It was just added to the HACS default repository, so will should be available in about a few hours. The other option is just to download the repository and move the folder home_presence_app to your apps directory. AD will auto pick it up, and configure the home_presence_app.yaml as you want based on the docs.
I’m running this new version and so far its better than the old standalone version. Two questions:
I’m running Appdaemon in a docker and I’d like the reboot monitor functionality to work. The instructions mention the need to install requirements.txt for Appdaemon. However, since I’m running the docker container, any installation will be lost when that container is created. Any suggestions on how to make it work with AppDaemon in a docker container? My HA Core is also running in docker on a Ubuntu base VM.
I noticed that when I restart HA with AppDaemon still running. The Monitor entities are not re-created in the restarted HA instance. From what I can infer, this means that the entities are only created in HA by AppDaemon on AppDaemon start. Because once I restart AppDaemon the entities show up again. I’m not sure if this is expected behaviour, but if so, this is an issue because I often restart my HA without restarting AppDaemon and would then lose those Monitor entities. Or is there a way to remote restart AppDaemon from HA as part of an automation/script?
Edit: One more question…
Trying to install the new version with your installation script. I previously have the old Monitor installed, don’t think that is an issue. In any case, when I run the script and choose the install standalone Monitor or update standalone Monitor option, I get the following error:
bash: $'\r': command not found
bash: line 3: cd: $'~\r': No such file or directory
bash: line 4: $'clear\r': command not found
bash: line 15: cd: $'~\r': No such file or directory
Preparing update for Monitor-App, requires existing installation of AppDaemon 4.x
where AppDaemon configuration files are installed to default folder. The script
will check this and stop the installation if not.
Assuming path to /conf folder: /home/appdaemon/.appdaemon/conf
bash: line 22: $'\r': command not found
bash: line 23: $'\r': command not found
bash: -c: line 120: syntax error: unexpected end of file
This looks really great! Sorry if this is a noobie question but - can this be used with an ESP32 via ESPHome, or am I better off just getting a USB bluetooth module for the NUC running my hass.io instance?
On point 1 if using docker, just start the docker container and as long as you have the requirements.txt file in the app folder, it will install it at startup. Only issue is, it will have to install each time the docker starts up. To make it permanent, you have to build your own docker image.
On point 2, when HA is restarted, the App definitely rebuilds the entities in HA; this I personally use as my HA restarts quite a bit compared to AD. I am not sure what might be happening, but when you restart HA, give a minute (depending on how many users you got), for them all to show up.
As for the script, that will be @TheStigh to assist with as he developed it. Hopefully when he is online, can answer the question. But I don’t think the script had been designed to replace an old installation, so might need an upgrade.
Unfortunately it can’t be used with ESPHome, as I don’t even know how that of the ESPHome functions. But as the App needs an already installed and running Monitor system to function, you will need to have that running somewhere first. So yes putting a USB dongle on your NUC, might be your best friend .
Unfortunately the scripts does not support docker (yet).
You cannot update the older version of Monitor-App (version 1.x) using the script. But I do not understand the error output you are showing me - I’m currently on travel but are back home tomorrow and will look into it (sorry for the delay).
From where do you run the script, hardware, OS and user?
Not sure if you had a chance to try, but still getting that error when running the install script. For reference, I’m trying the Install Monitor Standalone option. Seems like it’s still checking for AD installation and maybe that’s why the script is failing?
Hi, im actually using monitor on a rasp W, so I would love to have this integration. I already install AD by the add-on store but I cant find the monitor-app on HACS. Do I need to add a repo? I already update/refresh/reboot
Can anyone tell me the exact name of the app to search in HACS
So my AD is installed as a Docker container on a separate Intel NUC where my Home Assistant is also installed.
The AD path is in the subdirectory of my home assistant path on the NUC. So there is no AD installed on my Pis, only monitor. Which is how it’s currently run via manual install of Monitor.
So that’s probably where the failure is happening because I don’t have AD installed on the devices I’m trying to install standalone monitor. May I ask why it still checks for AD under that option?
Looking forward to the new script and thanks for all the hard work!
Ah, you’re trying to install Monitor-App on a different hardware than where you run AppDaemon (AD)?
The script clearly states that it only works if you install AD as a standalone non-docker, perhaps it should be clearer that it doesn’t work if you have AD as docker (note-to-self: make better description).
You will need to install Monitor-App on the same physical device you run AD as the app depends on AD to run. If you install Monitor-App from HA itself, you don’t need the script.
To be clear, there are some ways to install both AD and AD apps;
Install AD as an addon in HA, then you can easily add AD apps from HACS
Install AD outside HA on same or different hardware
a) Install AD as docker
b) Install AD standalone (here you can use the install script)
If option 2, you need to install AD apps manually, they can’t be installed through HACS (@Odianosen25, correct me if I’m wrong).
The new script will be for option 2 only and it will support docker installations also.
Hi, i erased my previous post because I came here to quickly to ask for help. But now I’m really stuck. I configure everything and the appdaemon is connected to the raspW with monitor. I’m lost in the settings of the app regarding the mqtt_event and mqtt_topic. The rasp is publishing on the topic w