Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Would it be safe to use EG as a multi-room thermostat?

If you have a question or need help, this is the place to be.
Pallantir
Posts: 41
Joined: Mon May 14, 2012 6:41 pm

Re: Would it be safe to use EG as a multi-room thermostat?

Post by Pallantir »

Got five minutes to myself just now. I got an error on the script, like this:
14:08:08 Error compiling script.
14:08:08 Traceback (most recent call last):
14:08:08 IndentationError: unexpected indent (27, line 1)
14:08:08 Python Script
14:08:08 Error compiling script.
14:08:08 Traceback (most recent call last):
14:08:08 IndentationError: unexpected indent (28, line 1)
14:08:08 Error compiling script.
14:08:08 Traceback (most recent call last):
14:08:08 IndentationError: unexpected indent (29, line 1)
14:08:09 Error compiling script.
14:08:09 Traceback (most recent call last):
14:08:09 IndentationError: unexpected indent (30, line 1)
I have seen that Python uses spaces to keep together segments of code, so I guess that's what it means. I tried to mix a bit with the spaces, but it only made it worse, of course...

Another thing I would like to know: Is the 5.0 in this the cycles that it waits before it does anything else, or is it 5 minutes?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Would it be safe to use EG as a multi-room thermostat?

Post by krambriw »

U R correct, you have an indent problem as you suspect (use only spaces, 4 for each indent).

5.0 is seconds. The script will not react on new events during next 5.0 seconds after it received one.

Best reg Walter
Pallantir
Posts: 41
Joined: Mon May 14, 2012 6:41 pm

Re: Would it be safe to use EG as a multi-room thermostat?

Post by Pallantir »

Brilliant, the seconds were exactly what I was looking for. :) I actually copied your script above directly to the command, so I have no idea where the actual error is. From what I can count all the indents are spaces that come in groups of 4, there are no loose spaces anywhere. And I have tried to remove different parts of the script, but I still get the error. If you could please tell me what the error is I'm pretty sure I won't have to bother you again on this script, because then I think it will do exactly what I need it to. I'll just up the seconds to 3600 to have it happen every hour.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Would it be safe to use EG as a multi-room thermostat?

Post by krambriw »

It works without problem here....

Just make a new macro for a python script, the copy paste the script into the editor for the script that opened up (use code: select all before copying).

Otherwise, if this is not working, copy line by line and see if that works better
Pallantir
Posts: 41
Joined: Mon May 14, 2012 6:41 pm

Re: Would it be safe to use EG as a multi-room thermostat?

Post by Pallantir »

Thanks again! It worked when I copied line by line. Something went wrong every time I tried "copy all".
Post Reply