Unable to Get Initial C-Bus Group Values - driving me to distraction

Discussion in 'C-Bus Wiser 2 Controller' started by riprap, Nov 1, 2022.

  1. riprap

    riprap

    Joined:
    Jun 20, 2013
    Messages:
    5
    Likes Received:
    0
    Location:
    London
    I thought my need was very straightforward, but I'm failing at every turn. I admit that I am an amateur, so I would be grateful for any pointers as I am hoping it is simply that I cannot see the word for the trees!

    My issue is that after updating my Wiser2 to the latest Firmware, I cannot get my logic to read in initial C-Bus Group values when I first launch their iPhone App.

    Simply I have a c-Bus group for a Curtain that is open or closed (ID 44) which is interfaced with C-Bus as a Bell Push connected to a rocker switch. I have a System String Variable that I populate with a message depending on that C-Bus Group Status (ON or OFF). This variable is displayed as a Widget in the Wise2 App via a SystemIO String.

    All I want is for the Widget Message to display correctly when the app opens, depending on if the curtain is open or closed at that point.

    I thought it would be a simple matter of adding this code to the Initialisation Module thus:

    if (GetLightingState(44) = ON) then
    Curtain4StatusString := 'Curtain 4 is Open'
    else
    Curtain4StatusString := 'Curtain 4 is Closed'
    ;
    SetStringSystemIO("Curtain4StatusIO", Curtain4StatusString);

    But the Wiser doesn't seem to get the current status of C-Bus Group 44 when the App loads. Previously, the Wise2 seemed to store the old values when the App was not running, so this was not that irritating, but since the update, every time the App loads it clearly runs the Initialisation Module again.

    I have set up two side by side widgets on my app; the C-Bus Group 44 as a Widget and next to it the System IO String and when the App starts, it does not matter what state the Curtain 4 (group 44) Widget shows (on or off), the System IO String is always 'Curtain 4 is Closed'.

    Changing the same System IO String, in the same way but by using 'Once' statements in a 'Modules', updated the message in sync with the curtain opening and closing whilst the App is open on my phone or if I manually change the status of C-Bus Group 44 in the widget on the Phone.

    However, I am at a loss as to how to get the wiser2 to pick up the initial C-Bus group status when the App first loads.

    All help gratefully received.
     
    riprap, Nov 1, 2022
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.