Fibaro HC2 hardware

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
terrorsource
Posts: 67
Joined: Wednesday 10 May 2017 17:57
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Fibaro HC2 hardware

Post by terrorsource »

Hi,

I saw that Home Asisstant has integrated Fibaro HC2/HCL support. Don't know if it's only READ or that it can also EXECUTE.
Forum topic: https://forum.fibaro.com/topic/32395-ho ... ro-hclhc2/

Reading a few posts in that topic brought an idea that it should be possible to have Domoticz read/execute in HC2 as well instead.
This way we can use the status/devices from HC2 in Domoticz.
FibaroLink makes it only possible to use Domoticz devices as VirtualDevices in HC2.

Found an API which makes it possible to do that.

If you own a Fibaro HC2 you can use the following url to show the documentation around this API:
http://ipaddress/docs/#!/devices/getDevices

devices : Operations about devices Show/Hide List Operations Expand Operations Raw
GET /devices Get list of available devices
POST /devices Create device
POST /devices Call action
GET /devices/{deviceID} Get device object
PUT /devices/{deviceID} Modify device
DELETE /devices/{deviceID} Delete device
POST /devices/{deviceID}/action/{actionName} Call action
POST /devices/groupAction/{actionName} Call group action

It reads the devices via:
http://ipaddress:80/api/devices

I have 1 sensor (Fibaro Wall Plug) connected to the HC2 and this is the result of the api/devices:

Code: Select all

[
  {
    "id": 1,
    "name": "zwave",
    "roomID": 0,
    "type": "com.fibaro.zwavePrimaryController",
    "baseType": "",
    "enabled": true,
    "visible": false,
    "isPlugin": false,
    "parentId": 0,
    "remoteGatewayId": 0,
    "viewXml": false,
    "configXml": false,
    "interfaces": [
      "zwave"
    ],
    "properties": {
      "UIMessageSendTime": "0",
      "autoConfig": "0",
      "configured": true,
      "date": "a",
      "dead": "false",
      "deviceControlType": "0",
      "deviceIcon": "28",
      "disabled": "1",
      "emailNotificationID": "0",
      "emailNotificationType": "0",
      "endPoint": "0",
      "endPointId": "0",
      "log": "",
      "logTemp": "",
      "manufacturer": "",
      "markAsDead": "true",
      "model": "",
      "nodeID": "1",
      "nodeId": "0",
      "parameters": [],
      "parametersTemplate": "0",
      "pollingDeadDevice": "false",
      "pollingTime": "1354829138",
      "pollingTimeNext": "1354837724",
      "pollingTimeSec": 125,
      "productInfo": "",
      "pushNotificationID": "0",
      "pushNotificationType": "0",
      "remoteGatewayId": "0",
      "requestNodeNeighborStat": "0",
      "requestNodeNeighborStatTimeStemp": "",
      "requestNodeNeighborState": "",
      "requestNodeNeighborStateTimeStemp": "",
      "saveLogs": "true",
      "serialNumber": "",
      "showChildren": "1",
      "smsNotificationID": "0",
      "smsNotificationType": "0",
      "status": "STAT_IDLE",
      "sunriseHour": "06:22",
      "sunsetHour": "21:00",
      "useTemplate": "true",
      "userDescription": "",
      "value": "0",
      "zwaveBuildVersion": "3.67",
      "zwaveCompany": "Unknown",
      "zwaveInfo": "",
      "zwaveRegion": "EU",
      "zwaveVersion": "4.33"
    },
    "actions": {
      "pollingDeadDevice": 1,
      "pollingTimeSec": 1,
      "reconfigure": 0,
      "requestNodeNeighborUpdate": 1,
      "turnOff": 0,
      "turnOn": 0
    },
    "created": 1556369518,
    "modified": 1556369518,
    "sortOrder": 1
  },
  {
    "id": 2,
    "name": "emailaddress",
    "roomID": 0,
    "type": "HC_user",
    "baseType": "com.fibaro.voipUser",
    "enabled": true,
    "visible": true,
    "isPlugin": false,
    "parentId": 0,
    "remoteGatewayId": 0,
    "viewXml": false,
    "configXml": false,
    "interfaces": [
      "voip"
    ],
    "properties": {
      "Email": "emailaddress",
      "HotelModeRoom": "0",
      "LastPwdChange": "1556369626",
      "Latitude": "xx.xx",
      "Location": "xx:xx",
      "LocationTime": "2012-12-06 12:15",
      "LocationTimestamp": "1354792521",
      "Longitude": "16.84",
      "PreviousLatitude": "xx.xx",
      "PreviousLocation": "5xx;xx",
      "PreviousLocationTime": "2012-12-06 12:14",
      "PreviousLocationTimestamp": "1354792461",
      "PreviousLongitude": "16.84",
      "SendNotifications": "true",
      "TrackUser": "0",
      "UserType": "superuser",
      "atHome": "false",
      "deviceIcon": "91",
      "fidUuid": "",
      "firmwareUpdateLevel": "0",
      "initialWizard": "false",
      "saveLogs": "1",
      "sipDisplayName": "_",
      "sipUserID": "1",
      "sipUserPassword": "",
      "useOptionalArmPin": "false",
      "usePin": "false"
    },
    "actions": {
      "sendEmail": 2,
      "sendPush": 1,
      "setSipDisplayName": 1,
      "setSipUserID": 1,
      "setSipUserPassword": 1
    },
    "created": 1556369518,
    "modified": 1556369518,
    "sortOrder": 2
  },
  {
    "id": 3,
    "name": "YR Weather",
    "roomID": 0,
    "type": "com.fibaro.yrWeather",
    "baseType": "com.fibaro.weather",
    "enabled": true,
    "visible": true,
    "isPlugin": true,
    "parentId": 0,
    "remoteGatewayId": 0,
    "viewXml": true,
    "configXml": true,
    "interfaces": [],
    "view": [],
    "properties": {
      "ConditionCode": "3200",
      "ConditionCodeConverted": "0",
      "Humidity": "0.00",
      "Pressure": "0.00",
      "Temperature": "0.00",
      "WeatherCondition": "unavailable",
      "Wind": "0.00",
      "categories": "[\"other\"]",
      "dead": "false",
      "deadReason": "",
      "deviceControlType": "0",
      "deviceIcon": "28",
      "emailNotificationID": "0",
      "emailNotificationType": "0",
      "hidden": "false",
      "log": "",
      "logTemp": "",
      "manufacturer": "",
      "model": "",
      "pushNotificationID": "0",
      "pushNotificationType": "0",
      "remoteGatewayId": "0",
      "saveLogs": "true",
      "smsNotificationID": "0",
      "smsNotificationType": "0",
      "ui.Current_Weather_Label.caption": "Temp.: 0°C\n\nHumidity: 0%\n\nWind: 0km/h",
      "ui.config.hidden.caption": "This device is hidden in the system.",
      "ui.config.hidden.enabled": true,
      "ui.config.section1.caption": "Configuration",
      "ui.config.section1.enabled": true,
      "userDescription": ""
    },
    "actions": {},
    "created": 1556369518,
    "modified": 1556369518,
    "sortOrder": 3
  },
  {
    "id": 4,
    "name": "4",
    "roomID": 0,
    "type": "com.fibaro.zwaveDevice",
    "baseType": "com.fibaro.device",
    "enabled": true,
    "visible": false,
    "isPlugin": false,
    "parentId": 1,
    "remoteGatewayId": 0,
    "viewXml": false,
    "configXml": false,
    "interfaces": [
      "polling",
      "zwave",
      "zwaveAssociation",
      "zwaveConfiguration",
      "zwaveMultiChannelAssociation",
      "zwaveSlaveRouting"
    ],
    "properties": {
      "categories": "[\"other\"]",
      "configured": true,
      "dead": "false",
      "deadReason": "",
      "deviceControlType": "0",
      "deviceIcon": "28",
      "deviceSpecificData": "h'000000000000917a",
      "deviceSpecificIdType": "Serial Number",
      "deviceState": "Configured",
      "emailNotificationID": "0",
      "emailNotificationType": "0",
      "endPointId": "0",
      "lastWorkingRoute": "[1]",
      "lastWorkingRouteRequestStatus": "ok",
      "lastWorkingRouteRequestTimestamp": "0",
      "lastWorkingRouteResponseTimestamp": "1556381222",
      "log": "",
      "logTemp": "",
      "manufacturer": "",
      "markAsDead": "true",
      "model": "",
      "neighborList": "[1]",
      "neighborListRequestStatus": "ok",
      "neighborListRequestTimestamp": "0",
      "neighborListResponseTimestamp": "1556381222",
      "nodeId": "2",
      "parameters": [
        {
          "id": 1,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 1,
          "value": 0
        },
        {
          "id": 2,
          "lastReportedValue": 1,
          "lastSetValue": 1,
          "size": 1,
          "value": 1
        },
        {
          "id": 3,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 2,
          "value": 0
        },
        {
          "id": 10,
          "lastReportedValue": 80,
          "lastSetValue": 80,
          "size": 1,
          "value": 80
        },
        {
          "id": 11,
          "lastReportedValue": 15,
          "lastSetValue": 15,
          "size": 1,
          "value": 15
        },
        {
          "id": 12,
          "lastReportedValue": 30,
          "lastSetValue": 30,
          "size": 2,
          "value": 30
        },
        {
          "id": 13,
          "lastReportedValue": 10,
          "lastSetValue": 10,
          "size": 2,
          "value": 10
        },
        {
          "id": 14,
          "lastReportedValue": 3600,
          "lastSetValue": 3600,
          "size": 2,
          "value": 3600
        },
        {
          "id": 15,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 1,
          "value": 0
        },
        {
          "id": 20,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 1,
          "value": 0
        },
        {
          "id": 21,
          "lastReportedValue": 300,
          "lastSetValue": 300,
          "size": 2,
          "value": 300
        },
        {
          "id": 22,
          "lastReportedValue": 500,
          "lastSetValue": 500,
          "size": 2,
          "value": 500
        },
        {
          "id": 23,
          "lastReportedValue": 6,
          "lastSetValue": 6,
          "size": 1,
          "value": 6
        },
        {
          "id": 24,
          "lastReportedValue": 255,
          "lastSetValue": 255,
          "size": 2,
          "value": 255
        },
        {
          "id": 30,
          "lastReportedValue": 63,
          "lastSetValue": 63,
          "size": 1,
          "value": 63
        },
        {
          "id": 31,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 1,
          "value": 0
        },
        {
          "id": 32,
          "lastReportedValue": 600,
          "lastSetValue": 600,
          "size": 2,
          "value": 600
        },
        {
          "id": 40,
          "lastReportedValue": 25000,
          "lastSetValue": 25000,
          "size": 2,
          "value": 25000
        },
        {
          "id": 41,
          "lastReportedValue": 1,
          "lastSetValue": 1,
          "size": 1,
          "value": 1
        },
        {
          "id": 42,
          "lastReportedValue": 0,
          "lastSetValue": 0,
          "size": 1,
          "value": 0
        },
        {
          "id": 43,
          "lastReportedValue": 2,
          "lastSetValue": 2,
          "size": 1,
          "value": 2
        },
        {
          "id": 50,
          "lastReportedValue": 3,
          "lastSetValue": 3,
          "size": 1,
          "value": 3
        }
      ],
      "parametersTemplate": "741",
      "pollingInterval": "0",
      "pollingTimeSec": 0,
      "productInfo": "1,15,6,2,16,1,3,2",
      "pushNotificationID": "0",
      "pushNotificationType": "0",
      "remoteGatewayId": "0",
      "saveLogs": "true",
      "serialNumber": "h'000000000000917a",
      "smsNotificationID": "0",
      "smsNotificationType": "0",
      "useTemplate": "true",
      "userDescription": "",
      "zwaveCompany": "Fibargroup",
      "zwaveInfo": "3,4,5",
      "zwaveSoftwareVersion": "{}",
      "zwaveVersion": "3.2"
    },
    "actions": {
      "getLastWorkingRoute": 0,
      "getNeighborList": 0,
      "getParameter": 1,
      "poll": 0,
      "reconfigure": 0,
      "requestNodeNeighborUpdate": 0,
      "setParameter": 2
    },
    "created": 1556381222,
    "modified": 1556381222,
    "sortOrder": 4
  },
  {
    "id": 5,
    "name": "TestSwitch",
    "roomID": 0,
    "type": "com.fibaro.FGWP102",
    "baseType": "com.fibaro.FGWP",
    "enabled": true,
    "visible": true,
    "isPlugin": false,
    "parentId": 4,
    "remoteGatewayId": 0,
    "viewXml": false,
    "configXml": false,
    "interfaces": [
      "deviceGrouping",
      "energy",
      "fibaroFirmwareUpdate",
      "light",
      "power",
      "zwave",
      "zwaveAlarm",
      "zwaveMultiChannelAssociation"
    ],
    "properties": {
      "pollingTimeSec": 0,
      "zwaveCompany": "Fibargroup",
      "zwaveInfo": "3,4,5",
      "zwaveVersion": "3.2",
      "alarmLevel": "0",
      "alarmType": "0",
      "categories": "[\"lights\"]",
      "color": "",
      "configured": true,
      "dead": "false",
      "deadReason": "",
      "deviceControlType": "2",
      "deviceGroup": "[]",
      "deviceGroupMaster": "0",
      "deviceIcon": "125",
      "emailNotificationID": "0",
      "emailNotificationType": "0",
      "endPointId": "0",
      "energy": "0.00",
      "firmwareUpdate": "{\"status\":\"UpToDate\",\"updateVersion\":\"\"}",
      "icon": "{\"path\":\"fibaro/icons/com.fibaro.FGWP_EU/plug0.png\",\"source\":\"HC\"}",
      "isLight": "true",
      "log": "",
      "logTemp": "",
      "manufacturer": "",
      "markAsDead": "true",
      "model": "",
      "nodeId": "2",
      "parametersTemplate": "741",
      "power": "0.00",
      "productInfo": "1,15,6,2,16,1,3,2",
      "pushNotificationID": "0",
      "pushNotificationType": "0",
      "remoteGatewayId": "0",
      "saveLogs": "true",
      "serialNumber": "h'000000000000917a",
      "showEnergy": "true",
      "smsNotificationID": "0",
      "smsNotificationType": "0",
      "updateVersion": "",
      "useTemplate": "true",
      "userDescription": "",
      "value": "false"
    },
    "actions": {
      "abortUpdate": 1,
      "reconfigure": 0,
      "reset": 0,
      "retryUpdate": 1,
      "startUpdate": 1,
      "turnOff": 0,
      "turnOn": 0,
      "updateFirmware": 1
    },
    "created": 1556381229,
    "modified": 1556381229,
    "sortOrder": 5
  }
]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest