tmorse305 Posted January 11, 2021 Posted January 11, 2021 Hi @kewashi, Can I create a rule that compares 2 nodes and updates a text node based on the outcome? I want to create a node in a program tile that indicates if the "then" is running (in this program the then routine runs for 1 hour). I tried this rule but it doesn't seem to work. The rule always execute regardless of the 2 values being equal or not. Thanks for your help. Tim
kewashi Posted January 11, 2021 Author Posted January 11, 2021 Yes - you can do what you are trying to do, but you have to use a special notation to tell the rule engine to use the "value of" the field referenced. The way you entered it, it will only run if lastRunTime is actually equal to the test "lastFinishTime" which will never be true. I'm a little puzzled why the rule always runs - that seems off. Anyway, the proper way to do this is to say: if lastRunTime==$lastFinishTime, 299=runstatus=stopped The $ sign tells the rule engine to compare the value in the lastRunTime node to the value in the lastFinishTime node instead of the text "lastFinishTime". Also, when comparing time fields you have to be a little careful because the rule engine tries to convert the date/time to the standard Unix format of seconds since 1971 to do the comparison. If that fails then the comparison will fail too. I can't remember if I did that for lastRunTime and lastFinishTime -- I know I did for clock "time" fields. I probably forgot, so let me check that. Anyway, the text comparison should still work fine for == tests. Also, you can compare to a node value in a different tile using the following @ symbol notation: if switch==@761$switch, 543=switch=toggle I put this rule into my Tile #117, which cause the light of Tile #543 to toggle state when the switch of tile #117 matches the state of tile #761. This is a real example that I just tried to confirm that it really works. I added this feature some time ago and never really publicized it.
tmorse305 Posted January 12, 2021 Posted January 12, 2021 (edited) Thanks @kewashi. I tried the rule as you suggested but it still didn't work. It also crashed HousePanel in the process. Log attached. At this point I had to delete the rules to keep it running. Then I recalled an earlier post that we had. ISY actually passes the status of the program to you via the web socket. See below. Currently I think you only extract the True/False status. Is there a way you could also extract the run status as well to make it available? The node could have 4 values instead of 2; True, False, Running Then, Running Else. The @ rule is interesting, it seems like you could create 3 way switches hosted with different controllers. Thanks again for all of your help. Tim hpserver.log Edited January 12, 2021 by tmorse305
kewashi Posted January 17, 2021 Author Posted January 17, 2021 Hey - sorry about the delay. Yes, this is an easy change. I can just load the actual value in the status field so it shows 21, 31, or whatever for the state it is in. This field is likely only useful for a RULE and won't be displayed to the user anyway, so my original intent of translating the state to true and false need not be done. Although I should mention that the initial node state only sets the status to "true" or "false" so it will be inconsistent with the init value. I made the change and will post an update tomorrow (Sunday). 1
kewashi Posted January 17, 2021 Author Posted January 17, 2021 On 1/12/2021 at 10:31 AM, tmorse305 said: crashed HousePanel in the process. Log attached I looked at your log and it appears to be crashing in a console.log debug print statement with some type of buffer overflow. Please confirm you don't have any circular rules - that would cause this issue. I can't find any link between this error and the "$" feature. Will keep looking.
tmorse305 Posted January 17, 2021 Posted January 17, 2021 (edited) Hi @kewashi, thank you for the reply. At this point I don't have any rules in use except for the 2 I create using the $ feature. I deleted those and now all is well. Thanks for making the change to expose the additional values of the status field. That will eliminate the need for the rules we've been discussing. Edited January 17, 2021 by tmorse305
tmorse305 Posted January 20, 2021 Posted January 20, 2021 Hi @kewashi, Thanks for the update, the status values are now showing the numerical value. I tried to write a rule to create the text labels but the rule doesn't work. It seems structured correctly, what am I missing? I initialized the text field with "null". Thanks again. Tim
kewashi Posted January 21, 2021 Author Posted January 21, 2021 16 hours ago, tmorse305 said: It seems structured correctly, what am I missing? Oh boy... well, you weren't missing anything. I actually wrote a comment in the code that said "skip processing rules for programs since that seems silly". My logic at the time was if someone was using a program tile wouldn't they put the logic inside the program? What I didn't anticipate was a power user like you that wanted to set a text field or do other useful things with the powerful rule engine. Well I have now enabled it and tested it and what you are trying to do works fine. Update the main hpserver.js and utils.js files as usual to V2.417 and you will be good to go. 2
tmorse305 Posted January 21, 2021 Posted January 21, 2021 (edited) On 1/16/2021 at 11:32 PM, kewashi said: Although I should mention that the initial node state only sets the status to "true" or "false" so it will be inconsistent with the init value. @kewashi, I should be able to write a rule to correct this in my text value? See below, it does not seem to work. Perhaps the status field cannot be both a numeric and a text string for rule processing? Thanks again. Edited January 21, 2021 by tmorse305
kewashi Posted January 21, 2021 Author Posted January 21, 2021 The rule will never fire because true is never set as a result once the panel loads the hub data. It is only set when the hub is first initialized. I think your rule should focus only on responding to 21, 31, and other numbers. You can use the initial true as a secondary logic test which just checks the existing state, but the first logic test must be something that triggers. For example: if switch=on and 342=status=true, 25=mystat=onandtrue will work if the program has never fired. 2
tmorse305 Posted January 22, 2021 Posted January 22, 2021 Got it, thank you for the explanation. It's only an issue on reboot so it's easy to live with.
kewashi Posted January 22, 2021 Author Posted January 22, 2021 (edited) I might set the Initial value of the state to 21 or 31 instead of true and false. Edited January 22, 2021 by kewashi 1
60Driver Posted October 15, 2021 Posted October 15, 2021 I am looking at options for display of ISY functions on wall mounted tablets. HousePanel appeared promising but I noticed all discussions on it appear to have stopped last January with the above post. What is the state of it now? I found a website but it doesn't appear to have evolved much either.
tazman Posted October 15, 2021 Posted October 15, 2021 I'm still using it. I think it is great but I have not checked to see if @kewashihas made any updates lately.
MrBill Posted October 15, 2021 Posted October 15, 2021 (edited) 13 hours ago, 60Driver said: I am looking at options for display of ISY functions on wall mounted tablets. HousePanel appeared promising but I noticed all discussions on it appear to have stopped last January with the above post. What is the state of it now? I found a website but it doesn't appear to have evolved much either. You might want to checkout Home Assistant. It plays well with the ISY, and so much beyond. There is a core integration named "Universal Devices ISY994" I've only created dashboards for use on my phone, but many others use Home Assistant with wall mounted tablets. There is also a sub-forum in this forum dedicated to Home Assistant and the ISY. Edited October 15, 2021 by MrBill 1
asbril Posted October 15, 2021 Posted October 15, 2021 18 minutes ago, MrBill said: You might want to checkout Home Assistant. It plays well with the ISY, and so much beyond. There is a core integration named "Universal Devices ISY994" I've only created dashboards for use on my phone, but many others use Home Assistant with wall mounted tablets. There is also a sub-forum in this forum dedicated to Home Assistant and the ISY. While I don't use wall panels, I use Home Assistant extensively and it is very powerful and reliable. I have HA in my Chrome browser on my computers and also the app (with monthly fee) on my Iphone. However, the Iphone App is not being used much anymore since UDI / @Javi developed UD Mobile.
MrBill Posted October 15, 2021 Posted October 15, 2021 46 minutes ago, asbril said: (with monthly fee) To clarify, the app does not have a monthly fee, the app can be used free of charge on the local network. It can also be used free outside the local network for those that want to jump through some hoops. Or like @asbril and I have done, a $5 monthly fee can be paid for an account on the Home Assistant cloud component. The cloud component provides remote access with no open ports and provides a secure connection to Alexa/GH/webhooks. 1
asbril Posted October 15, 2021 Posted October 15, 2021 (edited) 4 hours ago, MrBill said: To clarify, the app does not have a monthly fee, the app can be used free of charge on the local network. It can also be used free outside the local network for those that want to jump through some hoops. Or like @asbril and I have done, a $5 monthly fee can be paid for an account on the Home Assistant cloud component. The cloud component provides remote access with no open ports and provides a secure connection to Alexa/GH/webhooks. Thanks @MrBill for the clarification. With the arrival of UD Mobile I don't really anymore need the cloud off-location Home Assistant connection, but I maintain my $ 5 subscription to support the development. I am a great fan of supporting those who add value and I look forward to be able support node server developers when (I believe) this will become possible in Polyglot 3. Edited October 15, 2021 by asbril 1
60Driver Posted October 16, 2021 Posted October 16, 2021 Thanks for the feedback. You all are supporting the conclusion I have reached. One additional clarification, since I am still new at the ISY and home automation. Oh the HP website it says the software is loaded on the ISY Hub. The conclusion I reached is the "Hub" would be a Polisy node server. It is not referring to the ISY994ZW. I could not find the term "Hub" anywhere on Universal Devices web pages, so I am assuming it is a generic term for a server.
tazman Posted October 16, 2021 Posted October 16, 2021 My understanding is it could be run on the polisy separate from polyglot. I run it on a Raspberry Pi.
tmorse305 Posted October 16, 2021 Posted October 16, 2021 (edited) 16 hours ago, 60Driver said: Oh the HP website it says the software is loaded on the ISY Hub The HP site says: "HousePanel is designed to work with SmartThings, Hubitat, and Universal Devices ISY hubs". By "hubs" he means automation controllers like ISY994. The site also says that the user loads the software on their own server. The server is anything running linux like operating systems. That could be the Polisy box or a Raspberry Pi or something else. Edited October 16, 2021 by tmorse305
tazman Posted November 3, 2021 Posted November 3, 2021 I'm having trouble getting Housepanel to work with ISY on the Polisy so if anybody tries it or gets it to work it would be nice if you could post an update in here Thanks Tom
Recommended Posts