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!



Smart Home Forum by FIBARO Team

Search the Community

Showing results for tags 'hc3l'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie


  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL





Found 9 results

  1. Hi, I have a HC3L and using MQTT to control Smart Implant and Single Switch. If the network is disconnected or there is no data transmission in MQTT for a long time, the connection seems to be interrupted, but the MQTT client does not have a property to check if it is still connected. I currently put the reconnection on the onError and onClosed events to perform the reconnection. Below is my code... function QuickApp:onInit() self.mqtt = nil self.nowid = tostring(os.time()) self.CHT_device_id = self:getVariable("CHT_device_id") self.CHT_key = self:getVariable("CHT_key") self.devicesMapping = self:getDevicesMapping() self:establishMqttConnection() end function QuickApp:getDevicesMapping() local _map = { door_sensor = 88, door_switch = 93, switch_0001 = 24, switch_0002 = 30 } return _map end function QuickApp:establishMqttConnection() local options = {} local mqtt_server = self:getVariable("MQTT_SERVER") options = self:mqttParams() local mq = mqtt.Client.connect(mqtt_server, options) mq:addEventListener('connected', function(event) self:onConnected(event) end) mq:addEventListener('closed', function(event) self:onClosed(event) end) mq:addEventListener('message', function(event) self:onMessage(event) end) mq:addEventListener('error', function(event) self:onError(event) end) mq:addEventListener('subscribed', function(event) self:onSubscribed(event) end) mq:addEventListener('published', function(event) self:onPublished(event) end) self.mqtt = mq end function QuickApp:mqttParams() local tlsOptions = { allowUnauthorized = true, sessionPresent = true } local param = { username = self.CHT_key, password = self.CHT_key, cleanSession = true, keepAlivePeriod = 60, clientId = "HC3L1" .. tostring(os.time()), tls = {} } return param end function QuickApp:onConnected(event) self:debug("--- onConnected:", json.encode(event)) self:subscribe() end function QuickApp:onClosed(event) self:debug("--- onClosed:", json.encode(event)) -- To connect MQTT self:establishMqttConnection() end function QuickApp:onError(event) self:debug("--- onError:", event.code) if event.code > 0 then self:debug("DO DISCONNECT") self.mqtt:disconnect() end end function getErrorCodeMsg(param) local _map = { "Connection refused – incorrect protocol version", "Connection refused – invalid client identifier", "Connection refused – server unavailable", "Connection refused – bad username or password", "Connection refused – not authorised" } return _map[param] end function QuickApp:subscribe() self:debug("--- DO subscribe") local topic = "" topic = "/v1/device/" .. self.CHT_device_id .. "/sensor/+/command" self.mqtt:subscribe(topic, { qos = 0 }) self:debug("--- DO subscribe DONE") end function QuickApp:onSubscribed(event) self:debug("--- onSubscribed:", json.encode(event)) end function QuickApp:onMessage(event) self:debug("--- onMessage:", json.encode(event)) local payload = json.decode(event.payload) local CHT_sensor_id = payload.id local CHT_device_id = payload.deviceId local cmd = payload.cmd local hc3_device_id = self.devicesMapping[CHT_sensor_id] if hc3_device_id then local device_cmd = self:getDeviceCmd(hc3_device_id, cmd) if device_cmd then fibaro.call(hc3_device_id, device_cmd) end else self:error("Received payload id `" .. CHT_sensor_id "` not found") end end function QuickApp:publishDeviceSensorData(sensor_id, value) local topic = "/v1/device/" .. self.CHT_device_id .. "/rawdata" local payload = { { id = sensor_id, value = {value} } } self.mqtt:publish(topic, json.encode(payload)) end function QuickApp:onPublished(event) -- print("onPublished:", json.encode(event)) self:debug("--- onPublished:", json.encode(event)) end function getVar(deviceID, varName) for _,v in ipairs(api.get("/devices/"..deviceID).properties.quickAppVariables) do if v.name==varName then return v.value end end return nil end function QuickApp:getDeviceCmd(deviceID, cmd) self:debug("---- getDevice: ", deviceID) local data = api.get("/devices/"..deviceID) if data then self:debug("---- getDevice: ", data.type) if data.type == "com.fibaro.doorLock" then if cmd == "open" then return "unsecure" elseif cmd == "close" then return "secure" else self:error("Method `" .. cmd .. "` on device id `" .. deviceID .. "` not implemented.") end elseif data.type == "com.fibaro.binarySwitch" then if cmd == "open" then return "turnOn" elseif cmd == "close" then return "turnOff" else self:error("Method `" .. cmd .. "` on device id `" .. deviceID .. "` not implemented.") end else self:error("Type `" .. data.type .. "` of device id `" .. deviceID .. "` not defined.") end end return nil -- return "" as self:getVariable... end Are there other options for reconnecting? Andy Chiang
  2. HTTP request crashes frequently on HC3L showing below message: Unknown error occurred: LuaEnvironment: /data/vendor/avhttp/avhttp/impl/http_stream.ipp:2312: void avhttp::http_stream::handle_skip_crlf(const MutableBufferSequence&, Handler, boost::shared_array, const boost::system::error_code&, std::size_t) [with MutableBufferSequence = boost::asio::mutable_buffers_1; Handler = boost::function; std::size_t = unsigned int]: Assertion `crlf[0] == '\r' && crlf[1] == '\n'' failed. Have tried many options to catch what exactly is the problem, without success. Is anyone having same problem?
  3. My Home Centre Lite is dead. I see that a new HCL is twice the price of HC3 Lite. Why Will it restore the cloud backup of HCL including block scenes
  4. Hi, Can anyone help with setup siren 6? When is alarm activated and triggered, the sound play for only a few second, how to make the sound play all the time? Screen is not in English language.
  5. I am sharing my experience with Replacing HC3L connected as slave gateway as there's no clear guide to follow, hoping that someone have solution for it. with many attempts using different approaches, ALL FAILED. Attempt1 - from connect gateways Tab: -clicking on the replace device on the list showing on screenshot, -it asks for new gateway IP, then i got error 409 conflict , or error 409 OK. i have made sure that new gateway on the same firmware 5.130.64 as the one need to be replaced. Attempt2- i made sure that system A/B on new gateway is on 5.130.64 which identical to the one i need to replace, but still getting the same error. Attempt3- i tried to upload the backup of slave gateway manually to new one but it's refusing to upload it. Attempt4- for testing purpose factory reset one salve gateway from the connected list, and started the replace, it completed the process but no devices restored on the gateway... Anyone can help with correct procedure of replacing HC3L connected as slave gateway?
  6. Hi all! I have a problem with the battery reading of door/window sensor 2 in HC3L (5.120.10) Once I installed the sensor, in dashboard the battery was at 50%. After one week, the battery level was 0% (and that is strange). So I replaced it. For 1-2 secs the battery indicator was 100%....then it falled to 0%. I tried with another battery and with another door/window sensor 2....but the results is the same. Despite this, the sensor is working and it correctly notify me when the door is open and closed. Why this behaviour in battery reading? Is there a bug in my HC3L current firmware version?
  7. I'm new to Fibaro, having migrated from Vera. I have a new HC3L and I want it to turn some lights on after sunset, but I can't get the sunrise and sunset timer blocks to work. Other time blocks like "Exact time" and "time interval" both work fine - I set up the time block to turn a light on and off and this works -the light turns on and off as expected. But when I set up a timer using the "sunrise and sunset" block, such as "1 hour after sunset" I can save it OK, but the light never't turns on I've tried this with hours and with minutes, and simply "at sunset", but the light never activates. Clicking the "Run" button works. I've checked the clock in Date and Time, and it's correct. Any suggestions please ? Is there a lua equivalent that might work ? Angelo
  8. Using HC3 lite, I am trying to install "The Button". Steps done: 1) In HC3L app selected Config / Devices 2) Pressed "Add button" 3) Selected "Z-Wave device" 4) Clicked "Start adding" 5) Using the "The button" Enabled battery and 6x clicked (all that managed in 30 secs) 6) HC3L logs declare learning mode (see figure bellow) Problem: The device (The Button) was not added found and no any log announced (message "No Devices Found"). (Adding "Motion Sensor" was added without any problems) Thank you very much for any help.
  9. Möchte gerne, wenn ich den KeyFob Taste 1 drücke das, eine Push Nachricht geschickt wird, wenn das Garagentor offen ist. Und wenn ich wieder drücke , das eine Push Nachricht geschickt wird, wenn das Garagentor geschlossen ist. Kann mir jemand dabei helfen ? LUA ist für mich sehr neu. Vielen Dank für eure Hilfe. Trigger: { conditions = { { id = 97, isTrigger = true, operator = „==“, property = „centralSceneEvent“, type = „device“, value = { keyAttribute = „Pressed“, keyId = 1 } }, { id = 100, isTrigger = true, operator = „==“, property = „value“, type = „device“, value = true }, { id = 100, isTrigger = true, operator = „==“, property = „value“, type = „device“, value = false } }, operator = „all“ } AKTION: local Taste = json.encode(sourceTrigger.value.keyId) – Betätigte Taste local Aktion = json.encode(sourceTrigger.value.keyAttribute) – Anzahl Betätigungen if Taste == „1“ and Aktion == ‚„Pressed“‘ then fibaro.call(90, ‚toggle‘) print(„Garagentor“) end fibaro.alert(‚simplePush‘, {[1] = 98, }, 'Garagentor ist offen’false) print(„Garagentor ist offen“) end fibaro.alert(‚simplePush‘, {[1] = 98, }, ‚Garagentor ist geschlossen‘, false) print(„Garagentor ist geschlossen“) end
  • Create New...