02-08-2021, 07:24 PM
I think my problem is I installed hassos, whereas I should have gone for hass supervised install, so will wipe and try again :-)
|
Comfort 2 Alarm working with Home Assistant!
|
|
02-08-2021, 07:24 PM
I think my problem is I installed hassos, whereas I should have gone for hass supervised install, so will wipe and try again :-)
02-21-2021, 10:04 PM
[user=11547]koochy_rat[/user] wrote:
Quote:This is the mapping from Home assistant:I\'m partly sending this message in the hope of finding out if some of you are still watching this old thread... I\'ve just starting using koochy_rat\'s great module and I\'m looking through the code to investigate some issues and I wondered if any of you use the alarm arming functions? Re. the quoted code above, I just noticed in the Comfort Protocol manual that it says that \"m!\" does a standard local arm of the system and \"M!\" does a remote arm. The example it gives of the difference is for Away Mode, where in local mode you are required to exit and in remote mode you are not. I was just thinking that for Home Assistant, where the user might sometimes be controlling things from far away then surely \"M!\" would be better for setting Away mode (e.g. if you have temporarily alarmed and then want to re-arm the system once they\'ve left)? I will do some more experimenting another day as the family are in bed now so arming and disarming the alarm would not make me very popular.
02-22-2021, 04:45 PM
Also on this topic - does anyone know how to stop it reconnecting so often? The python module stays connected to Comfort for between 2 and 7 minutes on my system and then it tells me there is an \"orderly shutdown\" and it automatically reconnects after about 5 seconds.
There is no apparent pattern as there can be a motion event (for example) a few seconds before reconnection. Is this something I can configure on the Comfort end or is this normal behaviour that I just have to put up with? It did seem to cause a race-condition type issue at least once when I just happened to press a button just as the Home Assistant entities were about to be declared Unavailable. The python script then failed with an unexpected exception. It looked like it didn\'t handle an incoming output status change during the re-connection? I kept the debug output so I may investigate that another day.
02-23-2021, 08:41 AM
[user=5873]caravanboy[/user] wrote:
Quote:Also on this topic - does anyone know how to stop it reconnecting so often? The python module stays connected to Comfort for between 2 and 7 minutes on my system and then it tells me there is an \"orderly shutdown\" and it automatically reconnects after about 5 seconds.Replying to myself - interestingly when there is no activity at all (e.g. overnight) it stays connected without problem
02-27-2022, 01:02 PM
[user=4708]steefdebruijn[/user] wrote:
Quote:About starting the thing on a raspberry pi: that system (I use dietpi but others probably the same) uses systemd. So to use it unattended and autostart on boot, create a systemd service file (example below) and enable and start it.Anyone any tips or pointers on how to implement this on a RPI running HASSOS. I dont have the above directory ? I notice my comfort connection only runs when I have terminal window open and when i start the comfort2.pi
02-28-2022, 08:57 AM
If possible I\'d run it separately to HASSOS - do they recommend running your own processes on the Home Assistant OS? If you did run it there you\'d have to reinstall each time you upgraded HASSOS too.
If you just want to start it manually and leave it running in the background then use \"&\" to launch it in the background. Mine stays alive when I close my terminal if I run it like this. python comfort.py &> mylogfile.log & Alternatively, look at launching it with nohup to ensure it definitely stays alive. I lazily had my comfort.py running for a long time in that way (i.e. without getting around to auto-launching), it is pretty reliable (and I\'ve also fixed lots of unhandled message types in it) so you rarely have to restart it. I also made mine auto-reconnect to Home Assistant which it now does in most situations (still one scenario on my backlog not yet implemented).
02-28-2022, 02:36 PM
Thanks Caravanboy
Sorry, Im a bit confused, my linux knowledge is fairly basic, i prettymuch follow line by line instructions where I can get them. With HASSOS, I have enabled sambashare, and if i ssh into the rpi, it brings me to the root directory, and I then navigate to the config folder where I installed paho mqtt etc. My comfort2.py file is within this directory, and only when i can only run comfort2.py from this folder via ssh so it works to this point, but again, only when I have the ssh window open adter running comfort2.py. When I close down the ssh window, then the entities go to unavailable state. Not sure where to go from there ?
02-28-2022, 03:30 PM
Ok, first try this then from your SSH Window:
python3 comfort2.py &> yourlogfile.log & Then type \'exit\' to close your command window. If the entities still go unavailable, log back in to your terminal and look at the logfile and see if that gives any clues?
03-01-2022, 09:47 AM
Thanks for that,
So I logged in via SSH, navigated to the config folder and ran the commands as you listed.The devices became available in HA, and I could see motion sensors being activated as i moved etc. I then entered \"exit\" and got a reply saying that a process was still running, and entered it again to leave the terminal. HA then stopped updating the sensors again once the terminal window was closed!The logfile is completely blank. Thanks for help so far, really appreciate it.
03-01-2022, 10:26 AM
Hmm, okay, the HA shells on HASSOS must behave differently to the shell on my NAS Container then.
So, what I would try next is putting the nohup command in front of your command line. If you\'re interested to understand what that\'s doing then this page explains it (and shows examples of correct syntax): nohup details |
| Users browsing this thread: |
| 4 Guest(s) |