Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1fd23c0
wip
JanisDavidsons Nov 25, 2020
2ef8074
wip
JanisDavidsons Nov 25, 2020
9d49f3d
wip
JanisDavidsons Nov 25, 2020
4ecc0b4
wip
JanisDavidsons Nov 26, 2020
d7425d7
fixed slider
JanisDavidsons Nov 29, 2020
2828d9f
RGB driver functionality
JanisDavidsons Dec 2, 2020
3240597
Added draggable line chart
JanisDavidsons Dec 3, 2020
4bc7ade
wip..
JanisDavidsons Dec 3, 2020
c2c988a
added line chart for each color
JanisDavidsons Dec 3, 2020
223905b
Option to select drag color in graph
JanisDavidsons Dec 5, 2020
191b9e1
wip..
JanisDavidsons Dec 6, 2020
5904a89
wip
JanisDavidsons Dec 6, 2020
ab90aa4
wip
JanisDavidsons Dec 6, 2020
2ae2804
wip
JanisDavidsons Dec 6, 2020
50db42d
wip..
JanisDavidsons Dec 6, 2020
53bd7e4
wip
JanisDavidsons Dec 6, 2020
233d65a
Blue color bug fix
JanisDavidsons Dec 8, 2020
e590ae3
File system initializing
JanisDavidsons Dec 8, 2020
08fbe95
wip..
JanisDavidsons Dec 9, 2020
14211bf
Merge remote-tracking branch 'origin/feature/rgb_control' into featur…
JanisDavidsons Dec 9, 2020
c255e0f
RGB state is saved in file system persistence.
JanisDavidsons Dec 9, 2020
87f3139
wip..
JanisDavidsons Dec 14, 2020
f951527
On state file persistence bug fix
JanisDavidsons Dec 15, 2020
b53c7a9
wip..
JanisDavidsons Dec 16, 2020
4ee913c
wip..
JanisDavidsons Dec 22, 2020
479cbda
wip..
JanisDavidsons Dec 22, 2020
e98f70d
wip..
JanisDavidsons Dec 22, 2020
dc75eb9
Created RGB driver Singleton
JanisDavidsons Dec 30, 2020
4a25357
wip..
JanisDavidsons Dec 30, 2020
a598b82
Save day/night cycle data to API file system.
JanisDavidsons Jan 3, 2021
5148a96
Red values save and load
JanisDavidsons Jan 10, 2021
fa892f4
auto mode
JanisDavidsons Feb 22, 2021
e2e1baf
Set timerAlarms date and time.
JanisDavidsons Mar 22, 2021
39f8176
Cleanup
JanisDavidsons Mar 22, 2021
fa16d7a
Separate colors
JanisDavidsons Mar 23, 2021
ffbdf09
Wip
JanisDavidsons Mar 23, 2021
335d5a9
Separate color service
JanisDavidsons Apr 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .clang-format
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/interface/build
/interface/node_modules
.vscode
*.json
Empty file modified .travis.yml
100644 → 100755
Empty file.
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified factory_settings.ini
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions features.ini
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ build_flags =
-D FT_SECURITY=1
-D FT_MQTT=0
-D FT_NTP=1
-D FT_OTA=1
-D FT_UPLOAD_FIRMWARE=1
-D FT_OTA=0
-D FT_UPLOAD_FIRMWARE=0
Empty file modified interface/.env
100644 → 100755
Empty file.
Empty file modified interface/.env.development
100644 → 100755
Empty file.
Empty file modified interface/.env.production
100644 → 100755
Empty file.
Empty file modified interface/config-overrides.js
100644 → 100755
Empty file.
10 changes: 10 additions & 0 deletions interface/package-lock.json
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions interface/package.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"@types/react-router": "^5.1.8",
"@types/react-router-dom": "^5.1.6",
"compression-webpack-plugin": "^4.0.0",
"highcharts": "^8.2.2",
"highcharts-react-official": "^3.0.0",
"jwt-decode": "^3.1.1",
"lodash": "^4.17.20",
"mime-types": "^2.1.27",
Expand Down
Empty file modified interface/progmem-generator.js
100644 → 100755
Empty file.
Empty file modified interface/public/app/icon.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified interface/public/app/manifest.json
100644 → 100755
Empty file.
Empty file modified interface/public/css/roboto.css
100644 → 100755
Empty file.
Empty file modified interface/public/favicon.ico
100644 → 100755
Empty file.
Empty file modified interface/public/fonts/li.woff2
100644 → 100755
Empty file.
Empty file modified interface/public/fonts/me.woff2
100644 → 100755
Empty file.
Empty file modified interface/public/fonts/re.woff2
100644 → 100755
Empty file.
Empty file modified interface/public/index.html
100644 → 100755
Empty file.
Empty file modified interface/src/App.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/AppRouting.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/CustomMuiTheme.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/SignIn.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APModes.ts
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APSettingsController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APSettingsForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APStatus.ts
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APStatusController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/APStatusForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/AccessPoint.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ap/types.ts
100644 → 100755
Empty file.
Empty file modified interface/src/api/Endpoints.ts
100644 → 100755
Empty file.
Empty file modified interface/src/api/Env.ts
100644 → 100755
Empty file.
Empty file modified interface/src/api/index.ts
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/AuthenticatedRoute.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/Authentication.ts
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/AuthenticationContext.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/AuthenticationWrapper.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/UnauthenticatedRoute.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/authentication/index.ts
100644 → 100755
Empty file.
Empty file modified interface/src/components/ApplicationError.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/BlockFormControlLabel.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/ErrorButton.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/FormActions.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/FormButton.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/FullScreenLoading.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/HighlightAvatar.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/MenuAppBar.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/PasswordValidator.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/RestController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/RestFormLoader.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/SectionContent.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/components/SingleUpload.tsx
100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions interface/src/components/WebSocketController.tsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export function webSocketController<D, P extends WebSocketControllerProps<D>>(ws
}

