Compare commits
No commits in common. "ed38f1fafede6f1bcc407538313db8749ff46f88" and "8dce70d9d0ab48dabfba884341965464174bf39b" have entirely different histories.
ed38f1fafe
...
8dce70d9d0
|
@ -119,7 +119,7 @@ function ChartContainer({name, data, lastFormatter, loading, children, topMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='chart' id={name.replace(/ /g,'_')}>
|
<div className='chart'>
|
||||||
<h2>{name}: {loading ? 'Loading...' : last || 'No data'}</h2>
|
<h2>{name}: {loading ? 'Loading...' : last || 'No data'}</h2>
|
||||||
|
|
||||||
<ResponsiveContainer width='100%' height={300}>
|
<ResponsiveContainer width='100%' height={300}>
|
||||||
|
@ -368,67 +368,6 @@ function BedroomTemperature({end, duration}) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function MiscTemperature({end, duration}) {
|
|
||||||
const [data, loading, tickFormatter] = useSensor('temperature', 'Misc', end, duration);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ChartContainer
|
|
||||||
name='Misc Temperature'
|
|
||||||
data={data}
|
|
||||||
lastFormatter={(x) => x.temperature_C?.toFixed(1) + ' °C'}
|
|
||||||
loading={loading}
|
|
||||||
>
|
|
||||||
<XAxis
|
|
||||||
dataKey='time'
|
|
||||||
minTickGap={10}
|
|
||||||
tickFormatter={tickFormatter}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<YAxis
|
|
||||||
yAxisId='right'
|
|
||||||
domain={[0, 100]}
|
|
||||||
orientation='right'
|
|
||||||
hide={true}
|
|
||||||
/>
|
|
||||||
<YAxis
|
|
||||||
yAxisId='left'
|
|
||||||
domain={[-40, 40]}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CartesianGrid strokeDasharray='3 3'/>
|
|
||||||
<Tooltip
|
|
||||||
formatter={(v, name) => v.toFixed(1) + units[name]}
|
|
||||||
labelFormatter={timeStr => moment(timeStr).tz('America/Edmonton').format('ddd MMM DD h:mm A')}
|
|
||||||
separator=': '
|
|
||||||
/>
|
|
||||||
|
|
||||||
<ReferenceLine yAxisId='left' x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
|
|
||||||
|
|
||||||
<Line
|
|
||||||
type='monotone'
|
|
||||||
dataKey='temperature_C'
|
|
||||||
yAxisId='left'
|
|
||||||
name='Temperature'
|
|
||||||
stroke='black'
|
|
||||||
strokeWidth={2}
|
|
||||||
dot={false}
|
|
||||||
isAnimationActive={false}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Line
|
|
||||||
type='monotone'
|
|
||||||
dataKey='humidity'
|
|
||||||
yAxisId='right'
|
|
||||||
name='Humidity'
|
|
||||||
stroke='blue'
|
|
||||||
strokeWidth={2}
|
|
||||||
dot={false}
|
|
||||||
isAnimationActive={false}
|
|
||||||
/>
|
|
||||||
</ChartContainer>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function SeedsTemperature({end, duration}) {
|
function SeedsTemperature({end, duration}) {
|
||||||
const [data, loading, tickFormatter] = useSensor('temperature', 'Seeds', end, duration);
|
const [data, loading, tickFormatter] = useSensor('temperature', 'Seeds', end, duration);
|
||||||
|
|
||||||
|
@ -902,7 +841,6 @@ function Graphs({end, duration}) {
|
||||||
<BedroomTemperature end={end} duration={duration} />
|
<BedroomTemperature end={end} duration={duration} />
|
||||||
<NookTemperature end={end} duration={duration} />
|
<NookTemperature end={end} duration={duration} />
|
||||||
<SeedsTemperature end={end} duration={duration} />
|
<SeedsTemperature end={end} duration={duration} />
|
||||||
<MiscTemperature end={end} duration={duration} />
|
|
||||||
<Thermostat end={end} duration={duration} />
|
<Thermostat end={end} duration={duration} />
|
||||||
<Gas end={end} duration={duration} />
|
<Gas end={end} duration={duration} />
|
||||||
<Water end={end} duration={duration} />
|
<Water end={end} duration={duration} />
|
||||||
|
|
25
export/.gitignore
vendored
25
export/.gitignore
vendored
|
@ -1,25 +0,0 @@
|
||||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
/node_modules
|
|
||||||
/.pnp
|
|
||||||
.pnp.js
|
|
||||||
|
|
||||||
# testing
|
|
||||||
/coverage
|
|
||||||
|
|
||||||
# production
|
|
||||||
/build
|
|
||||||
|
|
||||||
# misc
|
|
||||||
.DS_Store
|
|
||||||
.env.local
|
|
||||||
.env.development.local
|
|
||||||
.env.test.local
|
|
||||||
.env.production.local
|
|
||||||
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
image.png
|
|
|
@ -1,19 +0,0 @@
|
||||||
import time
|
|
||||||
|
|
||||||
from selenium import webdriver
|
|
||||||
from selenium.webdriver.chrome.options import Options
|
|
||||||
from selenium.webdriver.common.by import By
|
|
||||||
|
|
||||||
chrome_options = Options()
|
|
||||||
chrome_options.add_argument('--headless')
|
|
||||||
chrome_options.add_argument('--no-sandbox')
|
|
||||||
driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver', options=chrome_options)
|
|
||||||
driver.get('https://sensors.dns.t0.vc')
|
|
||||||
time.sleep(3)
|
|
||||||
|
|
||||||
element = driver.find_element(By.ID, 'Solar_Power')
|
|
||||||
|
|
||||||
with open('image.png', 'wb') as f:
|
|
||||||
f.write(element.screenshot_as_png)
|
|
||||||
|
|
||||||
driver.close()
|
|
Loading…
Reference in New Issue
Block a user