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

Posted (edited)

This is a QA under development that imports IKEA Dirigera registered devices as HC3 devices.

Besides investing in the hub, the devices are pretty cheap... and having the hub we can have an efficient API and reliable support for the Ikea Zigbee devices :-)

Btw, it's a web socket api so no polling and quick updates...

Recommend to update/install with <

Please login or register to see this link.

 

  1. Set the IP quickVar to the Dirigera IP address
  2. Press "Request token"
  3. Press the action button on the underside of the Dirigera hub
  4. Press "Get token"
  5. If successful, select device that should be mapped in the UI drop down list and restart the QA. The QuickAppChildren for the selected devices will be created.

 

There is still some stuff missing

  • Lack of device support for stuff I don't have, roller shutters, water alarm etc.

...If people have other devices or need different functionality, please feel free to improve on the code... 

 

Tested with:

  • Smart plug INSPELNING (energy reporting not yet implemented) - implemented as com.fibaro.binarySwitch
  • Door/Window sensor PARASOLL - implemented as com.fibaro.doorSensor
  • Wireless motion sensor VALLHORN - implemented as com.fibaro.motionSensor and com.fibaro.lightSensor
  • LED strip ORMNAS - implemented as com.fibaro.colorController with R,G,B and warmWhite color component
  • TRADFRI bulb E27 WW globe 806lm - implemented as com.fibaro.multilevelSwitch
  • TRADFRI bulb G12 E27 WW opal 470 - implemented as com.fibaro.multilevelSwitch with custom temperature slider
  • Environment sensor VINDSTYRKA - implemented as com.fibaro.temperatureSensor and com.fibaro.humiditySensor (PM25 coming)
  • Simple play/stop/skip for registered Sonos compatible speakers, tested with IKEA Symphony 

 

Untested, but may work:

  • Color lightbulbs (should behave like LED strip)
  • Water alarm BADRING

 

Besides devices, it also supports to trigger and "undo" Dirigera scenes

Please login or register to see this code.

 

 

Please login or register to see this attachment.

 

Edited by jgab
  • Like 8
  • Thanks 2
  • Topic Author
  • Posted

    v0.8 lots of bug fixes, better color light support

    • Like 1
    Posted

    @jgab

    I havent seen on the code, but is it a local api? 😄

     

     

  • Topic Author
  • Posted
    23 minutes ago, Brors94 said:

    @jgab

    I havent seen on the code, but is it a local api? 😄

     

     

    Yes

    • Like 1
  • Topic Author
  • Posted

    v0.9

    • better color light support.
    • water sensor may work...
    • Dirigera scenes can be triggered
    • Like 3
    • Thanks 1
  • Topic Author
  • Posted

    v0.95

    • Better light support,
      • White bulbs with temperature is implemented as multilevelSwitch with custom slider for temperature. Current temperature is stored in quickApp variable
    • Offline/dead updated (hopefully) when power is cut

     

    • Like 1
    Posted

    Hi @jgab,

     

    Today I bought a Dirigera hub and a Tradfri driver.

    I think there is an error in the QA somewhere, I can get the token but I get an error when creating the child devices:

     

    [18.10.2024] [17:17:24] [ERROR] [QUICKAPP938]: createMissingChildren:./quickApp.lua:416: attempt to index a nil value (local 'child')
     

    I downloaded v0.95

     

    P.s. I am on the latest beta.

     

    Jimicr

  • Topic Author
  • Posted
    1 hour ago, jimicr said:

    Hi @jgab,

     

    Today I bought a Dirigera hub and a Tradfri driver.

    I think there is an error in the QA somewhere, I can get the token but I get an error when creating the child devices:

     

    [18.10.2024] [17:17:24] [ERROR] [QUICKAPP938]: createMissingChildren:./quickApp.lua:416: attempt to index a nil value (local 'child')
     

    I downloaded v0.95

     

    P.s. I am on the latest beta.

     

    Jimicr

    Yes, you are right. something strange has happened with the code... 

    Will try to fix it as soon as possible (a bit busy tomorrow unfortunately)

    Posted
    12 minutes ago, jgab said:

    Yes, you are right. something strange has happened with the code... 

    Will try to fix it as soon as possible (a bit busy tomorrow unfortunately)

    Thanks, take your time :)

     

  • Topic Author
  • Posted

    v0.96 - fix bug introduced in instantiating children of type dimmable light.... thanks @jimicr

    Posted (edited)
    12 hours ago, jgab said:

    v0.96 - fix bug introduced in instantiating children of type dimmable light.... thanks @jimicr

    Goodmorning @jgab,

     

    Thanks for your fast action.

    I sadly must report something else broke, this is the debug after pressing "request token":

     

    [19.10.2024] [08:53:13] [DEBUG] [QUICKAPP940]: Dirigera version: 0.96

    [19.10.2024] [08:53:13] [DEBUG] [QUICKAPP940]: Please Request & Get token...

    [19.10.2024] [08:53:26] [TRACE] [QUICKAPP940]: onAction: {"deviceId":940,"actionName":"UIAction","manual":true,"args":["onReleased","b1"]}[19.10.2024] [08:53:26] [TRACE] [QUICKAPP940]: UIEvent: {"elementName":"b1","eventType":"onReleased","deviceId":940,"values":[]}[19.10.2024] [08:53:26] [DEBUG] [QUICKAPP940]: {"headers":{"Content-Type":"application\/json; charset=utf-8","ETag":"W\/\"2f-qDUhhNr+EaaRaB5lJbnhcLLG5zE\"","Content-Length":"47","Api-Version":"1.3.45","Connection":"close","Date":"Sat, 19 Oct 2024 06:53:26 GMT"},"data":"{\"code\":\"3adb5f47-c307-4ad9-8a08-f7475dc8f2ed\"}","status":200}

    [19.10.2024] [08:53:26] [DEBUG] [QUICKAPP940]: table: 0xaaaaed8416d0[19.10.2024] [08:53:26]

    [DEBUG] [QUICKAPP940]: Press the action button on Dirigera then hit 'Get token'' ...

    [19.10.2024] [08:53:26] [ERROR] [QUICKAPP940]: QuickApp crashed

    [19.10.2024] [08:53:26] [ERROR] [QUICKAPP940]: Auth.lua:64: attempt to index a nil value (global 'data')

     

    Edit: I know your busy so no hurry.

    Edited by jimicr
  • Topic Author
  • Posted

    Ive seen that. Sometimes it starts to work if you wait a few minutes and press get token again. I will check for the error and give a better error message in the next version. 
    Seems the hub gets in the wrong state creating/waiting for token and return error. Wait some minutes and the hub is ready to produce tokens again….

    Posted

    Tried again,

    the Quickapp keeps crashing after pressing ""request token" and stops working:

     

     

    [19.10.2024] [18:32:42] [ERROR] [QUICKAPP940]: QuickApp crashed

    [19.10.2024] [18:32:42] [ERROR] [QUICKAPP940]: Auth.lua:64: attempt to index a nil value (global 'data')

     

  • Topic Author
  • Posted (edited)

    v0.97 a bit better error messages when get/request tokens.

    Some color indication when selecting temperature for a color light.

    On 10/19/2024 at 6:35 PM, jimicr said:

    Tried again,

    the Quickapp keeps crashing after pressing ""request token" and stops working:

     

     

    [19.10.2024] [18:32:42] [ERROR] [QUICKAPP940]: QuickApp crashed

    [19.10.2024] [18:32:42] [ERROR] [QUICKAPP940]: Auth.lua:64: attempt to index a nil value (global 'data')

     

    So I uploaded v0.97 with some better error handling but the logic is more or less unchanged.

    I tried a couple of time to install a new version and get/request token and it has worked every time.

    Try again and see if you get some error message that we can work with....

    Edited by jgab
    • Thanks 1
    Posted

    Goodmorning,

     

    V0.97 works, I was able to include the Dirigera bridge and use the one dimmable driver I have.

     

    Thanks!

    • 1 month later...
    Posted

    Hi,

     

    I'm trying the QA (0.97) on a HC3 lite and are getting this error:


    [25.11.2024] [09:25:00] [ERROR] [QUICKAPP82]: QuickApp crashed
    [25.11.2024] [09:25:00] [ERROR] [QUICKAPP82]: sha2.lua:109: at least 53-bit floating point numbers are required

     

    Should it also run on a HC3 lite?

     

    Thanks.

  • Topic Author
  • Posted (edited)
    2 hours ago, Willem-Jan said:

    Hi,

     

    I'm trying the QA (0.97) on a HC3 lite and are getting this error:


    [25.11.2024] [09:25:00] [ERROR] [QUICKAPP82]: QuickApp crashed
    [25.11.2024] [09:25:00] [ERROR] [QUICKAPP82]: sha2.lua:109: at least 53-bit floating point numbers are required

     

    Should it also run on a HC3 lite?

     

    Thanks.

    Yes, the infinite wisdom of Fibaro had them compile the Lua environment for 32bit integers on the HC3 Lite - which renders some QAs useless on them.
    Ex. os.time() barely fits in 32 bits and typically fail if you do arithmetic with it. Some values returned 

    Please login or register to see this link.

    ...
    The sha2.lua library does some heavy arithmetics using double floats (>53 bits) that comes from the way they compiled the Lua environment -  and I don't see it possible to rewrite for 32 bits and single floats....

    Edited by jgab
    • Like 1
    • 4 weeks later...
    Posted

    Hi @jgab, Do you have the Ikea Vindstyrka? 

    I tested the QA, and get the humidity, lux and temp. But missing the Pm 2.5 :)
    Is it something I can do to help with integrating the Pm2.5 to?  :D 

     

  • Topic Author
  • Posted
    10 hours ago, Brors94 said:

    Hi @jgab, Do you have the Ikea Vindstyrka? 

    I tested the QA, and get the humidity, lux and temp. But missing the Pm 2.5 :)
    Is it something I can do to help with integrating the Pm2.5 to?  :D 

     

    Yes, PM2.5 will come soon...

    • Thanks 1
  • Topic Author
  • Posted (edited)

    v0.99 attached.

    - Multiselect to select what devices should have child devices. (select and restart QA)
    - debug variable can be set
    - Rudimentary speaker support (play, pause,stop,volume)

    - PM2.5 and tVOC Childs for VINDSTYRKA

    Edited by jgab
    • Thanks 1

    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...