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

Consumer Flow Creating Issues #19

Open
4 tasks
egekorkan opened this issue May 4, 2024 · 7 comments
Open
4 tasks

Consumer Flow Creating Issues #19

egekorkan opened this issue May 4, 2024 · 7 comments

Comments

@egekorkan
Copy link
Member

  • TD is not accepted if the action does not have an input. Pasting http://plugfest.thingweb.io:8083/testthing gives tdAction.input is undefined. First, we should be more flexible since not all actions have an input. Second, the error should be pointing to the action if we want to show the error.
  • Same for properties. I get DATATYPES[tdProperty.type] is undefined when there is no type. This has no type: http://plugfest.thingweb.io:8083/counter for countAsImage
  • It would be better to add an invoke button to actions and a message saying "action invoked". Enter gives feedback if the action works as intended but if the action does not work, I cannot be sure if I managed to invoke it in the first place. Something similar would be good for properties and events as well, i.e. "property X read" etc.
  • Not sure if this is from the plugin or from flowfuse, but when I have two UIs deployed, pressing on "Open Dashboard" on the second thing's flow brings me to the first thing's UI.

Otherwise, it works

@egekorkan
Copy link
Member Author

I forgot to tag you @hidetak, but do you think you can have a look at these points? Also let me know if these are intended in a way

@egekorkan
Copy link
Member Author

After this, I think we can publish the release ;)

@hidetak
Copy link
Contributor

hidetak commented May 5, 2024

@egekorkan

Thanks for the confirmation!

TD is not accepted if the action does not have an input. Pasting http://plugfest.thingweb.io:8083/testthing gives tdAction.input is undefined. First, we should be more flexible since not all actions have an input. Second, the error should be pointing to the action if we want to show the error.

As described in the README, it is unclear how to implement the case where there are no action arguments or return values, and it is not currently supported. Do you know of any implementation examples? If there is a example, I would like to refer to it.

Sorry, the above was a comment about uncertainties regarding Server-side nodes. Your point is only about the Consumer Flow generation functionality.
I will modify it to output a text form if the TD does not contain a type.

Same for properties. I get DATATYPES[tdProperty.type] is undefined when there is no type. This has no type: http://plugfest.thingweb.io:8083/counter for countAsImage

I thought Property required a type. I'll check to see how it works without a type.

It would be better to add an invoke button to actions and a message saying "action invoked". Enter gives feedback if the action works as intended but if the action does not work, I cannot be sure if I managed to invoke it in the first place. Something similar would be good for properties and events as well, i.e. "property X read" etc.

I too thought it would be better to execute it with a button, but the timing of when the text form sends the message needs to be selected from below.

image

Therefore, if it were controlled by a button, the flow would be complicated by the need to temporarily store it in a context. Since this flow also serves as a sample for creating a WoT consumer, I thought it would be better to keep it simple and decided to control it with the enter key. I agree about displaying text when enter is pressed. I will try to fix it.

Not sure if this is from the plugin or from flowfuse, but when I have two UIs deployed, pressing on "Open Dashboard" on the second thing's flow brings me to the first thing's UI.

If multiple UIs are implemented in one flow, they can be selected from the hamburger menu in the upper left corner as shown below.

image

@egekorkan
Copy link
Member Author

Thank you taking a look!

I thought Property required a type. I'll check to see how it works without a type.

There can be directly an enum or oneOf( or other combinations words) so for properties you can generate a text field if you don't see a type

I will modify it to output a text form if the TD does not contain a type.

For actions, you should not generate any form if there's no input but that means we would need a button to invoke. I understand the annoyance it causes and for now we can have a "dummy" text input that says "please click on the text field and press enter to invoke the action"

If multiple UIs are implemented in one flow, they can be selected from the hamburger menu in the upper left corner as shown below.

Alright thanks :)

@hidetak
Copy link
Contributor

hidetak commented May 13, 2024

@egekorkan

An example of Consumer UI is provided.

image

  • Property write and action execution is now performed with a button.
  • The time when the button was pressed is displayed below the button.
  • The read button of Property is also the same.
  • The time when the value was received is also displayed in the “latest value” and “result of action” fields.

I will proceed with the implementation here, but I would appreciate any comments you may have.

@egekorkan
Copy link
Member Author

@hidetak the direction looks really nice and I do not see any issues at this stage

@hidetak
Copy link
Contributor

hidetak commented May 22, 2024

@egekorkan
I have corrected the points you raised and created a PR #25.
I apologize for the inconvenience, but I would be happy if you could check it.

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