www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Help

HomeSeer Help Help, How-to's and Documentation

Reply
 
Thread Tools Display Modes
  #21  
Old September 20th, 2017, 03:33 AM
christianhau christianhau is offline
Seer
 
Join Date: Aug 2017
Location: Norway
Posts: 35
Hehe, yupp, I think that is the best approach Thanks for all the help!
Reply With Quote
  #22  
Old February 9th, 2018, 07:03 PM
ocxoman ocxoman is offline
Seer
 
Join Date: Jul 2016
Location: Chicagoland
Posts: 60
auto start with systemd

Pete,

I'm back home trying to get things set up. Been reading and trying to learn more about Linux. It seems it is something one must live to understand it.

The following changes were made to the file

NAME='HomeSeer' # Server handle for the screen session
DIR='usr/local/HomeSeer'
USER='hseer'

hseer is a administrator on the system

I followed these instructions because I am running Ubunto 16.04

For a systemd service do the following:

1 - nano /etc/systemd/system/homeseer.service
2 - chmod u+x /etc/systemd/system/homeseer.service
2 - systemctl enable homeseer.service or systemctl disable homeseer.service

The last command returns an error message
Failed to execute operation: Invalid argument.

Googleing the error message leads to many links beyond my comprehension. Some saying the homeseer.service if put in the /etc/systemd folder does not require the enable as it will start automatically on reboot. Or the file has to be in /usr/lib/systemd.

Any clues as to what I am doing wrong?

Jim
Reply With Quote
  #23  
Old February 10th, 2018, 04:34 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,296
Some saying the homeseer.service is put in the /etc/systemd folder does not require the enable as it will start automatically on reboot.

Here is a copy and paste:

Where are Systemd Unit Files Found?

The files that define how systemd will handle a unit can be found in many different locations, each of which have different priorities and implications.

The system's copy of unit files are generally kept in the /lib/systemd/system directory. When software installs unit files on the system, this is the location where they are placed by default.

Unit files stored here are able to be started and stopped on-demand during a session. This will be the generic, vanilla unit file, often written by the upstream project's maintainers that should work on any system that deploys systemd in its standard implementation. You should not edit files in this directory. Instead you should override the file, if necessary, using another unit file location which will supersede the file in this location.

If you wish to modify the way that a unit functions, the best location to do so is within the /etc/systemd/system directory. Unit files found in this directory location take precedence over any of the other locations on the filesystem. If you need to modify the system's copy of a unit file, putting a replacement in this directory is the safest and most flexible way to do this.

If you wish to override only specific directives from the system's unit file, you can actually provide unit file snippets within a subdirectory. These will append or modify the directives of the system's copy, allowing you to specify only the options you want to change.

The correct way to do this is to create a directory named after the unit file with .d appended on the end. So for a unit called example.service, a subdirectory called example.service.d could be created. Within this directory a file ending with .conf can be used to override or extend the attributes of the system's unit file.

There is also a location for run-time unit definitions at /run/systemd/system. Unit files found in this directory have a priority landing between those in /etc/systemd/system and /lib/systemd/system. Files in this location are given less weight than the former location, but more weight than the latter.

The systemd process itself uses this location for dynamically created unit files created at runtime. This directory can be used to change the system's unit behavior for the duration of the session. All changes made in this directory will be lost when the server is rebooted.

Here utilize Webmin on my headless Linux boxes. You can manage the base configuration and update it via the web gui.

You can see and edit all starting files (and test run them) via Webmin.

Here utilize Ubuntu 16.04 desktop on my home office computer and laptops these days and run Windows in Oracle VB's.
In Ubuntu utilize file manager (remotely), ssh and Webmin to manage headless computers.

Installing on Debian

1 - ssh to your new computer then
2 - apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
3 - wget hxxp://prdownloads.sourceforge.net/webadmin/webmin_1.870_all.deb *
3 - dpkg --install webmin_1.870_all.deb

*NOTE: xx=tt

Here is the systemd page of webmin.

