A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 294

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 168

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 237

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 317

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 358

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 294

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/brettonw/public_html/application/controllers/Blog.php
Line: 7
Function: __construct

File: /home/brettonw/public_html/index.php
Line: 319
Function: require_once

Welcome

Highbays Controlling with Daylight Sensor and Motion Sensor together

Case study
As we all know that, both of daylight sensor and motion sensor can be used to control our high bay lights, to turn on, off, or dim. Let me show you how they work.
When a daylight sensor used separately, whose light sensing threshold should be set up in advance, it will sense the ambient light at any time, then compares with the setting threshold (for example, 200lux). If less than, high bays turn on, otherwise, will keep off. So we know that high bays turning on or off, depends on the relation between the ambient light and the setting threshold.



using daylight sensor to control LED high bays

When a motion sensor used separately, it will detect human’s movement at any time. When someone comes, high bays turn on, and when the man leaves, high bays turn off after a preset period. If no one comes, high bays never be on. So we know, it depends on the human’s movement.



using motion sensor to control LED high bays
Now, questions come: What will happen when daylight sensor and motion sensor used together? And, which sensor will play the decisive role? Let’s discuss in different situations (case 1~4, please see the form below)



1.When the ambient light is more than the setting threshold, the daylight sensor will judge that the illuminance is enough, it’s no need to turn on the lamps. So high bays will not turn on, regardless whether a man comes (case 1) or not (case 2).
2.Oppositely, when the ambient light is less than the setting threshold, daylight sensor judges that the illuminance is not enough. So when someone comes (case 3), high bays will turn on, and if no one comes (case 4), high bays will never be on.
So we learn that, when daylight sensor and motion sensor used together, they both play the decisive roles. In fact, it’s similar to the AND in logic: only both of the two conditions are met, the lamps will be on.