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


  • 0

Connecting Home Termostate -Temperature-suncollector --TOON from Eneco


Question

Posted

Hi,

In Holland and Belgium we have the oppertunity to controle our temperature + sun colectors + Z-Wave

Products. So it's possible to control your Home situation on your way.

The system is called Toon from the company Eneco , an enegry distributor.

NOw this month the API has come out so it could be connected to any system that's handling Z-Wave, and/ or by developers to provide with new oppertunities.

NOw,.. IS it possible to connect a system like TOON with a available APQI to connect to Fibaro HC2?

If yes,.... How??

See link:

Please login or register to see this link.

9 answers to this question

Recommended Posts

  • 0
Posted

Somebody did a little intergration with his NAS and domotics.

 

Please login or register to see this link.

 

there are API for this..

 

Please login or register to see this link.

 

Please login or register to see this link.

  • 0
Posted

I'm trying to connect to the api and I'm getting results

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

 

New Scene:

 

 

function encode(data) local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; return ((data:gsub('.', function(x) local r,b='',x:byte() for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end return r; end)..'0000'):gsub('%d%d%d?%d?%d?%d?', function(x) if (#x < 6) then return '' end local c=0 for i=1,6 do c=c+(x:sub(i,i)=='1' and 2^(6-i) or 0) end return b:sub(c+1,c+1) end)..({ '', '==', '=' })[#data%3+1]) end
 
local Username =  ""
local Password = ""
local Key = ""
local Secret = ""
local ManagerBaseAddress = "

Please login or register to see this link.


local BaseAddress = "/toon/api/v1/"
local APIBaseAddress  = ManagerBaseAddress .. BaseAddress
local AppendedKeyAndSecret = Key .. ":" .. Secret
local AutorizationHeader = "Basic " .. encode(AppendedKeyAndSecret)
local urlParameters = "grant_type=password&username=" .. Username .. "&password=" .. Password
 

local http = net.HTTPClient({ timeout = 3000 })
 
 http:request(ManagerBaseAddress .. '/token', {
 options = {
 headers =
  {
  ['Authorization'] = AutorizationHeader,
        ['Content-Type'] = 'application/x-www-form-urlencoded',
  },
 method = 'POST',
 data=urlParameters},
 success = function(param)
        if param.status == 200 then
    fibaro:setGlobal("access_token", "")
          local tmpdata = json.decode(param.data) 
          local access = tmpdata.access_token
          fibaro:setGlobal("access_token", access)
       end  
   end,
        error = function(error)      end
        })
 
    local access_token = fibaro:getGlobalValue("access_token")

 

 

 

etc.

  • 0
  • Inquirer
  • Posted

    Hi Pdj79.

    Thanks for your info.

     

    do I have to make a script in LUA?

    and fill in this script my username and password?

     

    What do i have to fil in in:

    local Key = ""
    local Secret = ""

     

    please advice.

    regards,

    • 0
  • Inquirer
  • Posted

    And Pdj79,....

    and what is your suggestion to fill in in the rest

    local Username =  ""
    local Password = ""
    local Key = ""
    local Secret = ""
    local ManagerBaseAddress = "

    Please login or register to see this link.


    local BaseAddress = "/toon/api/v1/"
    local APIBaseAddress  = ManagerBaseAddress .. BaseAddress
    local AppendedKeyAndSecret = Key .. ":" .. Secret
    local AutorizationHeader = "Basic " .. encode(AppendedKeyAndSecret)
    local urlParameters = "grant_type=password&username=" .. Username .. "&password=" .. Password
     
    ???
    • 0
    Posted

    Any updates in this thread?

    • 0
    Posted

    I am still working on being able to set the temperature on Toon through a scene or device on HC2

     

    I got the credentials username, password, key and secret from

    Please login or register to see this link.

    I defined a global variable access_token.

    I used the script above @pdj79 for the token request

    No errors, I was able to generate/retrieve the token and save it to the global variable.

     

    Next I read

    Please login or register to see this link.

    See attached immages.

    I would like to read out the status and change settings like the status and the temperature.

    For instance the status.

    curl -X GET -H "Authorization: Bearer access_token"

    Please login or register to see this link.

    should return something like {"success": true, "thermostatInfo": {"currentTemp": 2000, "currentSetpoint": 2250, "currentDisplayTemp": 2250, "programState": 0, "activeState": -1, "nextProgram": -1, "nextState": -1, "nextTime": 0, "nextSetpoint": 0, "randomConfigId": 1804289383, "errorFound": 255, "boilerModuleConnected": 1, "realSetpoint": 2250, "burnerInfo": "1", "otCommError": "0", "currentModulationLevel": 100, "haveOTBoiler": 0}}

     

    How do I translate this and the other 2 put's into a lu script?

     

    Thanks for any help

     

     

     

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • 0
    Posted

    Just a remark.... Toon (=Eneco) is selling Fibaro products like the Fibaro wall plug! So a good recommendation for Fibaro.

    • 0
    Posted

    Hi Guys and Gifs :)

     

    Who is willing to share a nice Virtual Device which I can use as a starting point for my Toon integration with my Fibaro HC2 :) 

    • 0
    Posted

    Hi @Patrick... wondering if you by now are able to control the temperature on your HC through Toon?

    Join the conversation

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

    Guest
    Answer this question...

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