-
-
Notifications
You must be signed in to change notification settings - Fork 856
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: how to use Read Scale Script #1533
Comments
@jonbur at the bottom of the page https://github.com/frangoteam/FUXA/wiki/HowTo-Devices-and-Tags |
Hi, Thanks for this. I have seen this and believe I have followed the design pattern shown, but it does not look like the script is being applied / changing the output. Just to make sure I have this correct conceptually, the 'value' that is passed into the read script is the tag value that is read from the integration connector (in this case mqtt) and then the script manipulates it and whatever is returned should then be what we see when that tag is used elsewhere? Thank you |
Your script is actually correct. I dont know why it is not working. |
Hi, try to debug with a console.log(value); |
Hi, I hope you can help. I am having trouble with Read Scale Script and can't find any documentation.
I have several tags coming from mqtt that hves the value either 'on' or 'off', as below:
I would like to use this to drive Actions on a shape. I understand that Actions can only be driven by numerical values and therefore I am looking to convert the text values to equivalent numerical/binary values (1/0). I have created the script below and assigned it as the Read Scale Script.
However, this does not appear to work. There is no error in the logs. Even if I change the script to simply just 'return 1' in all cases I don't see a change to the value of the tag.
Am I missing something?
Thank you very much.
The text was updated successfully, but these errors were encountered: