Create a rule to navigate to different dashboard pages

I am trying to create a rule the will switch between dashboards when a variable changes to true.

I installed the FKB device handler in SmartThings. Created the device and set the IP, Port and password.

I changed FKB setting as indicated to allow remote admin, set the password and enabled remote admin from local network.

I created a variable LowBattery and set to False

I created a rule to change variable to true.
Trigger

  • battery changes to or is less than 30

Flow

  • set LowBattery variable True

Action

I wanted to test this so I copied the rule but changed the trigger to when a switch changes to on, load url

Problem
Dashboard isn’t loading.

Questions

  1. Did I create the variable correctly?
  2. Did I set up SmartThings FBK device correctly?
  3. Did I create the test rule correctly?

@Terri Hope you don’t me split this into its own topic from the the other thread.

The Variable should work fine, but you don’t really need this variable in the first rule in your screenshots. The first rule is the same as “When battery is <=30, navigate to XXX dashboard”, and the variable basically doesn’t add any additional functionality here.

However, if you want to use a variable to “pause” this page redirection rule, it can be a different story. Ex: you only want it to redirect to the XXX page once when the battery first hit 30%. You can use variable to achieve that, and you can either reset the variable when the batty is >= 99% again, or manually reset it.

Here are the troubleshooting steps I’d suggest:

  1. Verify if the Remote Admin is configured correctly on FKB.

    1. Open a browser on another device and navigate to your FKB’s admin url
    2. Select speakText command from the Admin Command dropdown and send a test text. Verify if that works.
  2. In SmartThings app, find your FKB device, and tap “Find Sensor” button and verify if the tablet running FKB is playing a sound.

Can you post the URL used in your test rule’s loadUrl action so I can see the full context?

Here is my URL

javascript:postMessage({action:‘navigate’, route: {path:'/dashboard/view/xxxxx}})
xxxxx=dashboard

Encoded url

javascript%3ApostMessage(%7Baction%3A%27navigate%27%2C%20route%3A%20%7B%20path%3A%27%2Fdashboard%2Fview%2Fxxxxx%7D%7D)

For the FKB test, I did not set up any sounds. What do I need to do?

Looks like those are curly quote and , instead of '. And it’s missing another ' after the dashboard id.

Here is the modified url before encoding.

javascript:postMessage({action:‘navigate’, route: {path:‘/dashboard/view/xxxxx’}})

And this is what after encoding.

javascript%3ApostMessage(%7Baction%3A%27navigate%27%2C%20route%3A%20%7Bpath%3A%27%2Fdashboard%2Fview%2Fxxxxx%27%7D%7D)

To test out the FKB remote admin page, select Speak Text from the dropdown and just input the whatever text in the field and press Go.

To test the FKB device in SmartThings app, I don’t remember I had to setup a sound. You should be able to press the “Find Sensor” button and the tablet would make some noise.

– EDIT –
To test out the “Find sensor” button, you will need to set the Tone Audio File URL in the settings first. (Tap the three dots button at top-right corner, and tap Settings.)

And here is the test audio file URL I used.

bell.mp3

I got it working by editing the url. I had extra spaces and was missing the ’ as you mentioned. Thanks!

The remote admin page test worked. As for testing FKB from the SmartThings app, pressing Find sensor does nothing. But it’s working so I’m not too worried about that.

2 Likes