Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

  • Topic Author
  • Posted (edited)
    1 hour ago, FrankT said:

    @jgab need some help with IOSLocator.

    /F

    Output ZBS,   _deviceTable = "devicemap"

    Program starting as '"C:\Program Files (x86)\ZeroBraneStudio\bin\lua52.exe" -e "io.stdout:setvbuf('no')" "C:\Program Files (x86)\ZeroBraneStudio\myprograms\IOSLocator.lua"'.
    Program 'lua52.exe' started in 'C:\Program Files (x86)\ZeroBraneStudio\myprograms' (pid: 200800).
    C:\Program Files (x86)\ZeroBraneStudio\bin\lua52.exe: cannot open iOScredentials.lua: No such file or directory

     

     

     

    So, if you would like to test under ZBS you need to provide some configuration data. 

    There is a HomeTable variable set to a son expression in the beginning of the file used for testing. However, I add my iCloud passwords to that structure and then check in the file and everyone will know my passwords - so instead I have a local file ioscredentials.lua that has the right HomeTable data.

    Anyway, do

    Please login or register to see this code.

    on line ~25 and make sure that the _deviceTable is set to a string. Then the iosLOcator will use whatever data you have in the HomeTable variable.

    Please login or register to see this code.

    define some places, and define some users. the user is the iCloud username (usually an email address), and the pwd is the iCloud password.

    Then it should work in ZBS and it will log the users it finds. Don't run it at _SPEEDTIME as it will spam the iCloud service and they may block you for a while...

     

    ...and when it works you can move the places and users to your HC2 HomeTable and run it live.

    Edited by jgab
    Posted

    Does anyone know how to change text color in the output tab in ZBS ? (the blue text is completely unreadable) :

    Please login or register to see this attachment.

    Posted

    Perhaps this might help you: 

    Please login or register to see this link.

    Posted
    3 minuty temu, jompa68 napisał:

    Perhaps this might help you: 

    Please login or register to see this link.

     

    Found It earlier, but still don't know how to do it  :( 

    know that it depends on it

    stylesoutshell = styles -- apply the same scheme to Output/Console windows

  • Topic Author
  • Posted
    6 minutes ago, domin12 said:

    Does anyone know how to change text color in the output tab in ZBS ? (the blue text is completely unreadable) :

    Please login or register to see this attachment.

     

    It's a bit my fault.

    Look at line 142 in EventRunnerDebug.lua where I define the various LOG colors I use. There are also a code snippet to print out the colors supported by ZBS.

    If you come upon with a better color scheme please post it :-)

    Please login or register to see this code.

    So the html log colors are the ones in the LOG table, and are used when running on the HC2.

    In ZBS I exchange these colors "Cyan" etc. with the console codes in _LOGMAP.  

    • Like 1
    Posted (edited)
    7 minut temu, jgab napisał:

     

    It's a bit my fault.

    Look at line 142 in EventRunnerDebug.lua where I define the various LOG colors I use. There are also a code snippet to print out the colors supported by ZBS.

    If you come upon with a better color scheme please post it :-)

    Please login or register to see this code.

    So the html log colors are the ones in the LOG table, and are used when running on the HC2.

    In ZBS I exchange these colors "Cyan" etc. with the console codes in _LOGMAP.  

    :) thanks

     

     

     

    Please login or register to see this code.

    Edited by domin12
    Posted
    On ‎2‎/‎21‎/‎2019 at 12:01 PM, jgab said:

    So, if you would like to test under ZBS you need to provide some configuration data. 

    There is a HomeTable variable set to a son expression in the beginning of the file used for testing. However, I add my iCloud passwords to that structure and then check in the file and everyone will know my passwords - so instead I have a local file ioscredentials.lua that has the right HomeTable data.

    @jgab Thanks for pointing me in the right direction. I've been using IOSLocator since version 1.3, had my HomeTable with places and logins and all worked ok, but I didn't notice the chunk in the newer version of your program with "ioscredentials.lua ", my fault. 

     

    /F

    Posted (edited)

    @jgab

    the HUE implementation in ER, does it support :isOff?

    I have combine a binary plug with 2 hue devices like this

    Please login or register to see this code.

    but hue devices does not turnOn if i dont turnOff binary plug also. So if binary and hue is off then both will turnOn but not only hue.

    Edited by jompa68
  • Topic Author
  • Posted (edited)
    27 minutes ago, jompa68 said:

    @jgab

    the HUE implementation in ER, does it support :isOff?

    I have combine a binary plug with 2 hue devices like this

    Please login or register to see this code.

    but hue devices does not turnOn if i dont turnOff binary plug also. So if binary and hue is off then both will turnOn but not only hue.

    Can you try something like this

    Please login or register to see this code.

    ..checks the status of the lamps every 10s. Turn on/off the lamp and see if you get changes?

    Oh, there is also a _debugFlags.hue=true you can set to get some info from it.

     

    Actually, this is a better test

    Please login or register to see this code.

    just one lamp and we log the full state (:values)

    Edited by jgab
    Posted

    Please login or register to see this code.

    No changes in debug when i turn off and on

  • Topic Author
  • Posted
    1 minute ago, jompa68 said:

    Please login or register to see this code.

    No changes in debug when i turn off and on

    Sorry, my fault.  I needed to see what's in the table. 

    Please login or register to see this code.

     

    Posted

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    1 minute ago, jompa68 said:

    Please login or register to see this code.

     

    The lamp is on in all logs? What values when turned off?

    Posted

    Same value all the time.... but lamp does turn off and on :D

    Posted

    Ah! Log changes when i restart scene.

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    2 minutes ago, jompa68 said:

    Same value all the time.... but lamp does turn off and on :D

     

    Ah, now I remember how it works :-)

    Ok, ER's internal status of the Hue lamps only change if the lamps states are changed with ER commands - e.g. fibaro:call(hueID,"turnoff"), hueID:off etc.

    Because the Hue bridge don't tell anyone when a Hue lamp change state with the Hue app or some button or whatever. The only way is to poll the bridge
    for possible Hue lamp state changes.

    It's quite easy.

    Please login or register to see this code.

    see if it works...

     

    1 minute ago, jompa68 said:

    Ah! Log changes when i restart scene.

    Please login or register to see this code.

     

    Yes, because it re-reads the status of the Hue bridge

    Posted

    Please login or register to see this image.

    /monthly_2019_03/image.png.94f4da594a885118769ad8a19b8ea7ff.png" alt="image.png.94f4da594a885118769ad8a19b8ea7ff.png" />

    Wrong syntax of Hue.monitor. New function for me. can check topic how it should be. 

  • Topic Author
  • Posted
    4 minutes ago, jompa68 said:

    Please login or register to see this link.

    Wrong syntax of Hue.monitor. New function for me. can check topic how it should be. 

    Hue with a capital 'H' - e.g. Hue?

    Posted

    this correct?

    Please login or register to see this code.

     

  • Topic Author
  • Posted
    10 minutes ago, jompa68 said:

    this correct?

    Please login or register to see this code.

     

    Almost.

    If you only have one bridge you can leave out the 'hue:' prefix. The default prefix is "Hue:", capital "H". The prefix is to distinguish different Hue bridges. You set _HueHubs to
    {{name='Hue',user=_HueUserName,ip=_HueIP}}, and you can have many bridges with different names.

     

    If it is only one id to monitor you can skip the table

    Please login or register to see this code.

    The first argument to define ( "huevrum" ) is the name of the device in the Hue system.

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...