NODON fil pilote SIN-4-FP-21

it works on GUI ! :+1:

Maybe just a problem with the screenshot?

I think it works very well. I can’t see negative voltage on my voltmeter, but the absolute value is good. I can test the json file if you have it.

<!-- NodOn -->
    <cluster id="0xfc00" name="NodOn - Specific clusters" mfcode="128b">
      <description>Cluster for fil pilote</description>
      <server>
        <command id="00" dir="recv" name="Unknow" required="m" vendor="0x128b">
          <description>Set fil pilote mode</description>
          <payload>
          <attribute id="0x0000" type="enum8" name="Mode" required="m" default="0x00">
              <value name="confort" value="0x01"></value>
              <value name="confort-1" value="0x04"></value>
              <value name="confort-2" value="0x05"></value>
              <value name="eco" value="0x02"></value>
              <value name="hors gel" value="0x03"></value>
              <value name="off" value="0x00"></value>
            </attribute>
          </payload>
        </command>
        <attribute id="0x0000" type="enum8" name="Mode" default="0x00" access="r" required="m">
          <description>Heating mode</description>
          <value name="confort" value="0x01"></value>
          <value name="confort-1" value="0x04"></value>
          <value name="confort-2" value="0x05"></value>
          <value name="eco" value="0x02"></value>
          <value name="hors gel" value="0x03"></value>
          <value name="off" value="0x00"></value>
        </attribute>
      </server>
      <client>
      </client>
    </cluster>

Can you add some functions on consumption measurement in correspondence with the technical sheet please? it seems that there are two possible measurements, instantaneous power and consumption with two units, W and Wh. The latest NodOn modules are equipped to read consumption. SIN-4-1-21 is identical to SIN-4-1-20 with metering. I think the json part will be identical to all NodOn ‘metering’

If I understand, the latest version of the modified json file is good, it is the general.xml file that must be modified. Where is it placed in a Synology?

The table at bottom is attribute table, it’s only updated if you ask for attribute (not if you send a command), but if the line is disabled, it’s too late.

Can you try to enable logs “info*2” at least when asking for the attribute ? Or you haven’t an error message on the GUI (before it was disabled) like unsupported type ?

Perhaps it need the type="u8" but you are able to send the request with the enum8 type so …

On docker I don’t think you can edit the general.xml file but you can overwrite this file using the GUI with edit/preference.

But the XML is just to be used with the GUI, you don’t need it for the DDF.

To mimic the GUI, you can add the manufacture code in the DDF

          "write": {
            "cl": "0xfc00",
            "ep": "0x01",
            "cmd": "0x00",
            "mf": "0x128b",
            "eval": "if (Item.val == 'off') { 0 } else if (Item.val == 'confort') { 1 } else if (Item.val == 'eco') { 2 } else if (Item.val == 'hors gel') { 3 } else if (Item.val == 'confort-1') { 4 } else if (Item.val == 'confort-2') { 5 }",
            "fn": "zcl:cmd"
          }

And yes, not enought time today, but I will add the power tommorow.

1 Like

OK thanks.
I tested the json with your modifications on Windows and Docker, it works very well.
If you have the modification for consumptions, that would be great.

{
  "schema": "devcap1.schema.json",
  "ddfvalidate": false,
  "manufacturername": "NodOn",
  "modelid": "SIN-4-FP-21",
  "vendor": "NodOn",
  "product": "Cable outlet",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_THERMOSTAT",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0201"
      ],
      "meta": {
        "values": {
          "config/mode": {"confort": 1, "confort-1": 4, "confort-2": 5, "eco": 2, "hors gel": 3, "off": 0}
        }
      },
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/mode",
          "refresh.interval": 3600,
          "read": {
            "at": "0x0000",
            "cl": "0xfc00",
            "ep": "0x01",
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0000",
            "cl": "0xfc00",
            "ep": "0x01",
            "eval": "if (Attr.val == 0) { Item.val = 'off'; } else if (Attr.val == 1) { Item.val = 'confort'; } else if (Attr.val == 2) { Item.val = 'eco'; } else if (Attr.val == 3) { Item.val = 'hors gel';} else if (Attr.val == 4) { Item.val = 'confort-1'; } else if (Attr.val == 5) { Item.val = 'confort-2'; }",
            "fn": "zcl:attr"
          },
          "write": {
            "cl": "0xfc00",
            "ep": "0x01",
            "cmd": "0x00",
            "mf": "0x128b",
            "eval": "if (Item.val == 'off') {0} else if (Item.val == 'confort') {1} else if (Item.val == 'eco') {2} else if (Item.val == 'hors gel') {3} else if (Item.val == 'confort-1') {4} else if (Item.val == 'confort-2') {5}",
            "fn": "zcl:cmd"
          }
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        }
      ]
    },
    {
      "type": "$TYPE_CONSUMPTION_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0702"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion"
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/consumption"
        },
        {
          "name": "state/power",
          "refresh.interval": 360,
          "read": {
            "at": "0x0400",
            "cl": "0x0702",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0400",
            "cl": "0x0702",
            "ep": 1,
            "eval": "Item.val = Attr.val",
            "fn": "zcl:attr"
          },
          "default": 0
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0702",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x25",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        },
        {
          "at": "0x0400",
          "dt": "0x2A",
          "min": 1,
          "max": 300,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0xfc00",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x20",
          "min": 1,
          "max": 3600,
          "change": "0x00000001"
        }
      ]
    } 
  ]
}

Have removed the light device, useless
Have added the manufacture code on the write part.
Have added the instantaneous power.

Can need to adjust power and consumption, but as multiplicator/divisor are not reliable, I prefer let you make some tries and adjust them later.

I think it’s better to delete the device before using the new DDF (because the light entry removed)

OK, thanks a lot.
I will install it.
I took a Conbee zigbee key to no longer use my Comap heating system which needs Comap servers to function. I prefer to manage it with wire pilot modules and autonomously with PHP and Curl commands. It’s also much more responsive.
Another advantage is that the deconz API has exactly the same structure as the Hue API that I use.
Thank you again for your responsiveness. :+1:
small question, is deconz compatible with Google Home?

In the latest json, once integrated, the device detection finds an electrical outlet without name with consumption, and 3 sensors and a group ‘0’, but only the thermostat is displayed in Phoscon app.

I Check…

I can’t find it, I don’t know enough about the structure of deconz json but for me there is a problem

For each device, I have a thermostat and a power outlet that has no name.
I’m checking everything today, removing the devices, removing the old ddb, adding the new dbb and integrating the devices.

Your capture have nothing to see with your device, the uniqueID of your device end with “…ac:c9”

Or “b7:27” ?

There must have been a problem with the inclusion or exclusion of devices.
I was mistaken, sorry.

Today I checked, for each SIN-4-FP-21 module, I have this:
1 Thermostat in Phoscon App with two “type” sensors: “ZHAThermostat” and “ZHAConsumption”
1 Power socket in Phoscon App with a light “type”: “Smart plug” and manufacturername": null and “modelid”: null

It’s not a problem that there is a power socket. But if it still appears, it might as well have its original full functions I think.

Ha yes, it’s an old issue, from my mind it was corrected, what is your deconz version ?
And BTW the 2 sensors are working ?

Yes the two sensors work very well, thank you for your work.
my deconz version is 2.28.1

So a recent one, not normal, I don’t found this issue again, have asked to others devs if they remember something.
But this entry should no be here.

Except this issue, do you want to make a PR to submit the device ? to have it officialy ?

ok, yes for a PR. I don’t know how to do it and where. Does deconz manage the update of modules connected to a Conbee key? I updated the firmware of these NodOn modules with the NodOn app, but the module is reset, we lose the name of the module. The consumption sensor make only one measure, not the power and the consumption? I only see one output for one value. concerning the electrical outlet that is displayed, it is not annoying. the pilot wire sensor works very well. Thanks for everything.

More or less, yes deconz is able to make OTA update, but you need the firmware file.

Yes, every time you re-include the device, it make a reset and the device forget his settings, like previous consumption, bind, reports, ect …

concerning the electrical outlet that is displayed, it is not annoying

But it need to be corrected, on deconz side, no problem on the DDF

The consumption sensor make only one measure, not the power and the consumption?

I can be wrong on the DDF, can you take a look in the GUI if value are here ? Both are on cluster 0x0702, attribute 0x0000 and 0x0400

Hi, Snamar I just see that you are the master of Domoticz-DeCONZ, so now, how to make this device works with Domoticz ? :smiley:
On my side and an old version of Domoticz-Deconz, that create a selector off/boost/auto, smart plug, temperature and electric usage.

Thanks a lot for your work !

On my side I just use an external script, not enought users with this device type to make a hack just for it in the code.

On my side and an old version of Domoticz-Deconz, that create a selector off/boost/auto, smart plug, temperature and electric usage

I haven’t same result.
There is a hack in the code to don’t create the selector

            if Type == 'ZHAThermostat':
                # Not working for cable outlet yet.
                if not Model == 'Cable outlet':

For this part I can update the code for your device too.
Electric usage is normal, but IDK if you have both on the same widget, generaly there is a ZHAPower+ZHAconsumption and your device have both on same, but here too I can correct code, just show me the widget created.

The smartplug, it’s surely the “ghost entry” that need to be removed, no return from others devs yet.

For the temperature entry here I don’t have idea ???

And to manage it I have a simple code in LUA used with a custom selector.

-- Sechoir SDB
if (devicechanged['Sechoir SDB']) then
    print("Inter SDB")
    local b = devicechanged['Sechoir SDB']
    print(b)
    if b == 'Confort' then
        Cmd = 'curl -H \'Content-Type: application/json\' -X PUT -d \'{"mode":"confort"}\' http://192.168.1.1:80/api/30C55A011F/sensors/6/config'
    elseif b == 'Eco' then
        Cmd = 'curl -H \'Content-Type: application/json\' -X PUT -d \'{"mode":"eco"}\' http://192.168.1.1:80/api/30C55A011F/sensors/6/config'
    else
        Cmd = 'curl -H \'Content-Type: application/json\' -X PUT -d \'{"mode":"off"}\' http://192.168.1.1:80/api/30C55A011F/sensors/6/config'
    end

    CmdResult = os.execute(Cmd .. ' &')
end

Script is a good solution !

I don’t need the Power and consumption, just want to manage the “fil pilote”.

How to remove my old DDF from deconz on Raspberry ??
Deconz always take this old DDF. I tried REST-API but I get an error :
curl -H “Content-Type: application/json” -X PUT -d ‘{“mode”:“eco”}’ http://192.168.1.76:80/api/BB51820E95/sensors/50/config
[{“error”:{“address”:“/sensors/50/config/mode”,“description”:“Could not set attribute”,“type”:608}}]