-
-
Notifications
You must be signed in to change notification settings - Fork 893
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
[QUESTION]: websocket usage for data updates #1590
Comments
@kheinrich188 see the Wiki on websockets I wrote up a little while a go on a project I was working on with Node-Red comms via websocket https://github.com/frangoteam/FUXA/wiki/HowTo-WebSockets |
@MatthewReed303 I saw it and follow the steps but for any reason I t will not work to set the tags. Did you set your tags as an internal connection? |
@kheinrich188 I used the Fuxa Server Tags and OPC-UA connection, any reason for internal? That's front end only, so only in the clients web browser. |
@MatthewReed303 Ok so I need to keep the WebAPI Connection as it is. Then I do a 1s get update of all data until the script and websocket connection is established then I think I can stop the device fetching every 1s and update the data with the websocket data? |
As I see it is not allowed to set values when the connection has an address right?
@unocelli can you help? |
Hi there,
I’m experiencing an issue when trying to use the new WebSocket option in FUXA to update data more frequently than the 1-second interval provided by the WebAPI.
Here’s what I’ve done:
However, the behavior isn’t as expected. When fetching tag data by ID using
$getTag()
, it always returnsnull
.Example API Response:
From my WebAPI:
The WebSocket returns the following:
When I try to then
setTag(tagId, data)
I always getsetValue not supported!
Despite successfully retaining tag IDs and verifying their values using the template function
$getTag()
, attempting to access tags via$getTag('t_8f60fd-f8073b')
consistently returnsnull
.console.log($getTag('t_8f60fd-f8073b' /* stHMIInterface - iCurrentUnit */));
Environment:
FUXA Version:
1.2.3
Expected Behavior:
$setTag
to set the data to a internal device tag to get rid of the webapi connectionPlease let me know if I’m missing something in the setup or if this is a bug. Any guidance would be much appreciated!
Thank you!
Script that I configured as 1s startup delay on server:
The text was updated successfully, but these errors were encountered: