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

Devices in "Unknown" state #496

Closed
patrik-malina opened this issue Mar 1, 2024 · 14 comments
Closed

Devices in "Unknown" state #496

patrik-malina opened this issue Mar 1, 2024 · 14 comments

Comments

@patrik-malina
Copy link

Beside Router/Network device I have several with unknown state;

  • dishwasher
  • dryer
  • washing machine
  • vacuum

Although they work as expected, always shows this status.

@Caprico85
Copy link
Collaborator

I took a look at the code. Currently, all devices without an explicit state logic show the "Unknown" state. I agree that this is misleading.

As a first step, instead of "Unknown", I would show no state at all. I wouldn't show "Failure" or "Success" as @FireWizard52 suggested. I think "Success" and "Failure" can also be misleading. A device that shows "Success" might still not work because your network is not configured correctly. A device that shows "Failure" may still work, you just injected a wrong value. Serious errors errors like no config being selected will overwrite the state with an error message anyway.

From there, I would go through all traits and/or device types and decide which states are important enough show directly on the status text. I would by no means show all states. This gets too long. If someone wants to see more states, one can still use another node to filter out states from the output and display them on their status text. Or use an external dashboard.

For the Start/Stop trait I would show wether its started. For the RunCycle trait, I would show the current cycle. This should give dishwashers, dryers, washing machines and vacuums a meaningful status text.

For the NetworkControl trait. it's hard to decide which states are important enough to show. I think none of the states is THE state you absolutely want to know about. For some people it's the network on/off state. Others don't switch their network, but they are more interested in the network speed. But the speed is rather temporary if not continuously updated, so maybe not important enough either. I tend to show no state for routers either.

@FireWizard52
Copy link
Contributor

hello @Caprico85,

You wrote:

As a first step, instead of "Unknown", I would show no state at all. I wouldn't show "Failure" or "Success" as @FireWizard52 suggested. I think "Success" and "Failure" can also be misleading. A device that shows "Success" might still not work because your network is not configured correctly. A device that shows "Failure" may still work, you just injected a wrong value. Serious errors errors like no config being selected will overwrite the state with an error message anyway.

With my suggestion of using "Success" and "Failure", I was not very sure, that this would be the best solution.
I agree with you that it also might cause confusion. So it is better to have no status information at all.

I would by no means show all states. This gets too long.

Agree, as that will be impossible.

For the NetworkControl trait. it's hard to decide which states are important enough to show. I think none of the states is THE state you absolutely want to know about

One is not more important as the other.

But the speed is rather temporary if not continuously updated, so maybe not important enough either. I tend to show no state for routers either.

If you update only by means of your Google devices, you are correct.
I see it more as a sensor, and every hour it tests automatically the network speed and so updates the value.
For me it would be fine, but if it shows no state, it is fine for me, too.

Regards

@ckhmer1
Copy link
Contributor

ckhmer1 commented Mar 4, 2024

Hi,
Another possibility could be to add a new jsonata field for defining the status to show. In this way everyone could decide the info to show in the status.
I'm wondering if the status in the node editor is so important.

@FireWizard52
Copy link
Contributor

Hi,

No, I don't think that the status in the node editor is very important, I think that most people use it in order to check that their flow is working.

Do not spend too much of your time on it.

@patrik-malina
Copy link
Author

Hi,

No, I don't think that the status in the node editor is very important, I think that most people use it in order to check that their flow is working.

Do not spend too much of your time on it.

I agree with that...

@Caprico85
Copy link
Collaborator

I pushed some new changes. For the StartStop and RunCycle traits it now shows if it is started and the current cycle.

image

If a device doesn't have any status logic, nothing is shown.

image.

I'm currently converting the dishwasher into an example, then I'll release this as a new version.

@patrik-malina
Copy link
Author

patrik-malina commented Mar 10, 2024

Good job. Thanks.

One Q: Can you make start/stop trait not to be mandatory on washer, dryer and disher? Mine does not have those.

I know Google says it is mandatory, but also on doors and locks there is mandatory PIN, but it works without it.

@Caprico85
Copy link
Collaborator

One Q: Can you make start/stop trait not to be mandatory on washer, dryer and disher? Mine does not have those.

I expected Google to give an error. But it actually seems to work. Done, will be included in the next release.

@patrik-malina
Copy link
Author

Thank you. I'm closing this issue.

@ckhmer1
Copy link
Contributor

ckhmer1 commented Mar 13, 2024

Hi Caprico,
Could you please add a comment in the code, just to remember that should be mandatory, but Google doesn't complain if missing. Perhaps one day Google starts to complain about it.
Thanks

@Caprico85
Copy link
Collaborator

I already did when I changed it in 40440ae.

@Caprico85
Copy link
Collaborator

Changes published in v0.4.11

@patrik-malina patrik-malina reopened this Mar 16, 2024
@patrik-malina
Copy link
Author

I tested this. Google wont throw error, but on Home app and Hub it still shows play/stop button, so you can revert changes back.

@Caprico85
Copy link
Collaborator

Reverted it.

I didn't had the start/stop buttons. I had an empty blue circle in the app. I think that was supposed to be the RunCycle indicator. But I wasn't able to show anything on this circle. Maybe because without the StartStop trait, the device isn't actually started and therefore won't show any progress.

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

4 participants