Writing info to html

Posted on
Thu Dec 26, 2013 2:36 am
robertgerman offline
Posts: 42
Joined: Dec 14, 2013
Location: Vaxjo, Sweden

Writing info to html

Hi guys
I'd like to write some status info such as temperature and humidity to an html that I can store in the catalogue of my Webserver. Any ideas on how to do that?

Robert

Posted on
Thu Dec 26, 2013 6:05 pm
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Writing info to html

Hi Robert,

Using a python script would probably be the best approach. Is the temperature / humidity coming from an Indigo thermostat style device? If so, then here is how you access the temperature and humidity from an Indigo python script action:

Code: Select all
mythermo = indigo.devices[1234]   # use device ID which you can get by right-clicking on the device in Indigo
indigo.server.log("temperature is: " + str(mythermo.temperatures[0]))
indigo.server.log("humidity is: " + str(mythermo.humidities[0]))


That just logs the values to Indigo's Event Log window, but you could easily enough open/create a file in python and write the values to the file as HTML.

Image

Posted on
Fri Dec 27, 2013 2:42 am
robertgerman offline
Posts: 42
Joined: Dec 14, 2013
Location: Vaxjo, Sweden

Re: Writing info to html

Thanks Matt for the quick reply.

My python skills are non existing so I'll leave it at what I have today I guess, logging into the controlpage. I hoped that there was some little plugin that let's you choose to post some of the statuses to an html-file.

Anyways, thanks for the great support!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests