Jump to content

Recommended Posts

10 hours ago, Mustang65 said:

No more manual transmissions, although I can understand why with all that HP

Hey @Mustang65 - thanks for posting. Well I bought a 2020 GT500 and I can tell you that having a dual-clutch auto with rapid paddle shifters is far superior and just as much fun ... maybe more. And there is no way to outshift it manually. I get the nostalgia of banging through gears to feel like you are doing something cool, but from a performance POV its not the best approach. Anyway, fortunately there is no shortage of ways to buy vintage ponies with shifters.

Link to comment
Share on other sites

59 minutes ago, kewashi said:

For example, you can hide one of the bulbs and the other stuff using the Editor. Or you can make both bulbs small and place them side by side, or you can add the scene and then link them with an on/off switch via a RULE where on pushes the DON bulb and off pushes the DOF bulb.

I am open to other solutions for sure.

If I hide one bulb then I can only turn it on (or off) but not both?

The on/off switch via a RULE is exactly what I'm doing now but the switch is a virtual switch on the ISY side.  I hadn't considered creating the switch on the HP side.  I would need a set of RULEs on the scene to ensure the button stays in sync with the scene it case it's activated some other way.  The 2 sets of rules may prove to be an issue when the scene dims/brightens but I'll play with that idea, thank you.

Edit: I was thinking I could create a switch using the custom tile or blank tile, but not sure how to add a switch to that tile.  How do I create a virtual switch in HP?

Edited by tmorse305
Link to comment
Share on other sites

4 hours ago, tmorse305 said:

Edit: I was thinking I could create a switch using the custom tile or blank tile, but not sure how to add a switch to that tile.  How do I create a virtual switch in HP?

Here's how you do it. Make a blank tile or a custom tile -- either will work. Add a TEXT field. Name it something clever. Style it to suit your taste - with a Button Icon or whatever. Add two rules. One that checks that the switch is not xxx so it always triggers "and" it with any switch in your scene is DOF. Set the "then" to turning the scene DON=DON. Add another rule that also checks that the switch != xxx so it always triggers "and" that with any switch in your scene with DON. Set the "then" statement to turning the scene DOF=DOF. I tried to also set the trigger switch state but that causes a RULE race condition or loop that I couldn't fix, so your toggle will have to be static in look. The rules might look like:

if user1 !=xxx and 568=switch==DOF , 747=DON=DON

if user1 !=xxx and 568=switch==DON , 747=DOF=DOF

where "user1" is a custom TEXT field. The value can be anything but xxx. Also, in the above example, switch 568 is a switch in the scene and 747 is my scene tile number. Finally, you don't need the scene on the page, but you might put it there anyway to remind yourself of the scene number.

Okay - a confession... for this to work, you have to update to a minor patch (V2.402) that I posted tonight because without it user TEXT fields always inspect and do not trigger RULEs. This update also fixes a bug in how I handled Night mode auto blanking - but that only applies to SmartThings and Hubitat hubs.

 

Link to comment
Share on other sites

Thanks @kewashi, I appreciate your effort to get this to work for me!  You have created a great interface.  I previewed it with my wife and she really likes it over what we are using now.  My plan was really with her in mind, to create and easy to use intuitive interface.  HP makes that possible.  Here is what I have created for the kitchen as an example.  Some of the lights are 3 ways some are not but I wanted to created a consistent look regardless.  A quick glance and you know which lights are on.  If the virtual HP switch cannot show the light status then that's not going to work for me.  The ISY virtual switch works mostly.  It can get tripped up if the lights are dimmed/brightened.  That's why I wanted to switch to the dimmer version.  But it is workable as is.  If you figure out the dimmer great but it's a want not a need.  If you do figure out then I would need to create a rule that triggers based on light level but I think you mentioned that was possible in an earlier post.  Thank you

Screenshot 2020-10-02 095503 (Small).png

  • Like 1
Link to comment
Share on other sites

On 10/2/2020 at 10:11 AM, tmorse305 said:

You have created a great interface.  I previewed it with my wife and she really likes it over what we are using now

Thank you so much man!  This is why I do this... I may not have shared this story here, but the reason I wrote HP in the first place is that my wife hated all the available dashboard apps on SmartThings and she wanted something more colorful and intuitive like what you created. So your goal is identical to my initial motive. What you created and shared looks amazing. Thanks so much for sharing. With the flexibility of HP there are so many options for what people might create. I will keep tinkering with figuring out how to change the state of rule triggers without goofing up the rules.

Link to comment
Share on other sites

You're welcome!  I just had a thought on how to solve my dimmer/bright situation based on the rules you proposed above.  Can I create a rule based on level?  I created a rule which doesn't work but maybe it's not structured correctly, see below.  The rule works if I remove the level part.  I want the rule only to trigger above a certain level.  I'm assuming level runs for 0 to 100 as on the ISY side.  Thanks.

 

Screenshot 2020-10-03 172836 (Small).png

Edited by tmorse305
Link to comment
Share on other sites

This should work. The ISY levels are I think from 0 to 255 and I convert for display so your rule might need to trigger on 60*255/100 = 153. Let me confirm and get back to you. 

EDIT:  I checked and the level rule does work, and it is from 0 to 100 

Edited by kewashi
Link to comment
Share on other sites

Minor [RELEASE] HousePanel V2.403

This minor update includes fixes to the RULE engine to allow TEXT fields to trigger rules. This update also cleans up hints for variables, scenes, and programs to remove spaces so ISY variable is now ISY_variable, etc. 

The RULE update is to address a request from @tmorse305 so that user fields will trigger the RULE engine. With this update a user TEXT field can be used to trigger any RULE. In fact, you can test for any field and the TEXT field will trigger upon any click on the field. So for example, a TEXT field could be used to toggle a scene and the TEXT value will toggle from on to off -- and then on and off can be styled accordingly. I realize this is an advanced concept so if you want to use it just post a question here and I will walk you through it. I have a test case working perfectly.

 

  • Like 1
Link to comment
Share on other sites

On 10/3/2020 at 11:40 PM, kewashi said:

EDIT:  I checked and the level rule does work, and it is from 0 to 100 

I went back to the rule I created above and it  still didn't work.  I played with the actual level and found that the rule will operate with a level value less that 89.  Any level value 89 or higher and the rule does not work.  You're right the value comes from ISY as 0-255.  Maybe the scaling to 0-100 is off?  Thank you.

Edit: Actually more is going on here than the level.  When I create the rule I showed above (using 85 instead of 95) the rule initially works.  If I then manually increase the brightness to something less that 85 the rule does not trigger, all good.  However after that the rule is broken and will not work. Even if I reduce the brightness back to 0 then turn the switch on, the rule will not trigger.  If I do a refresh then the rule comes alive again but I can kill it by repeating the manual brightness again.  I can also restore rule operation if I play with the level slider on the tile.  If I slide the level to 100% and cycle the switch a couple of time the rule begins to work again.  It acts like the stored level value may not be getting updated all the time.  The slider does not always show the correct level.

Edited by tmorse305
Link to comment
Share on other sites

On 10/5/2020 at 8:47 AM, tmorse305 said:

It acts like the stored level value may not be getting updated all the time.  The slider does not always show the correct level.

I did some further testing and can't find any logic issues or other strange behavior with the rule engine and levels. Rules only trigger when something changes that invokes a callback from ISY via a websocket call. Most ISY calls invoke this but not all. Level sliders do. Switch state changes do. Variable changes do. etc. 

If you have complex logic I would recommend putting that on the ISY server and using variables to communicate back to HP for doing other actions. I basically only use the HP rule engine for simple things and for cross hub logic which can't be done any other way (like if an ISY motion sensor triggers and I want to turn on a SmartThings light).

 

Link to comment
Share on other sites

On 10/8/2020 at 12:59 AM, kewashi said:

I did some further testing and can't find any logic issues or other strange behavior with the rule engine and levels.

