Setting a virtual temperature sensor from a physical one every hour and not based on temp change

Hi all,
I think my conclusion after reading a bunch of community threads is that my wished scenario is not possible...but, just want to verify:
I want to log my temperature sensors (one Philips Hue Outdoor Motion sensor with temperature and two Sensative Strips Temperature Sensor) to Google Sheets every hour i.e. even if the temperature is the same/without change it shall still log.

My initial idea was to create a virtual temperature sensor that every hour picks up the temperature from the physical one, but I guess that scenario is not possible to execute, right?

Any other thoughts on how to easily log the temperature into a spreadsheet without using local servers/Raspberry Pi etc.?

Without a lot of investigation, but some experience, and @anon81541053 's reference to sending data to a Google Sheet, I would also hold some optimism this would be achievable. My initial thoughts are a schedule within a driver should suffice, or even an RM rule, either should sort out the 1 hour scheduling requirement. The "we must record a temperature" should be ok, as long as we force the exporting of the result to Google. This requirement is more dependent on ensuring data is sent out, more so than the recording of a result, i.e. even if HE doesn't trigger a "change in state" due to the same temperature being recorded, as long as we send the same result to Google every time, that is the objective. @anon81541053 's RM rule goes most of the way towards that, we probably just need to include a call to a custom Command to retrieve the Hue and Sensative Strips latest temps before sending them on to Google Sheets. Those drivers for Hue and Sensitive Strips may need to be written or identified, hopefully someone has written one.... Happy to help if I can, though I tend to over commit on things like this....

Simon

1 Like

I know that a virtual power sensor works the same as a real power sensor. I have a whole house energy meter and I graph the hourly energy data using hubigraphs. I do this by writing the hourly energy usage to a virtual sensor every hour. Occasionally the hourly energy usage will be the same two hours in a row.

When this happens I would not get a data point in my graph, because if the data does not change it does not generate an event. This sounds like what you might be experiencing?

What I did was just add .001 Kwh to the reading if it was the same. Then it is slightly different and it then generates a data point. Perhaps not the most elegant solution but it works.

1 Like

Not sure if this helps but in the Phillips Hue Outdoor Motion Sensor device you can choose to change the temperature Reporting from .5 degree C change to a time reporting. I had to do this for that very reason. This way it will report the change or not change every 5 minutes.

Thanks Paul. Every 5 mins is a bit too much loggning for me, i.e. will fill my sheet too fast :slight_smile:

Thanks terminal3. I think this might be the easiest solution that I have been suggested. One question however, how do you add the .0001 Kwh to the reading?

Thanks to both sburke781 and mircolino.
I'm trying right now. I think I got it, will test some...

1 Like

OK. This might not be the most "beatiful" solution...but it works. Note that I am using celcius degrees here, if you would read this using fahrenheit 50 might not be logical...

Step 0: I have set the virtual temp sensor to 50 degrees (i.e. any temperature "out of range" from what we can have here).
Step 1: See the below image. Badrum = Bathroom. So every 2nd hour I set the variable temp to the bathroom temperature. Then I set the virtual device to temp. I have also then a delay for 1 minute to make sure IFTTT picks up the change...

Step 2:
What happens now is that IFTTT picks up a change in temperature as I have created a rule in IFTTT, saying that if the temperature drops below 50 degrees, it shall record it into the spreadsheet.
image

Step 3:
I reset the temperature after the delay in the rule to 50 degrees so it won't trigger until next scheduled recording.

Again, not beatiful but I managed to do this without Google Sheet API calls etc. (which for me is easier). This type of solution should work for all types of sensors, i.e. motion etc. as well. For the more seasoned HE community users out there, do you think there's interest from others/shall I write a more generic post about how logging can be done to Google sheets?...

1 Like

They have times all the way up to every hour.

I have done this in the past by using this method. Worked well. apps/googleSheetsLogging at master · cschwer/apps · GitHub