onMessage = (event: MessageEvent) => {
console.log("incoming web socket message : ", event.data);
const rawData = event.data;
if (typeof rawData === 'string' || rawData instanceof String) {
this.handleMessage(JSON.parse(rawData as string) as WebSocketMessage<D>);
Expand Down
2 changes: 1 addition & 1 deletion interface/src/components/WebSocketFormLoader.tsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ export default function WebSocketFormLoader<D>(props: WebSocketFormLoaderProps<D
);
}
return render({ ...rest, data });
}
}
Empty file modified interface/src/components/index.ts
100644 → 100755
Empty file.
Empty file modified interface/src/features/ApplicationContext.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/features/FeaturesContext.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/features/FeaturesWrapper.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/features/types.ts
100644 → 100755
Empty file.
Empty file modified interface/src/history.ts
100644 → 100755
Empty file.
Empty file modified interface/src/index.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/Mqtt.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/MqttSettingsController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/MqttSettingsForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/MqttStatus.ts
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/MqttStatusController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/MqttStatusForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/mqtt/types.ts
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NTPSettingsController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NTPSettingsForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NTPStatus.ts
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NTPStatusController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NTPStatusForm.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/NetworkTime.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/TZ.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/TimeFormat.ts
100644 → 100755
Empty file.
Empty file modified interface/src/ntp/types.ts
100644 → 100755
Empty file.
40 changes: 40 additions & 0 deletions interface/src/project/AquariumController.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { Component } from 'react';
import { Redirect, Switch, RouteComponentProps } from 'react-router-dom'

import { Tabs, Tab } from '@material-ui/core';

import { PROJECT_PATH } from '../api';
import { MenuAppBar } from '../components';
import { AuthenticatedRoute } from '../authentication';

import DemoInformation from './Information';
import RgbStateWebSocketController from './RgbStateWebSocketController';
import RgbCycleController from './RgbCycleController';

class AquariumController extends Component<RouteComponentProps> {

handleTabChange = (event: React.ChangeEvent<{}>, path: string) => {
this.props.history.push(path);
};

render() {
return (
<MenuAppBar sectionTitle="ESP8266 Project">
<Tabs value={this.props.match.url} onChange={this.handleTabChange} variant="fullWidth">
<Tab value={`/${PROJECT_PATH}/information`} label="Information" />
<Tab value={`/${PROJECT_PATH}/rgb`} label="RGB Controller" />
<Tab value={`/${PROJECT_PATH}/rgbSettings`} label="RGB Settings" />
</Tabs>
<Switch>
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/information`} component={DemoInformation} />
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/rgb`} component={RgbStateWebSocketController} />
<AuthenticatedRoute component={RgbCycleController} />

<Redirect to={`/${PROJECT_PATH}/information`} />
</Switch>
</MenuAppBar>
)
}
}

export default AquariumController;
77 changes: 0 additions & 77 deletions interface/src/project/DemoInformation.tsx

This file was deleted.

