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

Add CO feature #1384

Merged

Conversation

atrovato
Copy link
Contributor

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • [ ] If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • [ ] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Add new CO feature.

image

@codecov
Copy link

codecov bot commented Nov 28, 2021

Codecov Report

Merging #1384 (f02d771) into master (dd2b5f0) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1384   +/-   ##
=======================================
  Coverage   96.54%   96.54%           
=======================================
  Files         613      613           
  Lines        8735     8735           
=======================================
  Hits         8433     8433           
  Misses        302      302           
Impacted Files Coverage Δ
server/utils/constants.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd2b5f0...f02d771. Read the comment docs.

@Pierre-Gilles
Copy link
Contributor

I don't understand the screenshot, isn't the CO feature displaying a value in ppm ?

@atrovato
Copy link
Contributor Author

atrovato commented Nov 29, 2021

Unfortunatly no, it's a binay value: do I detect CO?
According to a sensitivity level.

EDIT: according to zigbee2mqtt case.

@Pierre-Gilles
Copy link
Contributor

Oh ok, then we definitely need a proper icon in the UI, or just a text ("Detected"/"Not detected")

"1" or "0" is very weird :)

@atrovato
Copy link
Contributor Author

Here a proposal (not pushed yet)

image

Green == 1
Red == 0
Gray == null

@atrovato atrovato force-pushed the carbon-monoxide-feature branch from 03b656d to 649e486 Compare November 29, 2021 18:40
@Pierre-Gilles
Copy link
Contributor

It's better but still it's not perfectly understandable at first sight if you don't know the meaning of this

And what about a green/red/grey "badge":

<span class="badge badge-danger">CO detected!</span>
<span class="badge badge-success">All good</span>
<span class="badge badge-secondary">No value received</span>

?

@atrovato atrovato force-pushed the carbon-monoxide-feature branch from 649e486 to f02d771 Compare December 2, 2021 21:56
@atrovato
Copy link
Contributor Author

atrovato commented Dec 2, 2021

image

So I add a new BinaryDeviceValue component, to manage this kind of display, and a "complex" i18n feature value mapping, with type and category levels (for default cases).

This screenshot is for default display
image

@Pierre-Gilles
Copy link
Contributor

Looks way better now! Good job ! 👏

Copy link
Contributor

@Pierre-Gilles Pierre-Gilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally, looks nice!

@Pierre-Gilles Pierre-Gilles merged commit 6e4275d into GladysAssistant:master Dec 3, 2021
@relativeci
Copy link

relativeci bot commented Dec 3, 2021

Job #166: Bundle Size — 6.66MB (+0.07%).

6e4275d vs dd2b5f0

Changed metrics (3/8)
Metric Current Baseline
Initial JS 2.86MB(+0.05%) 2.86MB
Cache Invalidation 63.69% 0%
Modules 1039(+0.1%) 1038
Changed assets by type (1/7)
            Current     Baseline
JS 4.75MB (+0.09%) 4.75MB

View Job #166 report on app.relative-ci.com

atrovato pushed a commit to atrovato/Gladys that referenced this pull request Jun 20, 2022
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793440 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793419 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793401 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793352 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793338 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793321 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793308 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793277 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792967 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792945 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792308 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792273 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792256 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645791714 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645791690 +0100

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Service folder

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

BUG:  Error serialization of WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Unit tests

Prettier

Missing Bundle

Use regular require

Initial commit

Tests

Integration cover

Review configuration

BUG: Error serialization of event WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Update scene.addScene.js

Remove overkiz

Update zwave.test.js

Update scene.addScene.js

Update index.js

Tests

Update index.test.js

Tests

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Upgrade zwave-js

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Upgrade ZwaveJS library

Delete zwave-js-pr.yml

Move service folder to tmp

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add compare regexp

Add scheduled jobs in task page

Initial commit

Initial commit

PR

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Unit tests

Missing Bundle

Initial commit

Tests

Integration cover

Remove overkiz

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

Unit tests

Prettier

Missing Bundle

Use regular require

Initial commit

Tests

Integration cover

Review configuration

BUG: Error serialization of event WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Update scene.addScene.js

Remove overkiz