Name:  webmin.jpg
Views: 159
Size:  70.3 KB
__________________
- Pete

Automator

HS3 Pro & Lite Edition Beta 3.0.0.435

HS3 Wintel Touch | Ubuntu 16.04 64 bit | Oracle Windows Virtual Box ==> for Wintel only SAPI and HS3 plugins | Speech - Microsoft SAPI - Neospeech - Amazon Echo | Hardware | Haswell Intel iSeries 3 - 16Gb | Pine64 - 2Gb computers | Openpeak Intel Atom SoC tabletop touchscreens (15 HS tabletop tablets) | Touchscreens - Windows embedded POE connected |Light switches - X10,UPB, ZWave and Zigbee | Firewall - PFSense - 2 WAN plus 4 LAN interfaces | Network - Gb managed switches / POE WAP(s) | CCTV - Zoneminder IPHD cams - variety | Audio - Russound - AB8SS | Security - Leviton HAI Omni Pro 2 | Weather - Davis Vantage Vue - MeteoStick - WeeWx | 1-Wire - AAG, Midon and HB | OWFS - Mosquitto - Node Red - Python - RPi Stretch - OpenWRT

Last edited by Pete; February 10th, 2018 at 04:54 AM.
Reply With Quote
  #24  
Old February 10th, 2018, 05:16 AM
zwolfpack zwolfpack is online now
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 948
Quote:
Originally Posted by ocxoman View Post
Pete,

I'm back home trying to get things set up. Been reading and trying to learn more about Linux. It seems it is something one must live to understand it.

The following changes were made to the file

NAME='HomeSeer' # Server handle for the screen session
DIR='usr/local/HomeSeer'
USER='hseer'

hseer is a administrator on the system

I followed these instructions because I am running Ubunto 16.04

For a systemd service do the following:

1 - nano /etc/systemd/system/homeseer.service
2 - chmod u+x /etc/systemd/system/homeseer.service
2 - systemctl enable homeseer.service or systemctl disable homeseer.service

The last command returns an error message
Failed to execute operation: Invalid argument.

Googleing the error message leads to many links beyond my comprehension. Some saying the homeseer.service if put in the /etc/systemd folder does not require the enable as it will start automatically on reboot. Or the file has to be in /usr/lib/systemd.

Any clues as to what I am doing wrong?

Jim
It's not clear what file you are editing. The snippet you posted appears to be from a SysVinit style script, possibly the one from post #2 of this thread. This is a different animal entirely from a systemd script. (SysVinit scripts live in /etc/init.d/).

In any case, this line has an error:
DIR='usr/local/HomeSeer'
The directory name needs a leading "/",
DIR='/usr/local/HomeSeer'

So post specifically what file(s) you are trying to use and their entire contents.
Reply With Quote
  #25  
Old February 10th, 2018, 05:53 PM
ocxoman ocxoman is offline
Seer
 
Join Date: Jul 2016
Location: Chicagoland
Posts: 60
Auto start with systemd

Thanks Pete and Wolfpack,

I will go over what you both said so I can learn more about how Linux works. It's so overwhelming to learn what all the options there are for so many commands and the overall structure of Linux. It seems books from the library get me only a fraction of what you guys live and breathe.

I did get crontab to work by following Pete's advise from #5 above after making the autostart_sh executable. It's scary and dangerous that I figured that out without asking for help as it is missing in the post. I did not install the server version of Ubunto just to make it easier for me to learn some of the file structure using a graphic interface. I've been using terminal in lieu of sshing into the unit. I can see the advantage of using the server version and Webmin, but it's not for me just yet. In a couple of years maybe.

I will in the future include the complete file and thanks to both of you for the explanation and catching the syntax error. I will remove my crontab and attempt to make the systemd method work as a learning experience. Until it's working, I'll be going back to crontab after every failed attempt at using the systemd method. I may be back for more help.

btw, Pete, I'm tired of shoveling and blowing snow. About 8 inches yesterday and another 2 this morning. Been back home 5 days and battled snow 4 of those. Hard to learn Linux while I'm in the driveway.

Jim
Reply With Quote
  #26  
Old February 10th, 2018, 10:35 PM
ocxoman ocxoman is offline
Seer
 
Join Date: Jul 2016
Location: Chicagoland
Posts: 60
Ubuntu no longer sees smartstick or audio

My unit suffered from an abnormal shutdown because I was moving things around like a numbskull. I now get error messages on ubuntu boot that were not there before.

EDAC pnd2: Failed to register device with error -19

I get two of these errors. Do I need to reinstall everything?

of course HS3 cannot communicate with the smartstick so my system is sort of useless at the present.
Reply With Quote
  #27  
Old February 11th, 2018, 12:12 AM
Michael McSharry's Avatar
Michael McSharry Michael McSharry is offline
OverSeer
 
Join Date: Jul 2001
Location: North Bend, WA, USA
Posts: 13,720
I put an install of HS3 on Odroid C1 SBC in the How-To forum and includes the auto start steps. It may cover what you have already done, but does provide another proven step-by-step for reference. It should not matter what Linux flavor is used as long as systemctl is supported.
Reply With Quote
  #28  
Old February 11th, 2018, 12:04 PM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,296
@Jim,

Don't get frustrated. Just go baby steps. Disable the autostart in cron tab for time being.

After a good reboot then SSH to your new Homeseer box. Go to the HS3 directory...and manually start homeseer by typing ./go and then go to your GUI and check you ZWave functions. This part should be fine.

Yeah here too we have had a bit of snow.......not as bad over night as what occurred on Friday.

After 60 plus years here used to it....a few years back working in London 1/2" of snow took the city to a standstill.

Personally in London lived near one train station and work was next to another train station and I walked to work anyhow.....which ended up faster than driving or taking the train to work at the time....

Last edited by Pete; February 11th, 2018 at 07:12 PM.
Reply With Quote
  #29  
Old February 12th, 2018, 11:50 PM
ocxoman ocxoman is offline
Seer
 
Join Date: Jul 2016
Location: Chicagoland
Posts: 60
Working again

Pete,
Thanks for the kind words. I found out that the Synology Virtual Machine Manager turned off the mounting of the USB dongles. I enabled them but still nothing. I then changed the Virtual USB controller to USB 2.0 and restarted Ubuntu. Still no luck. Next I made 2 changes, put the Smartstick on a different port and went back to USB 3.0 on the virtual USB controller. This time it took nearly 3 minutes to iniitialize the interface but it finally worked and my network is complete and working.
I have some errors showing up (not new ones) on the interface to my EcoBee thermostats. The install info says to move MonoCSharp.dll and CSScriptLibrary.dll to the bin folder from the root HomeSeer folder. I did this but it didn't fix the errors. "The call failed for an unknown reason" occurs 3 times every 4 minutes when the plugin communicates with the thermostats. I'll work with Spud to iron out the issue.
It is fun learning something new but except when my wife asks why the lights didn't turn on like they are supposed to.

Spent a couple weeks in London last Spring. My daughter lived in Paris for 3 years so I spent a couple months each year in Paris and got to explore some of Europe.

Have the SEL on Ebay and going to save my Zee to run this house if we decide to move to the LA. What's a fair price to ask for the SEL and smartstick?
Reply With Quote
  #30  
Old February 12th, 2018, 11:56 PM
ocxoman ocxoman is offline
Seer
 
Join Date: Jul 2016
Location: Chicagoland
Posts: 60
Autostart HS3

Michael,
Thanks for pointing to the place for the step by step. I need all the help I can get trying to learn something totally new. I'll check it out and try to understand what each step does. Right now crontab is working with help from Pete. I mean to try the systemd method again after taxes are done and I have some more time.

Jim
Reply With Quote
  #31  
Old February 13th, 2018, 09:11 AM
Pete's Avatar
Pete Pete is offline
OverSeer
 
Join Date: Jan 2001
Location: House
Posts: 15,296
@Jim

Good news. I have not tried a VM (container) on my NAS4Free box. Seems that all of the VM software does USB a bit differently. The ZWave stick is a serial to USB device. The ZWave nodes are stored on the device. Here utilize Ubuntu 16.04 64bit on main HS3 box and a couple of Oracle VB's running Windows for SAPI speech for HS3.

Relating to the service start up of HS3 here have one machine doing the cron job thing and the other using a service script. That said Rich's first implementation of HS3 on Linux (Zee) used a one time start up in rc.local. I still utilize the HS3 web gui to shut down HS3. I have seen a few plugins anyhow that linger on shutdown. What is nice is that HS3 on Linux is just a directory and HS3 is just a program that runs in mono linux such that the configuration is very flexible and really all that matters is that it runs on startup of whatever Linux you are using. Personally see that systemd is a greater CPU utilizer than upstart was and that can ding a lite computer.

Make sure when you move the DLL's to the bin directory that HS3 is in off mode as HS3 caches them when loading up. (also there is an upper and lower case thing with Linux).

Yeah WAF mostly relates to the thermostat functions. That said the thermostat is automated but mostly just monitored and never touched. In the winter use an extra humidifier for the master bedroom to up a bit from the whole house humidifier and in the summer use a dehumidifier in the basement. Tried the follow me lighting many years ago and it was low on the WAF (using PIR's and occupancy sensors).

Have a cousin living in a very old home (40 years now) near the area known as La Défense in Paris. I would visit when working there. I also switched from flying between cities to taking the TGV which I enjoyed as it was much faster for me. Recall once way long time ago going the MS HQ there in La Défense to see new MS stuff and while I did see newest MS OS most of the computers in the office were running Helios.

I have no idea what the SEL and ZWave stick would be worth. Are you using the SEL HS3 license for your new HS3 Synology build?

Last edited by Pete; February 13th, 2018 at 10:09 AM.
Reply With Quote
  #32  
Old February 23rd, 2018, 03:01 AM
jnpoyser jnpoyser is offline
Seer
 
Join Date: Feb 2018
Location: Oxfordshire
Posts: 21
Back to the original topic for a moment...

I've used this template script: https://github.com/fhd/init-script-t...aster/template (docs here https://github.com/fhd/init-script-template).

For me, variables as follows:

dir="/opt/HomeSeer"
cmd="./go"
user="root"

Then:
chmod u+x /etc/init.d/homeseer
update-rc.d homeseer defaults

The advantage of this script is that it logs the terminal output to a standard location - /var/log/homeseer.log / .err
Reply With Quote
  #33  
Old May 20th, 2018, 05:18 PM
adeux adeux is offline
Seer
 
Join Date: Sep 2015
Location: UK
Posts: 39
Quote:
Originally Posted by ARA View Post
I'm still curious about your original error message.
-A
Quote:
(code=exited, status=210/CHROOT)
This is systemd complaining that you are changing the working directory without providing a user. If you specify a working directory you also need to specify a user. The simplest solution is to leave out the working directory line.

So this service file works (assuming you have the homeseer directory in the default location of: '/usr/local/HomeSeer'):

Code:
[Unit]
Description=HomeSeer Home Automation Server
After=network.target

[Service]
ExecStart=/usr/local/HomeSeer/autostart_hs &
Restart=on-failure

[Install]
WantedBy=multi-user.target
HTH

Adeux
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OSX AutoStart OddConcept HS3 / HS3PRO Discussion 0 November 6th, 2016 06:03 PM
AutoStart problem Searider HS2 / HSPRO 2 August 9th, 2011 11:17 PM
Autostart HomeSeer on Windows7x64 nanckekr HS2 / HSPRO 0 November 5th, 2010 04:38 PM
Delay HS autostart? Uncle Michael HomeSeer General Discussion Area 2 April 4th, 2007 05:32 PM
HS2 Speaker Client Autostart tonlof HS2 / HSPRO 17 August 23rd, 2005 01:58 PM


All times are GMT -4. The time now is 04:34 AM.


Copyright HomeSeer Technologies, LLC