74 Commits

Author SHA1 Message Date
Pim van Pelt
3215ed2d95 Winter-time adjust - OK(marina) 2019-11-08 00:55:06 +01:00
Pim van Pelt
3ea9a16adb Add skeleton of FollowSun.* RPCs 2019-10-03 21:56:54 +02:00
Pim van Pelt
94e3b20548 Add Timespec.Replace RPC -- clear+set 2019-10-03 21:43:48 +02:00
Pim van Pelt
03d6a36e0a Add a comment on cosH bounds 2019-10-03 08:57:30 +02:00
Pim van Pelt
2c0207b3eb The permanent dark/light can only happen beyond the polar circles 2019-10-03 08:54:48 +02:00
Pim van Pelt
5715977e62 Simple sunset/sunrise algorithm 2019-10-02 23:55:32 +02:00
Pim van Pelt
b2452a97db Final winter schedule 2019-10-02 23:44:21 +02:00
Pim van Pelt
3bb48e0448 Retire old fork of OTA 2019-09-29 21:09:52 +02:00
Pim van Pelt
862803b87b Remove SSL mqtt; Switch to upstream OTA 2019-09-29 21:09:23 +02:00
Pim van Pelt
4e546a20fd Add unit0 - Heli's new (second) controller. 2019-09-29 21:08:35 +02:00
Pim van Pelt
cd03610647 Pull back lights-out 30min. OK(marina) 2019-09-27 20:03:21 +02:00
Pim van Pelt
bc4293bc30 First phase winter-planning: all lights +30min start time, same end time. OK(marina) 2019-09-23 10:00:47 +02:00
Pim van Pelt
5ba1186a9c New timers for summertime 2019-04-01 10:50:55 +02:00
Pim van Pelt
fbd3ba98d3 Add doall.sh configuration helper 2019-03-31 13:13:59 +02:00
Pim van Pelt
51ca1de390 Move to published Prometheus Sensors library 2018-11-21 00:10:46 +01:00
Pim van Pelt
02865fde72 Call mqtt_publish_stat() after setting state, not before 2018-11-05 08:17:32 +01:00
Pim van Pelt
06241f2581 Ensure MQTT messages are only set if state actually changed 2018-11-05 08:04:21 +01:00
Pim van Pelt
b7467e3be1 add mqtt_publish_stat() for override and timespec changes; add channel_override_clear(); call c_o_c() when Timespec.Clear removes the timespec, as there is no concept of overrides when there is no timespec set 2018-11-04 20:50:23 +01:00
Pim van Pelt
aa3c0b0cda Align log_print_prefix() elements, with truncation if they're too long 2018-11-04 20:18:27 +01:00
Pim van Pelt
8d9ed882c1 Stop setting channel_override_set() in RPC calls to change the Timespec; Detect if timespec is empty and skip driving the channel in this case 2018-11-04 20:02:49 +01:00
Pim van Pelt
8149a6cd10 add timespec_empty() unit test 2018-11-04 19:56:08 +01:00
Pim van Pelt
8c6b2f399b add timespec_empty() 2018-11-04 19:55:54 +01:00
Pim van Pelt
9af4c4b3a6 Add notes for Sonoff 4CH updates (ensure to copy out timespec.chan*; remove 1MB build 2018-11-04 19:41:14 +01:00
Pim van Pelt
8624473386 Bump version to 1.4 -- now with timespec handling! 2018-11-04 19:19:36 +01:00
Pim van Pelt
61ddb0334e Commit timespec to file on Timespec.Add; Unlink timespec file on Timespec.Clear; Initialize timespec from file in channel_init() 2018-11-04 19:19:17 +01:00
Pim van Pelt
8c4864b199 Remove danlging vim swap file 2018-11-04 18:57:37 +01:00
Pim van Pelt
f5ea934dfb Add timespec_{read,write}_file() and unit tests 2018-11-04 17:40:12 +01:00
Pim van Pelt
5b79487ab8 Format with uncrustify 2018-11-04 16:45:23 +01:00
Pim van Pelt
31dcf28ff0 Add Timespec.{Get,Clear,Add} RPCs 2018-11-04 16:45:05 +01:00
Pim van Pelt
560c81cbfd Add channel_get_timespec() 2018-11-04 16:44:47 +01:00
Pim van Pelt
f8a13112b6 Fix signedness comparison for ESP8266 compiler 2018-11-04 16:22:09 +01:00
Pim van Pelt
a01e548249 add timespec_clear_spec() and timespec_get_spec() 2018-11-04 16:17:35 +01:00
Pim van Pelt
0ad33f5fbc Add timespec() and channel_override logic -- so we can install a time specification with which the channels are driven, but yet allowing a human override (either by RPC or by Button) 2018-11-04 15:44:17 +01:00
Pim van Pelt
d5778c6fba Add timespec_match_now() based on localtime() 2018-11-04 15:43:32 +01:00
Pim van Pelt
af9db0395d Add SNTP library 2018-11-04 15:42:08 +01:00
Pim van Pelt
5c26d2d43b format with uncrustify 2018-11-04 14:19:00 +01:00
Pim van Pelt
8cfcfc9af3 Add mgos_gpio_read(); mgos_[mu]sleep() 2018-11-04 14:17:00 +01:00
Pim van Pelt
5ebd4b112a Make default app.config be nodemcu v2 board; Clear sensors.dht_gpio, make users actually set this 2018-11-04 14:11:10 +01:00
Pim van Pelt
3ae64cfc37 Add standard NodeMCU v2 board 2018-11-04 14:10:39 +01:00
Pim van Pelt
5a39c618ce Allow LED and Relay logic level to be inverted 2018-11-04 14:10:28 +01:00
Pim van Pelt
b29edab495 Add 'duration' argument to Channel.Set RPC call 2018-11-01 21:01:37 +01:00
Pim van Pelt
75eccd0447 Move to a struct with args in channel_set_cb() 2018-11-01 20:57:24 +01:00
Pim van Pelt
8eb6bcb112 add channel_set_duration() for timer based polls 2018-11-01 20:29:51 +01:00
Pim van Pelt
3140cc72b8 Log to chumbucket by default, set the device hostname to 'test-device' 2018-11-01 14:48:01 +01:00
Pim van Pelt
6434cb6db0 Sleep the MCU 250ms after relay on switches, to avoid brownouts. Scan the pushbutton for 100ms to ensure it was still pressed, to avoid RFI from triggering 2018-11-01 14:47:35 +01:00
Pim van Pelt
d332f08da4 Make distinction between channels toggled via GPIO (button) or RPC 2018-11-01 14:31:59 +01:00
Pim van Pelt
f1614f3e6e Remove 50ms sleep time, it doesn't help 2018-11-01 14:12:13 +01:00
Pim van Pelt
d673cda325 Remove cooldown check - this is not what we're looking for 2018-11-01 14:11:37 +01:00
Pim van Pelt
08453f3b5d Log by default to stderr/stdout, make user disable this explicitly for units which use GPIO 1,3 2018-11-01 14:11:21 +01:00
Pim van Pelt
23b2e37a1f Add some notes to README 2018-11-01 14:10:40 +01:00