Thanks @kewashi, I think the issue is more related to the level update than a rule issue.  To test that I tried a simpler experiment.  I used a single switch, no rules, no 3 way scene, just a simple switch.  Here is the starting point:

353532108_S1(Small).jpg.b0d607e5c47932efc063570d5a626737.jpg

Next I clicked on the bulb:

1835160734_S2(Small).jpg.eb70b2efab6b2dc386e931ac880e809a.jpg

The bulb turns on at 100% but the slider is maybe 60%.  Next I clicked on the bulb again:

1944979789_S3(Small).jpg.e6015a2e7cbd1a56a02ccfef14bcdf7d.jpg

The light turns off but the slider does not update.  Finally I drag the slider to 0:

1253361072_S4(Small).jpg.f6cc919fd7e5a904065f80e8badbdaa7.jpg

The bulb turns on for some reason but you can see it is off.  If I click the bulb again the the cycle repeats.  The slide goes back to 60.  Manually moving the slider had no effect on the value. Refreshing clears the 60% slider value.

I think this behavior might be why the level rule is not working as expected.

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...
  • 2 weeks later...

Hello,

Thanks for sharing the information & I'm also in favour of smart home tools because you know in busy life shecdueld the smart tools doing important role.I have smart bulb,google assist music player. 

Is there any new smart tools are launch in market recently?

Link to comment
Share on other sites

  • 3 weeks later...

Hello @kewashi I have not seen you post in a while I hope things are going well for you. I purchased the Soma Tilt blind controller which can respond to URL GET commands. I am having trouble that ISY will control it sometimes but not every time. I tried setting it up in housepanel but the only way it works is if I put it in as a URL but then it opens a browser to run the command. I tried as Post command and it did not work but I know there is a difference in the 2 commands. Do you have any ideas on anything to try to have this be controlled by housepanel?

 

Thanks for this great program!

Tom

Link to comment
Share on other sites

Hey man ... I’m good. Just busy working on a full rewrite of HousePanel to use a database instead of flat file reads. It will be tons better but it’s a lot of work. Stay tuned. 
 

in the meantime try using a GET custom command in the customizer. Should work like URL but without the browser page open.  
 

if you send me docs I can look into adding native support. 

Merry Christmas 

Link to comment
Share on other sites

14 hours ago, tazman said:

The commands are very simple I would just need to know how to form the command in a custom tile then see if I could link it to a switch.

Turns out I had goofed up the GET customize feature.  I fixed it today, so you will now see a GET option in the customize dialog box. Use that instead of POST or URL.  Then simply paste the above line into the value box on the right. Any result returned will show up in the tile. You can suppress this by using a custom field name that starts with an underscore.  Here is an example I used to test this. This calls the Harmony API on my local network. Notice the _getstatus starts returns all fields but they are suppressed because of the underscore. the testget on the other hand returned the name of my hub and stuck it in the tile. A screen refresh is required on the first press for this to work.

Regarding my rework, it should be ready before the New Year. It is a precursor to me making a Polyglot version. I simply had to switch to using a database for the Polyglot idea to work. It was also needed to enable easier installs for SmartThings users and to use the new Hub calls. Long story but I will say more later.

 

image.png.aca3e260390739579a779370a037bea1.png

 

  • Like 2
Link to comment
Share on other sites

Thanks @kewashiI did the update and it actually fixed the lagging digital clock issue I was having! Now on to my programming instabilities, I was able to create the custom tile with the GET commands that work when I click on them but I can't figure out how to link it to a switch in ISY. I read through this thread again but all the links I see done in here are for regular devices so if I create the link on the switch card it would be "switch==on, 23=open=???" where 23 is the custom card and open is what I named the link to open the blind.

Link to comment
Share on other sites

On 12/26/2020 at 10:12 AM, tazman said:

how to link it to a switch in ISY

Here is what you need to do. First create the custom GET item on any tile. Be sure to make two - one for on and one for off, unless you have an API call to toggle it. Let’s say you called your new custom fields:

 “geton”   and  “getoff”

next make a rule that ties the DON of the switch to call the two new fields like:

if switch==DON, 23=geton=geton

if switch == DOF, 23=getoff=getoff

assuming you added the field to tile #23

the trick is to trigger a custom field by invoking it with any parameter. I like to use the field name but I think it can be anything

i haven’t tried triggering a GET or a POST from a rule but it should work. I will try one later and let you know. I do know that you can’t trigger a rule from a rule.
Edit: Per post below, this previously didn't work, but now it does after V2.414

 

Edited by kewashi
Link to comment
Share on other sites

Sorry @kewashiI don't know if I'm doing something wrong or what

I create the link on the switch tile'

get.png.43e2e84e7bbcfe5f3b27748ee696a229.pngThen I create the GET command on the custom tile.

get1.png.5b0131c7c8da271fead44543047510f8.pngThen when I operate the switch this is what happens on the custom tile.

get2.png.d0987ff552acf9b6a6360afb74603946.pngThank you for trying to help me with this!

Link to comment
Share on other sites

5 hours ago, tazman said:

Thank you for trying to help me with this!

Posted V2.414 Today

But... First - let me say thanks for finding an important limitation in HousePanel. Turns out what you were trying to do was not supported. This was a shame because it made the RULE feature with GET and POST far less useful. Well I spent a few hours today fixing that so you can now link any RULE logic to any existing GET or POST link in another tile and the function will execute, just like when you link a RULE up to a built in feature. Here is my test case, which shows you how to use it. But basically, you use it the way I described it previously, but this time it will work.

image.png.5c1ea6631d8c82e397964fc70b22d836.png

I put a GET call in the tile on the right (tile #680) that turns on a light in my house. I used the built in HP API to do this by simply calling my HP server with a GET call as follows:

lampon:    http://192.168.11.20:3080?api=doaction&tile=117&value=toggle

In my test tile #470 I have a rule that checks for its own switch to be anything so it fires upon any change in state to call the lampon GET in tile #680. I do this by checking the value to not be a bogus "x" value. If you want to have unique triggers for "on" and "off" or "DON" and "DOF" that can be done too of course.

triggerlamp:   if switch!=x, 680=lampon=lampon

With this setup when I turn the light on tile 470, it fires the rule which in turn fires the lampon GET call. Pretty spiffy. 

I took no precautions to avoid circular logic so be careful not to cause one rule to trigger itself or you will get an infinite loop with switches firing each other over and over again. The only fix to that would be to restart the server on the rPI.

 

Edited by kewashi
minor but important tweak and version ID
  • Like 1
Link to comment
Share on other sites

Hey man, I'm sorry but in the process of implementing this improvement, I also introduced a bug that causes any tile that is the target of a rule to spuriously create a fixed TEXT link field. 

I posted a one-line bugfix that solves this problem. If you notice that some of your tiles become unresponsive, then that means this bug got to you. To fix it you first need to update the hpserver.js and utils.js files with the latest Version 2.415. Then stop the server and edit your hmoptions.cfg file. Look toward the bottom for any new entries with TEXT type that have a fixed value tied to existing fields. Then remove those. Be careful to keep the json format intact. These fields will look like:

 "user_b50a1644-3b0c-40af-9108-37461b4e4a93": [
  [
   "TEXT",
   "on",
   "switch"
  ]
 ],

The bogus spurious entries are easily identified as changing important fields like "switch" as shown above.

A safer but more tedious way to fix this is to restart the server and then go into the customizer for each messed up tile, and delete the spurious custom "switch" or other created fields. The tiles will look weird because the deleted field will be missing, but after you do a Refresh they will be restored to normal by reading those fields from the hub.

Sorry about that, but progress comes with such issues.

 

Link to comment
Share on other sites

Thanks for the warning. My target tile is a custom tile and this is my first time using links so I probably would have never noticed. I did notice some extra fields that I just hide so they were not visible. I will update so I don't run into any problems. 

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...