Home (Monitor) Presence App V2

Hello @Eeeeeediot,

What it means is that the node is not being accessed, as its not responding to system_check. Do ensure the monitor scripts are connected to the broker, by first running them in debug mode, before trying out the app.

As long as it keeps saying Processing System Unavailable for Hassio, it means the node not responding to checks.

Regards

Hi @Odianosen25 Iā€™m trying to use the install script as in the repo but it comes up with this error

bash: line 17: $'\r': command not found
[STEP 1/10] Updating system...
bash: -c: line 166: syntax error: unexpected end of file

I am trying to install on Ubuntu 18.04?

This is the script
bash -c "$(curl -sL https://raw.githubusercontent.com/Odianosen25/Monitor-App/master/installer/install_ad.sh)"

EDIT: So Iā€™ve installed and configured AppDaemon as a docker container. I downloaded the home_presence_app folder from the repository and placed it into the apps folder and when I run Appdaemon I get these errors

2020-08-24 20:57:48.101511 WARNING AppDaemon: File '/home/matt/docker/appdaemon/ apps/home_presence_app/home_presence_app.example.yaml' invalid structure - ignoring

and

2020-08-24 21:00:58.117971 WARNING AppDaemon: No app description found for: /home/matt/docker/appdaemon/apps/home_presence_app/home_presence_app.py - ignoring

The only app it sees in the webgui is the hello_world one.

Is anyone successfully using the Hass.io Monitor Addon and this Appdaemon app together on the device (RPi4 for me) that is running HA? I think there is an issue that is causing the Appdeamon app to lose connection with the addon. Issue Report Here

I wondered if anyone managed to overcome this issue?

2020-08-24 22:09:29.046698 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:09:29.230148 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:13:00.020143 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:13:00.129576 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:16:29.039978 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:16:29.150478 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:20:59.043362 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:20:59.147062 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:34:30.022391 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:34:30.112202 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:39:00.021633 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:39:00.124770 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:45:59.039523 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:45:59.147782 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked
2020-08-24 22:49:59.046381 INFO home_presence_app: Processing System Unavailable for Hassio
2020-08-24 22:49:59.173678 WARNING home_presence_app: Node at Hassio is Offline, will need to be checked

i bought a Raspberry Pi Zer W and installed the script on it and everything seems to be working so far.

However, i noticed that your docs say that i need to install requirement.txt to reboot nodes. I get an error when i try to install it and AppDeamon doesnt start - any idea what am i doing wrong?

Hass.io Addon config.

system_packages:
  - ffmpeg
python_packages:
  - requirements.txt
init_commands: []

AppDeamon Log

Looking in links: https://wheels.hass.io/alpine-3.11/aarch64/
Collecting requirements.txt
  ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none)
ERROR: No matching distribution found for requirements.txt
WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[01:15:21] FATAL: Failed installing package requirements.txt
[cont-init.d] appdaemon.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.

 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

EDIT: I also tried paramiko in the addon config too but still didnā€™t work.

Did you use the install script? I keep getting an error show in the post above yours?

No. I have appdaemon running on HASSIO and manually installed monitor.sh on a pi zero.

When I had them both on the same pi there was an mqtt conflict

Right now, you are trying to install a package that is called requirements.txt. I very much doubt, there is such a packageā€¦ :wink: Why do you even try to install it?

Your setup should be like this:

  • PiZero with monitor.sh running
  • HA machine with HomePresenceAppV2 running. No Hass.io addon or else, just this appdaemon app

If you use the Hass.io-addon on your HA machine, you would make the HA machine a node, too. That isnā€™t necessary or useful.

Hey @paddy0174.

That is how I have it set up but in the docs it says you need to install it to reboot nodes

What would the best arguments/settings to use if I have only 1 node and it is at my front door?

Also, would this advice change if I put an additional node upstairs?

Thanks

Hi @Odianosen25 would you be able to help please? Many thanks!

Iā€™m new to Monitor and AppDaemon, and just trying to get my head round it all at the moment. Could someone help me understand what this paragraph means from the GitHub readme please?

In the main node, have good spacing between scans, not only to avoid unnecessarily flooding your environment with scans but also allowing the app to take over scans intermittently. I have mine set at 120 secs throughout for now

Where do I set this interval scan? I also only thought scans occurred when triggered by a listed gateway sensor (if using -tar or -tdr), so is this needed?

The closest setting I could find for this is PREF_MINIMUM_TIME_BETWEEN_SCANS - is this correct?

Thanks.

Is possible for the same pi zeros to also have additional functionality like reporting temperature and humidity from a Xiaomi blender LYWSDCGQ sensor? Something room assistant has

Hey @Odianosen25

Is it possible to have your app to create a binary sensor that monitors the status of each node? One of my raspberry Pi zeros stops responding and it would be nice to get a notification when it goes offline.

If you have gateway sensor it will get triggered on scan, however if you dont thats the interval part you can set

1 Like

It actually already creates a sensor for each individual Monitor instance running. I think the default name is "sensor.<monitor_name>_state.

However, the current state of that entity is only reflecting the MQTT payload message (e.g. {ā€œlast_rebootedā€: ā€œā€, ā€œlocationā€: ā€œLiving Roomā€, ā€œlast_changedā€: ā€œ2020-10-10T11:38:44-04:00ā€, ā€œstateā€: ā€œonlineā€}). It would be great if the sensor would report the state only based on the ā€œstateā€ topic and then maybe have the other topics as attributes.

Using the example above, the sensor.living_room_state would have an ā€œonlineā€ state. With attributes:

  • Last rebooted
  • Location
  • Last changed

@emteedubs,

Hello thatā€™s a good suggestion and apologies to you and all I havenā€™t been able to respond to any queries so far.

Can you add this to the Gut repository? So when next I got time to focus on this, can get it done.

Regards

Yes as I said to @emteedubs above, will add it to the next version.

Regards

I didnā€™t write the bash script for the project, so will need Andrew the main designer to make that available. If he does, then I can add it to the data sent to HA.

For now, there are serval python based projects that allows to do that, can run it alongside the monitor so you achieve what you want.

Regards

I guess you might have solved this, and apologies for the slow response. Yes you right on that. Regards

1 Like

@Odianosen25 @TheStigh

I have read through this thread from the start and attempted to follow the directions to install. I am getting the following error:

bash: line 17: $ā€™\rā€™: command not found
[STEP 1/10] Updating systemā€¦
bash: -c: line 166: syntax error: unexpected end of file

I am installing using this command from the docs:

bash -c ā€œ$(curl -sL https://raw.githubusercontent.com/Odianosen25/Monitor-App/master/installer/install_ad.sh)ā€

I am installing through HASSOS web CLI. I have tried with both the Home Assistant AppDaemon installed first and no AD installed. Additionally, I can not find the Monitor App in HACS. I canā€™t figure out what I am missing. Thanks in advance for any assistance.