Announcement

Collapse
No announcement yet.

Send HS4 log to separate file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Send HS4 log to separate file

    Calling to all linux users, is there a way to send the HS4 log to another file? I want to try and parse the log and run events from it but I can't seem to pipe it to another file. Maybe in the startup mono call?

    I can't find any information about switches for HSConsole.exe

    Thanks,

    Devan

    #2
    Figured out one way:

    I'm using systemd so I changed my homeseer.service file:

    Code:
    [Unit]
    Description=HomeSeer HS4 Home Automation
    Documentation=https://homeseer.com/support-home/
    After=network-online.target remote-fs.target
    Before=multi-user.target
    
    [Service]
    WorkingDirectory=/opt/HomeSeer
    #ExecStart=/usr/bin/mono HSConsole.exe --log > /home/pi/hs4.log 2>&1
    ExecStart=/usr/bin/mono HSConsole.exe --log
    SyslogIdentifier=HomeSeer HS4
    StandardOutput=syslog
    StandardError=syslog
    Restart=on-failure
    RestartSec=30
    KillMode=none
    TimeoutStopSec=300
    ExecStop=/opt/HomeSeer/hs3stop.sh
    
    [Install]
    WantedBy=multi-user.target
    I added the StandardOutput and StandardError lines

    Now if I type:
    # journalctl

    Code:
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4963:[Z-Wave]->SmartStick+: The Z-Wave API Execution Thread was Started or Restarted.
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4228:[Z-Wave]->SmartStick+: The Z-Wave Command Execution Thread was Started or Restarted.
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4132:[Z-Wave]->SmartStick+: ----------------------------------------------------------------------
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4093:[Z-Wave]->Initializing Z-Wave interface SmartStick+ (HomeSeer SmartStick +) on /dev/ttyACM0
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4041:[Z-Wave]->SmartStick+: ----------------------------------------------------------------------
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:4010:[Z-Wave]->SmartStick+: ============================================================ ==========
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:3765:[Z-Wave]->465 Simple AV Control Command Class Control Commands have been loaded successfully.
    Jan 17 01:28:01 HS4-closter HomeSeer HS4[1232]: 01:28:01:3636:[Plug-In]->Finished initializing plug-in Z-Wave
    It has all of the Homeseer log entries!

    Sweet.

    -Devan

    Comment


      #3
      The HS log is stored in HomeSeerLog.hsd (database). The file you have redirected just looks like the startup log which is only written when HS4 loads.
      Jon

      Comment


        #4
        I think its working. I have had the syslog populated for the past 12h.

        sudo journalctl -u homeseer

        Code:
        Jan 17 23:00:01 HS4-closter HomeSeer HS4[1232]: 11:00:01:4126:[Z-Wave]->Device: <font color='#000080'>Upstairs Master bedroom Thermostat Heating Setpoint</font> Set to <font color='#008000'>60</font>
        Jan 17 23:00:01 HS4-closter HomeSeer HS4[1232]: 11:00:01:3100:[Z-Wave]->Device: <font color='#000080'>Upstairs Priya's Bedroom Heating Setpoint</font> Set to <font color='#008000'>60</font>
        Jan 17 23:00:00 HS4-closter HomeSeer HS4[1232]: 11:00:00:2734:[Device Control]->Device: Main Office Thermostat Heating Setpoint to 60 F (60)
        Jan 17 23:00:00 HS4-closter HomeSeer HS4[1232]: 11:00:00:2714:[Event]->Event Trigger "Office Heat off 11pm nightly"
        Jan 17 23:00:00 HS4-closter HomeSeer HS4[1232]: 11:00:00:0219:[Device Control]->Device: Upstairs Master bedroom Thermostat Heating Setpoint to 60 F (60)

        Comment

        Working...
        X