Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Websocket backend #35

Open
RaHoni opened this issue Nov 1, 2019 · 8 comments
Open

Websocket backend #35

RaHoni opened this issue Nov 1, 2019 · 8 comments
Assignees
Milestone

Comments

@RaHoni
Copy link
Member

RaHoni commented Nov 1, 2019

An backend for Websocket for Website and possible Apps

@RaHoni RaHoni added this to the GUI milestone Nov 1, 2019
@RaHoni RaHoni self-assigned this Nov 1, 2019
@RaHoni RaHoni modified the milestones: GUI, Grundstruktur schaffen Nov 1, 2019
@RaHoni RaHoni pinned this issue Jan 14, 2020
@RaHoni RaHoni modified the milestones: Grundstruktur schaffen, GUI Jan 14, 2020
@RaHoni
Copy link
Member Author

RaHoni commented Jan 14, 2020

General Handler: uiControl

Input: JSON: {"Command":"Command","Args":{List with Args, Identified}
on Args: {"percent": 0...1,id:"id"} Handler: Switch object
off Args: {"id":"id"} Handler: Switch Object
getDevices: Handler GUI |requesting All devices
getDevice Args:{"id":id} Handler GUI requesting all Information on this device

Answer: {"Command":"Command",answer:object}
statusChange Arg {"id":"id",status:0...1}
getDevices Arg: {devices:[{"id":"id","name":"Switch Name","status":0...1, "type":"slider/button"},...]}
getDevice Arg: {"id":"id","name":"Switch Name","status":0...1, "type":"slider/button"}
newDevice Arg: {"id":"id","name":"Switch Name","status":0...1, "type":"slider/button"}
"error":{"error":"msg"}

@maximiliani
Copy link
Member

We should add a function to modify setting of the software and devices!

@RaHoni
Copy link
Member Author

RaHoni commented Feb 14, 2020

We should add a function to modify setting of the software and devices!

all you have to do is make an Comment with the Protocol that should be used (like Above)

@maximiliani
Copy link
Member

maximiliani commented Feb 14, 2020

settingsMain Args: {setting:"SettingsName", value:"value"}
settingsDevice Args: {id: "id", setting:"SettingsName", value:"value"}

@RaHoni
Copy link
Member Author

RaHoni commented Jul 10, 2020

addDevice:

  • mqtt Args: {"id":"id","name":"name","switchType":"mqtt","controlType":"button/slider"}
  • 433Mhz Args: {"id":"id","name":"name","switchType":"433Mhz","controlType":"button","systemCode":"00000-11111","unitCode":"00000-11111"}

The arguments are not allowed to have the name type because of the Scala interpretation on this word.

@RaHoni
Copy link
Member Author

RaHoni commented Aug 3, 2020

Implemented:
on, off, getDevices, addDevices, getDevice, newDevice

@RaHoni RaHoni mentioned this issue Aug 20, 2020
@maximiliani
Copy link
Member

maximiliani commented Aug 28, 2020

Example JSON for addDevice:
{"Command":"addDevice","Args":{"id":"12345","name":"12345","switchType":"433Mhz","controlType":"button", "systemCode":"00000","unitCode":"11111","keepState":true}}

RaHoni added a commit that referenced this issue Oct 2, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
… in #35 because the answer should be like {"Command":command,"answer":{answerObject}}.
RaHoni added a commit that referenced this issue Nov 13, 2020
… in #35 because the answer should be like {"Command":command,"answer":{answerObject}}.
@RaHoni
Copy link
Member Author

RaHoni commented Feb 22, 2021

settingsMain Args: {setting:"SettingsName", value:"value"}
settingsDevice Args: {id: "id", setting:"SettingsName", value:"value"}

The change of the Data of a Switch should work with the same structure as addSwitch but instead of id it uses oldId and newId this way the handling for the server and the Client is more easy because no one must detect what was changed.

@maximiliani maximiliani removed the PK label Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants