Hubitat has the Best Logging Features


My previous home automation "hubs" included various X10 and Insteon ones. The programming language was typically at a much lower level than Hubitat. In fact with the last Insteon hub I used, the only way that I could write programs effectively was because the programming method was very similar to what I used in programing industrial control systems. Hubitat gives you incredible flexibility in programming but makes the creation of apps or programs more user friend than some of the old hubs that used low level programing.

One of really powerful features of Hubitat is the use of logs. I have never had such detailed logs as are available in Hubitat. Yesterday I was setting up a rule in Rule Machine. It was not working the way that I expected. It was very simple actually, but even scratching out a couple of examples on paper I still could not see what I had done wrong. Major brain fart. Then I discovered that I turn logging on for the rule. Not just devices, but you can actually turn on logging for rules. I did, went to bed, and at 4:30 am this morning Hubitat created a wonderful log for me to see when I got up. Shows what steps are skipped, which are executed. Wow. I saw my problem right away and I am now even happier with my Hubitat.


PLUS, you can make your own custom log entries date & time stamped. In my case I precede my entries with QQ. Then when the past log entries are displayed you can "search" for QQ and copy and paste the results to wherever you want. So my high/low temps, presence arrivals and departures, etc are all stored for reference. I agree - Hubitat Elevation is where it's at.


I did not realize that you can make your own custom log entries. How do you do that?


Not sure if this image is good - if not I'll post another. Anyway in selecting actions, choose "Send, Speak, Log Message, ...."


I did see that action, but never got around to checking it out. Thanks.


Another way to do this type of logging is to create virtual devices and update them with data you want to store and/or refer back to. I use virtual temperature sensors and set the temperature of them to my daily max and min temperatures at the end of each day. So looking at the event history for those devices gives me the daily record. I don't know if there is eventually a limit of number of events a device can store, but I haven't hit it yet if there is one. I think with past logs you can only go back so far.

Either way, I agree that Hubitat is the best!


How do you put the value of a real device in a virtual device. A Custom Action I assume. Would you share with us exactly how you do it?


My max and min daily temp values are already stored in Global Variables. I think you need that to be able to do this. So if they aren't already you need to set up GVs and set them to the relevant sensor values. That is under set variables where there is the option to set it to a sensor value.

Then I use Custom Action/set temperature and set the parameter to type string and value %globalvariablename% to set my virtual temp history sensors to those Global Variables.


Thanks for sharing that. Much appreciated.