Skip to content

Commit

Permalink
Merge pull request #69 from kaulketh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kaulketh authored Mar 21, 2019
2 parents 45fc43a + 96b3963 commit b82375a
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 179 deletions.
29 changes: 13 additions & 16 deletions bot/conf/greenhouse_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@


# keyboard configs
kb1 = [[lib.group1[1], lib.group1[2], lib.group1[3], lib.group3[1]],
[lib.group3[2], lib.group2[1], lib.group2[2], lib.group2[3]],
kb1 = [[lib.channel_1, lib.channel_2, lib.channel_3, lib.channel_4],
[lib.channel_5, lib.channel_6, lib.channel_7, lib.channel_8],
[lib.grouping],
[lib.stop_bot, lib.live_stream, lib.reload]
]
Expand All @@ -53,20 +53,17 @@
# Raspi core temperature
core_temp_format = '{0}{1}{4}{2}{3}°C'

# def board pins/channels, refer hardware/raspi_gpio.info
RELAIS_01 = 29
RELAIS_02 = 31
RELAIS_03 = 33
RELAIS_04 = 35
RELAIS_05 = 37
RELAIS_06 = 36
RELAIS_07 = 38
RELAIS_08 = 40

GROUP_ALL = (RELAIS_01, RELAIS_02, RELAIS_03, RELAIS_04, RELAIS_05, RELAIS_06, RELAIS_07, RELAIS_08)
GROUP_01 = (RELAIS_01, RELAIS_02, RELAIS_03)
GROUP_02 = (RELAIS_06, RELAIS_07, RELAIS_08)
GROUP_03 = (RELAIS_04, RELAIS_05)
# board pins of relays, refer hardware/raspi_gpio.info
RELAY_01 = 29
RELAY_02 = 31
RELAY_03 = 33
RELAY_04 = 35
RELAY_05 = 37
RELAY_06 = 36
RELAY_07 = 38
RELAY_08 = 40

ALL = (RELAY_01, RELAY_02, RELAY_03, RELAY_04, RELAY_05, RELAY_06, RELAY_07, RELAY_08)

# live stream address
live = access.live
Expand Down
12 changes: 9 additions & 3 deletions bot/conf/lib_english.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@
btn_finished = 'Finished'
btn_cancel = cancel
reload = 'Reload'
group1 = ('Channel 1 to 3', 'Channel 1', 'Channel 2', 'Channel 3')
group2 = ('Channel 6 to 8', 'Channel 6', 'Channel 7', 'Channel 8')
group3 = ('Channel 4 and 5', 'Channel 4', 'Channel 5')

channel_1 = 'Channel 1'
channel_2 = 'Channel 2'
channel_3 = 'Channel 3'
channel_4 = 'Channel 4'
channel_5 = 'Channel 5'
channel_6 = 'Channel 6'
channel_7 = 'Channel 7'
channel_8 = 'Channel 8'

temp = 'Temperature'
hum = 'Humidity'
Expand Down
11 changes: 8 additions & 3 deletions bot/conf/lib_german.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@
btn_finished = 'Fertig'
btn_cancel = cancel

group1 = ('Kanal 1 bis 3', 'Kanal 1', 'Kanal 2', 'Kanal 3')
group2 = ('Kanal 6 bis 8', 'Kanal 6', 'Kanal 7', 'Kanal 8')
group3 = ('Kanal 4 und 5', 'Kanal 4', 'Kanal 5')
channel_1 = 'Kanal 1'
channel_2 = 'Kanal 2'
channel_3 = 'Kanal 3'
channel_4 = 'Kanal 4'
channel_5 = 'Kanal 5'
channel_6 = 'Kanal 6'
channel_7 = 'Kanal 7'
channel_8 = 'Kanal 8'

temp = 'Temperatur'
hum = 'Luftfeuchtigkeit'
Expand Down
21 changes: 6 additions & 15 deletions bot/ext_greenhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,19 @@
import peripherals.monitor as monitor

logging = log.get_logger()
thread = threading.Thread(target=monitor.main, name='ext bot temperature monitoring')
thread = threading.Thread(target=monitor.main, name='ExtendedBot temperature monitoring')
thread.start()

pins_state = False

markdown = "-d parse_mode='Markdown'"
no_parse_mode = conf.lib.empty

relais01 = conf.RELAIS_01
relais02 = conf.RELAIS_02
relais03 = conf.RELAIS_03
relais04 = conf.RELAIS_04
relais05 = conf.RELAIS_05
relais06 = conf.RELAIS_06
relais07 = conf.RELAIS_07
relais08 = conf.RELAIS_08

group_all = (relais01, relais02, relais03, relais04,
relais05, relais06, relais07, relais08)
group_one = (relais01, relais02, relais03)
group_two = (relais06, relais07, relais08)
group_three = (relais04, relais05)
group_all = (conf.RELAY_01, conf.RELAY_02, conf.RELAY_03, conf.RELAY_04,
conf.RELAY_05, conf.RELAY_06, conf.RELAY_07, conf.RELAY_08)
group_one = (conf.RELAY_01, conf.RELAY_02, conf.RELAY_03)
group_two = (conf.RELAY_06, conf.RELAY_07, conf.RELAY_08)
group_three = (conf.RELAY_04, conf.RELAY_05)


# water a group of targets
Expand Down
Loading

0 comments on commit b82375a

Please sign in to comment.