Some home automation

Talks about metering
lueila
Posts: 16
Joined: Wed May 15, 2019 9:40 am

Re: Some home automation

Post by lueila » Tue May 28, 2019 2:13 pm

Hi Jeanmarc
Yestarday I did some test (no enough time) and find daemon more fast than others but the delay is 27 sec about (40 sec with timer/service).

In daemon loop there is unsleepe setted 500000 I don't know if this could help the command to reduce the delay (i'll check it)

At moment it commands a led but the idea is to have all utilities under switchs in order to switch off automaticly one of them when the power exceed a level to evoid to open the main switch.
In fact my next target is to have some different thresholds with MAXVAL(1/2/3/4 etc) and give input to GPIO1-2-3-4 etc... (i dont know if it is possible, I think so)

Also take under control the power /energy for each utilities.
Is this goal reacheble what do you think?
Anyway step by step, but the first thing I need to find fast input.

jeanmarc
Posts: 1829
Joined: Thu Aug 29, 2013 7:16 am

Re: Some home automation

Post by jeanmarc » Tue May 28, 2019 2:29 pm

I don't know what cause such delay.. Is simple GPIO comand slow ?
You can remove the sleep, it's mainly there to avoid the script sucking your CPU.

That's surely possible to ajust it for your needs.

lueila
Posts: 16
Joined: Wed May 15, 2019 9:40 am

Re: Some home automation

Post by lueila » Tue May 28, 2019 3:05 pm

If I launch the script (both close contact GPIO and over_script - "with power exceed") by terminal, contact GPIO closes very fast.
I'll do it (reduce or delete unsleep).
I need time and some trials
The most important thing that the scripts is ok :)

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests