Announcement

Collapse
No announcement yet.

Easiest Path to Status Display

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

    Easiest Path to Status Display

    I want to create a status display to track some specific things and I want to do it in a way that is not too cluttered. The idea I came up with is instead of having a lot of status icons to just do lines of text like a like a log with the difference being that once a status returns to normal then that line is cleared from the list. For eample I might have a text box that says:

    Front Door is Unlocked
    Garage Door is Open
    Well Pump is Running
    Basement Lights Have Been Left On
    Library Phone Is Off Hook
    NOAA Snow Squall Alert
    Temperature is 24 Degrees
    Alarm System Is Armed

    In this example I can glance at the display and quickly see if there is anything that demands my attention. If I close the garage door or turn off the basement lights I want those items to disappear from the list rather than changing status and continue to be displayed. This frees up space for other items to go on the list when they happen without the list being cluttered... only the current items of concern are displayed at any given time. A small number of items like temperature, will always display but otherwise the list only shows current alerts that i have set up.

    What plugins and UI strategy would provide the shortest path to setting something like this up? Bonus if it lets me assign different colors to different types of alerts to enhance readability.

    #2
    Wouldn't you just create a virtual device and update it via the events you are trying to monitor? That's where in my opinion it would get messy.

    On second thought, you could watch the log file via Ultramon or Jon's script (Can't remember the name now) and update the virtual device through a script or event associated with the log monitor? This would probably be easier to maintain.

    Robert
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

    Comment


      #3
      One way to accomplish this is to write a script that concatenates all of the text that has met the valid conditions and writes it to a virtual device status. It would then be available to HSTouch.

      Comment


        #4
        Could a wall-mounted iPad running HS Mobile accomplish this? You could the widgets for each of these items using various sizes and status colors. I read something about dashboard-like functionality coming in HS4. The hide-unhide based on status may not be worth the effort if colors/widgets could be used to really help differentiate between needs attention/good to go.

        This isn't exactly what you're looking for but HS-WD200+ switches are perfect for stuff like this. A quick glance gives me door status, garage doors, alarm, movement in my infant's crib, back yard gate status, etc. I try to have at least one in every room where it would be beneficial to see the status. Default light is green across the board and only changes when something needs my attention. Probably cheaper at $50/switch than going full-on dashboard on a monitor/tv/tablet/etc.

        You can get creative with doubling up on each of the 7 lights. For example - one light could cover both weather statuses. Solid blue for temp <24 degrees, blinking blue for snow squall alert.

        Comment


          #5
          Some good ideas but to provide a little more detail on how this will scale out I anticipate having 30 to 50 critical items I want to track which is why an icon or widget for each is not practical. I also want to be able to glance at the text box and note that it is empty or that some new lines have been added that I need to check, which is why it is important that lines are cleared when the alert situation is resolved.

          I will be using this in addition to WD200 leds, voice alerts and other options to help get my attention. It mainly comes from the fact that logs write an alert event and then scroll it away as other stuff is added to the log. I want a list of alerts that persists on screen until they are resolved and then clear themselseves off so I am always presented with the current situation.

          Comment


            #6
            Check out Adafruit they have some pretty cool WiFi equipped displays called pyportal. I plan on trying the same using one and mqtt. Spark fun is also selling one with a more GUI oriented design system from 4D

            Comment


              #7
              I agree with "AllHailJ" in using script to update a virtual device string. That Is what I am doing.

              However, I just have a one line text, in very large font (easier to see across the room), and the messages displayed there are prioritized. In another words, I am not concerned about motion on my front porch if my front door is unlocked (the unlocked front door is the priority). But I am always concerned if my smoke detectors are triggered (highest priority). When one message can be cleared, the script checks everything else, and displays the next highest priority message.

              Comment


                #8
                I'm not clear on how you want to use this, but below is a script that I wrote some time ago to do something similar. It checks a bunch of devices and if they need attention it concatenates them in a device string. I found that, in my case, it is extremely unlikely that there are more than two items in the list, but that could easily be different for you. I display the list on a bright yellow background in the upper left corner of my HSTouch screens. If the list is empty (which is most of the time), the background and text change to transparent.

                If you order the checks so that the most urgent items are checked first, then the list that is generated will be in priority order.

                Code:
                    Public Sub Main(ByVal Parms As Object)
                
                        Dim intReturn As Integer
                        Dim intLines As Integer = 0
                        Dim intHour As Integer = NOW.Hour
                        Dim arrMessage(10) As String
                        Dim intNight As Integer = hs.DeviceValue(155)
                
                
                        If hs.DeviceValue(402) > 0 Then    'Swing Gate Open
                            intLines += 1
                            arrMessage(intLines) = hs.DeviceString(403) & " Gate"
                        hs.RunScript("Security Swing Gate Status.vb", False, True)
                        End If
                
                        If hs.DeviceValue(404) = 100 And hs.DeviceTime(404) > 2 Then
                            intLines += 1
                            arrMessage(intLines) = "Drive Gate OPEN"
                        End If
                
                        If hs.DeviceValue(1478) = 0 AND (hs.DeviceTime(1478)  < 10 OR (hs.DeviceTime(1478)  < 60 AND hs.DeviceValue(154) = 100 AND hs.DeviceTime(154)  < 10)) Then
                        intLines += 1
                        arrMessage(intLines) = "Washer Done"
                        End If
                
                        If hs.DeviceValue(1479) = 0 And hs.DeviceTime(1479)  < 10 Then
                        intLines += 1
                        arrMessage(intLines) = "Dryer Done"
                        End If
                
                        If hs.DeviceValue(1657) = 100 AND hs.DeviceTime(1657)  > 3 Then
                        intLines += 1
                        arrMessage(intLines) = "Internet ??"
                        End If
                
                        If hs.DeviceValue(1658) = 100 And intNight < 10 Then
                        intLines += 1
                        arrMessage(intLines) = "Check Warming Drawer"
                        End If
                
                        If hs.DeviceValue(876) = 100 And intNight < 10 And hs.DeviceTime(876) > 5 Then
                            intLines += 1
                            arrMessage(intLines) = "Shed"
                        End If
                
                        If hs.DeviceValue(875) = 100 And intNight < 10 And hs.DeviceTime(875) > 5 Then
                            intLines += 1
                            arrMessage(intLines) = "Garage"
                        End If
                
                        If hs.DeviceValue(264) > 0 Then
                            intLines += 1
                            arrMessage(intLines) = "New Phone Message"
                        End If
                
                        If hs.DeviceString(1098) = "Communication Failure" Then
                            intLines += 1
                            arrMessage(intLines) = "LR Temp??"
                        End If
                
                        If hs.DeviceValue(1183) = 100 Then
                            intLines += 1
                            arrMessage(intLines) = "Back Basement light is ON"
                        End If
                
                        If hs.DeviceValue(1219) = 100 Then
                            intLines += 1
                            arrMessage(intLines) = "Check Batteries"
                        End If
                
                        If intLines > 1 Then
                            arrMessage(1) &= " ! " & arrMessage(2)
                        End If
                
                        If intLines > 2 Then
                            arrMessage(1) &= " !...MORE"
                        End If
                
                        hs.SetDeviceValueByRef(496, 0, True)
                        hs.SetDeviceString(496, "  ", True)
                
                        If intLines > 0 Then
                            hs.SetDeviceValueByRef(496, 100, True)
                            hs.SetDeviceString(496, arrMessage(1), True)
                        End If
                
                    End Sub
                Mike____________________________________________________________ __________________
                HS3 Pro Edition 3.0.0.548, NUC i3

                HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

                Comment


                  #9
                  This looks like it could be made to work. I'll study this a bit and see where it takes me, thanks!

                  Comment


                    #10
                    I just ask Alexa for a status report, she runs my script that checks the house out, and speaks back to me a list of items that are in a state I might want to be aware of (alarm not set, garage door open, basement storage lights on, etc.).
                    tenholde

                    Comment


                      #11
                      Originally posted by tenholde View Post
                      I just ask Alexa for a status report, she runs my script that checks the house out, and speaks back to me a list of items that are in a state I might want to be aware of (alarm not set, garage door open, basement storage lights on, etc.).
                      That would be handy... how did you do that?

                      Comment


                        #12
                        Originally posted by upstatemike View Post

                        That would be handy... how did you do that?
                        If you are serious about Alexa support, you MUST use Jon00 Alexa Helper. It allows you to specify what phrase spoken to Alexa will execute the operation you specify, including running a script. When I say: Alexa, STATUS report please (Alexa is only listening for the word STATUS, the rest of the phrase is window dressing for astonished friends) , Jon00's script runs the script I specified (instead of running a script, you can execute a HS Event, or control devices via CAPI controls. Your script can return a phrase that Alexa then speaks. Here is the script that I use to have Alexa announce the status of my house:

                        Code:
                        Public Function AlexaRequest(Parms As String) As String
                                ''
                                '' Return House Status as Text
                                ''
                                Dim s As New StringBuilder
                                hs.WriteLog("HouseStatus", "script started")
                                '' Build status text
                                '''' House Alarm
                                s.Append("house alarm is " & hs.CAPIGetStatus(hs.GetDeviceRefByName("Elk M1 Area Status UltraM1G3 Plugin AreaStatus 01 [Area 1 Arming Status]")).Status)
                                '''' Basement Ceiling Vents
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Main NCNTR")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Main SWEST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Main NWEST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Main NEAST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Main SEAST")) > 0 Then
                                    s.Append(",, , basement main ceiling vents are open")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Bdrm EAST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Bdrm WEST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Bdrm BATH")) > 0 Then
                                    s.Append(",, , basement bedroom ceiling vents are open")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Sewing WEST")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("JowiHue JowiHue Vent Sewing EAST")) > 0 Then
                                    s.Append(",, , basement sewing room vents are open")
                                End If
                                '''' Basement Storage Room Doors
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Storage StorageDoorEast")) <> 2 Then
                                    s.Append(",, , basement storage door east is open")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Storage StorageDoorWest")) <> 2 Then
                                    s.Append(",, , basement storage door west is open")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Storage CedarClosetDoor")) <> 2 Then
                                    s.Append(",, , basement cedar closet door is open")
                                End If
                                '''' Basement Bedroom Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom West Lamp")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom N Bed Lamp")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom S Bed Lamp")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom Bath Shower")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom Closet")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom Bdrm Ceiling Wes")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom Bdrm Bed North")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Bsmt Bedroom Bdrm Bed South")) <> 0 Then
                                    s.Append(", , basement bedroom lights are on")
                                End If
                                '''' Basement Storage Area Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Stor W Ceiling")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Stor Ctr Ceiling")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Stor SE Ceiling")) <> 0 Then
                                    s.Append(", , basement storage area lights are on")
                                End If
                                '''' Basement Main Area Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Main Ceiling")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement South Ceiling")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Stairs")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Game Table")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Bar Lights")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Hallway Ceiling")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement Closet Ceiling")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Basement East Ceiling")) <> 0 Then
                                    s.Append(", , basement main room lights are on")
                                End If
                                '''' Lower Deck Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Outside Lower Deck Cntr")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Outside Lower Deck East")) <> 0 Then
                                    s.Append(", lower deck lights are On")
                                End If
                                '''' Screened Deck Heaters
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Left Switch - Ch 1")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Left Switch - Ch 2")) <> 0 Then
                                    s.Append(", screened deck heaters are on")
                                End If
                                '''' Screened Deck Fans
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Right Switch - Ch 1")) <> 0 Then
                                    s.Append(", screened deck fans are on")
                                End If
                                '''' Screened Deck Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Middle Switch - Ch 1")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Middle Switch - Ch 2")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Deck Right Switch - Ch 2")) <> 0 Then
                                    s.Append(", screened deck lights are on")
                                End If
                                '''' Jack and Jill Bathroom
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("J and J Bath Night Light")) <> 0 Then
                                    s.Append(", jack and jill bathroom night light is on")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("J and J Bath Vanity Light")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("J and J Bath Ceiling Light")) <> 0 Then
                                    s.Append(", jack and jill bathroom lights are on")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("J and J Bath Ceiling Heat")) <> 0 Then
                                    s.Append(", jack and jill bathroom ceiling heat is on")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("J and J Bath Ceiling Fan")) <> 0 Then
                                    s.Append(", jack and jill bathroom ceiling fan is on")
                                End If
                                '''' Middle Bedroom Lights
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Middle Bedroom Lamps")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Middle Bedroom Ceiling Light")) <> 0 Then
                                    s.Append(", middle bedroom lights are on")
                                End If
                                '''' Master Bath
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath MRT Counter")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Ceiling")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Tub")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Outside Shower")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Shower")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Toilet Light")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath MRT Vanity")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Accent Light")) <> 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath EJT Vanity")) <> 0 Then
                                    s.Append(", master bath lights are on")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Fan")) <> 0 Then
                                    s.Append(", master bath ceiling fan is on")
                                End If
                                '' Great Room
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Great Room East Ceiling Fan")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Great Room West Ceiling Fan")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Great Room Lamps")) <> 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Great Room Fire Place")) <> 0 Then
                                    s.Append(", great room lights are on")
                                End If
                        
                        
                                '''' Garage
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Garage Garage Ceiling")) <> 0 Then
                                    s.Append(", ' the garage light is on")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Elk M1 Zone UltraM1G3 Plugin Zone 066 [Garage Door SO]")) <> 1 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Elk M1 Zone UltraM1G3 Plugin Zone 067 [Garage Door NO]")) <> 1 Then
                                    s.Append(", , a garage door is open")
                                End If
                                '' Do we have House Guests?
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Virtual Virtual Guests")) = 1 Then
                                    s.Append(", we have house guests")
                                End If
                                '' Is it Xmas Time?
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Virtual Virtual IsXmas")) > 0 Then
                                    s.Append(", house is set for christmas")
                                End If
                                '' Master Bath Floor
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Master Bath Floor")) <> 0 Then
                                    s.Append(", master bath floor heat is on")
                                End If
                                '' SONOS Speakers
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Office State")) = 1 Then
                                    s.Append(", office sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Kitchen State")) = 1 Then
                                    s.Append(", kitchen sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Deck East State")) = 1 Or hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Deck West State")) = 1 Then
                                    s.Append(", deck sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Sewing Room State")) = 1 Then
                                    s.Append(", sewing room sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Master Bedroom State")) = 1 Then
                                    s.Append(", master bedroom sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Basement State")) = 1 Then
                                    s.Append(", basement sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Computer Room State")) = 1 Then
                                    s.Append(", computer room sonos is playing")
                                End If
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Sonos Great Room State")) = 1 Then
                                    s.Append(", great room sonos is playing")
                                End If
                                '' Lawn Sprinklers
                                If hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 West Front")) > 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 East Side")) > 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 East Back")) > 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 West Back")) > 0 Or
                                        hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 West Driveway")) > 0 Or
                                    hs.DeviceValueEx(hs.GetDeviceRefByName("Rain8 East Front")) > 0 Then
                                    s.Append(", lawn sprinklers are running")
                                End If
                                '' Return Status as Text
                                If s.Length < 1 Then s.Append("nothing to report")
                                Return s.ToString
                            End Function
                        tenholde

                        Comment


                          #13
                          Thanks for the detailed example. I will definitrly study this and see what I can do.

                          Comment


                            #14
                            It has several methods for making unique buffer names. The most obvious choice for you is 'forward' which gives exactly what you ask -- prefix the buffer name with part of the path as a prefix.

                            However, this has a potentially unwanted side effect. Normally, buffer names are made unique by appending a suffix. When you do 'c-x b' to switch buffers if you type "foo" and you have both "foo" and "foo<1>" you will be shown the common prefix and be given the ability to supply the suffix. So, 'c-x b foo' will let you do completion where you see a list of all of the "foo" buffers.

                            If you use uniquely in 'forward' mode, you'll have buffer names of the form "bar/foo" and "baz/foo". Now, 'c-x b foo' won't take you to a foo buffer, or allow you to do completion to get a list of foo buffers. You must remember the prefix that is added to each buffer name.

                            My advice is to use the 'reverse' mode which uses the directory path as a suffix. It's perhaps slightly less intuitive, but easier to use in practice. So now you would have buffers like "foo\bar" and "foo\baz", again giving you the advantage of being able to do 'c-x b foo' and getting a list of all buffers with a filename of "foo".

                            So, add this to your .emacs file and see if you like the behavior:
                            (require 'uniquify) (setq uniquify-buffer-name-style 'reverse)

                            Comment

                            Working...
                            X