Update scene.addScene.js

Update index.js

Update index.test.js

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Remove openzwave build

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Remove OZW

Remove OZW

Remove OZW

Remove OZW

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

BUG:  Error serialization of WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Unit tests

Prettier

Missing Bundle

Initial commit

Tests

Integration cover

Review configuration

Update scene.addScene.js

Remove overkiz

Update scene.addScene.js

Update index.js

Update index.test.js

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Fix & clean NaN device state (GladysAssistant#1394)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Change 2021 to 2022 in README & LICENSE

Add new television category/features (GladysAssistant#1365)

Add missing units on switch device (GladysAssistant#1382)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Add icon to vibration binary (GladysAssistant#1386)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Add 44 (Scene Actuator Configuration v0) in config parameters

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp
atrovato pushed a commit to atrovato/Gladys that referenced this pull request Jun 20, 2022
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793440 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793419 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793401 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793352 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793338 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793321 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793308 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645793277 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792967 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792945 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792308 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792273 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645792256 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645791714 +0100

parent b782865
author POCHET Romuald <pochet.romuald@gmail.com> 1635496602 +0200
committer POCHET Romuald <pochet.romuald@gmail.com> 1645791690 +0100

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Service folder

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

BUG:  Error serialization of WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Unit tests

Prettier

Missing Bundle

Use regular require

Initial commit

Tests

Integration cover

Review configuration

BUG: Error serialization of event WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Update scene.addScene.js

Remove overkiz

Update zwave.test.js

Update scene.addScene.js

Update index.js

Tests

Update index.test.js

Tests

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Upgrade zwave-js

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Upgrade ZwaveJS library

Delete zwave-js-pr.yml

Move service folder to tmp

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add compare regexp

Add scheduled jobs in task page

Initial commit

Initial commit

PR

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Unit tests

Missing Bundle

Initial commit

Tests

Integration cover

Remove overkiz

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

Unit tests

Prettier

Missing Bundle

Use regular require

Initial commit

Tests

Integration cover

Review configuration

BUG: Error serialization of event WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Update scene.addScene.js

Remove overkiz

Update scene.addScene.js

Update index.js

Update index.test.js

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Add CO sensor feature (GladysAssistant#1384)

* Add CO feature

* Add binary graphic

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp

Inital commit

Signed-off-by: POCHET Romuald <pochet.romuald@gmail.com>

Initail commit

Add scheduled jobs in task page

Add compare regexp

Initial commit

Add scheduled jobs in task page

Initial commit

PR

Initial commit

PR

Remove OZW

Remove openzwave build

Missing labels

Check calendar event in scene action

Prettier

Catch bluetooth init error

Remove OZW

Remove OZW

Remove OZW

Remove OZW

Remove OZW

Update Dockerfile.buildx

Update Dockerfile.buildx

Update Dockerfile.buildx

Disable bluetooth

Empty name if no summary for event

Move scheduler to scene manager

BUG:  Error serialization of WEBSOCKET_MESSAGE_TYPES.ZWAVE.NODE_READY

Unit tests

Prettier

Missing Bundle

Initial commit

Tests

Integration cover

Review configuration

Update scene.addScene.js

Remove overkiz

Update scene.addScene.js

Update index.js

Update index.test.js

Tests

Delete overkiz.jpg

Clean up

Clean up

Delete gladys-services/zwave/logs directory

Clean up

Rename service folder

Clean up

Tests

Create zwave-js-pr.yml

Update index.js

Fix & clean NaN device state (GladysAssistant#1394)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Change 2021 to 2022 in README & LICENSE

Add new television category/features (GladysAssistant#1365)

Add missing units on switch device (GladysAssistant#1382)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Add icon to vibration binary (GladysAssistant#1386)

Co-authored-by: Pierre-Gilles Leymarie <pierregilles.leymarie@gmail.com>

Add 44 (Scene Actuator Configuration v0) in config parameters

Add 44 (Scene Actuator Configuration v0) in config parameters

Delete zwave-js-pr.yml

Move service folder to tmp
@atrovato atrovato deleted the carbon-monoxide-feature branch October 31, 2022 15:44
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

Successfully merging this pull request may close these issues.

2 participants