43 changes: 0 additions & 43 deletions interface/src/project/DemoProject.tsx

This file was deleted.

42 changes: 42 additions & 0 deletions interface/src/project/Information.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React, { Component } from 'react';
import { Typography, Box, List, ListItem, ListItemText } from '@material-ui/core';
import { SectionContent } from '../components';

class DemoInformation extends Component {

render() {
return (
<SectionContent title='Information' titleGutter>
<Typography variant="body1" paragraph>
This interface allows you to control the aquarium lights.
</Typography>
<Typography variant="body1" paragraph>
It is still in development process and new features are being added on regular basis.
</Typography>
<List>
<ListItem>
<ListItemText
primary="RGB controller"
secondary="You can adjust intensity for red, blue and green colors."
/>
</ListItem>
<ListItem>
<ListItemText
primary="RGB settings"
secondary="Here you can adjust light auto cycle settings. It simulates 24 hour day/night enviroument and
change each color based on time."
/>
</ListItem>
</List>
<Box mt={2}>
<Typography variant="body1">
See my projects <a href="https://github.com/JanisDavidsons">at github</a> .
</Typography>
</Box>
</SectionContent>
)
}

}

export default DemoInformation;
Empty file modified interface/src/project/LightMqttSettingsController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/project/LightStateRestController.tsx
100644 → 100755
Empty file.
Empty file modified interface/src/project/LightStateWebSocketController.tsx
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions interface/src/project/ProjectMenu.tsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ class ProjectMenu extends Component<RouteComponentProps> {
const path = this.props.match.url;
return (
<List>
<ListItem to={`/${PROJECT_PATH}/demo/`} selected={path.startsWith(`/${PROJECT_PATH}/demo/`)} button component={Link}>
<ListItem to={`/${PROJECT_PATH}/`} selected={path.startsWith(`/${PROJECT_PATH}/`)} button component={Link}>
<ListItemIcon>
<SettingsRemoteIcon />
</ListItemIcon>
<ListItemText primary="Demo Project" />
<ListItemText primary="ESP8266 Project" />
</ListItem>
</List>
)
Expand Down
6 changes: 3 additions & 3 deletions interface/src/project/ProjectRouting.tsx
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Redirect, Switch } from 'react-router';
import { PROJECT_PATH } from '../api';
import { AuthenticatedRoute } from '../authentication';

import DemoProject from './DemoProject';
import AquariumController from './AquariumController';

class ProjectRouting extends Component {

Expand All @@ -16,14 +16,14 @@ class ProjectRouting extends Component {
* Add your project page routing below.
*/
}
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/demo/*`} component={DemoProject} />
<AuthenticatedRoute exact path={`/${PROJECT_PATH}/*`} component={AquariumController} />
{
/*
* The redirect below caters for the default project route and redirecting invalid paths.
* The "to" property must match one of the routes above for this to work correctly.
*/
}
<Redirect to={`/${PROJECT_PATH}/demo/`} />
<Redirect to={`/${PROJECT_PATH}/`} />
</Switch>
)
}
Expand Down
40 changes: 40 additions & 0 deletions interface/src/project/RgbCycleController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { Component, useEffect } from 'react';
import { Switch } from '@material-ui/core';
import { WEB_SOCKET_ROOT } from '../api';
import { WebSocketFormLoader, webSocketController } from '../components';
import { SectionContent } from '../components';
import RgbSettings from './components/RgbSettings';

export const RGB_SETTINGS_WEBSOCKET_URL = WEB_SOCKET_ROOT + "rgbCycle";
export const GREEN_COLOR_WEBSOCKET_URL = WEB_SOCKET_ROOT + "greenLight";
// const test = webSocketController(GREEN_COLOR_WEBSOCKET_URL, 100, RgbCycleController);

const RgbCycleController = (props) => {
const Test = webSocketController(GREEN_COLOR_WEBSOCKET_URL, 100, RgbCycleController);

return (
<SectionContent title='Rgb Controller' titleGutter>
<WebSocketFormLoader
{...props}
render={props => (
<RgbCycleControllerForm {...props} />
)}
/>
</SectionContent>
)
}

export default webSocketController(RGB_SETTINGS_WEBSOCKET_URL, 100, RgbCycleController);

const RgbCycleControllerForm = (props) => {

const { data, saveData, setData } = props;

return (
<RgbSettings
setDataHandler={setData}
saveDataHandler={saveData}
data={data}
/>
);
}
Loading