Quick question for velvetfoot. When you say you installed the latest driver, did you mean the updated version of the Aeotec driver, or was it Generic Z-Wave Dynamic Endpoint Device?
I see the Aeotec Driver has been updated since I last downloaded it with the following note:
" - 0.2.3: added additional endpoint 0 refresh definition to only update Endpoint 0 with button press for third party hub integration showing only endpoint 0"
Hopefully one of you can help clear my confusion . I am using the 2.3 version of the driver from Aeotec, and a simple refresh did not update power. I implemented a manual endpoint0 refresh and it returns a number of values, including power. However, it appears the value for power that is returned is a text string, not numeric, so it does not work for comparisons.
For example, if I make a conditional, say if power>200, thenâŚIt get something like:
If power(357)>200 FALSE
I think what is happening is that it is comparing a text string with a numeric value. I also see the error in the logs.
My sense is Velvetfoot saw the same issue, but I did not quite follow how to address.
I would like to convert power to a numeric value, then use it for triggering and other purposes.
Thank you. If I understand correctly, in velvetfootâs example, he gave a variable by the name of âtestâ the string value of Endpoint-7. Then he converted that to a decimal with the name âtest_num.â Please let me know if I misunderstand.
So, one test_num is created, I assume it can be used as a decimal value for If Then statements, etc.
My other question is whether test_num can be used as a variable for a trigger in a separate rule?
[quote="mike26, post:29, topic:155746"]
Thank you. If I understand correctly, in velvetfootâs example, he gave a variable by the name of âtestâ the string value of Endpoint-7. Then he converted that to a decimal with the name âtest_num.â Please let me know if I misunderstand.Correct
So, one test_num is created, I assume it can be used as a decimal value for If Then statements, etc. Correct
My other question is whether test_num can be used as a variable for a trigger in a separate rule? I am pretty sure that is false. I think only hub variables and private Boolean can be used that way.
Also, I donât think the test variable was needed. He could have assigned the value directly into test_num if he added as decimal to the statement.
Once again, thanks. My primary use for this is to detect an electrical outage and restore, so not being able to trigger on power is a bit inconvenient. I use it to reconfigure the thermostats on my geothermal heating system and turn on a gas fireplace to use gas more efficiently than on generator alone during an outage.
I think a good alternative would be to periodically check the (converted to decimal) power value. I could run my rule and possibly use a private Boolean to manage if it had already run, although as I consider it that might not be needed, especially since a fairly long interval for running the rule would be fine.
You were correct that the variable could be created and the value converted in one step. I am using periodic schedules to monitor and respond to power readings, and for this purpose, that will be just fine. It appears to be working well.