Fibaro Smart Implant: instructions to configure binary inputs (Updated, SKIP first two posts, instructions on the 3rd)

Ok will do this in the evening and report back. Thanks

I will create a new version of the script with configurable number of endpoints in the upcoming days.

OK, I ,made the changes manually to the existing MultiChCapabilities to reflect your values. I then issued a luup engine reload. This works, as follows!

All devices are reading temperature.
T 1-4 were sitting on the top of different sections of a central heating radiator, so they are reading 35-36C. I can confirm each changes independently to the other. The ‘Ext T’ device I am sure is the internal temperature of the implant itself. This one is always a few degrees above ambient room temperature I assume due to the circuit heating slightly inside the implant as I mentioned before. I hope this helps.

Let me know if you want me to test anything when you get to re-writing the code. I will also try the new version once its ready of course and report back.

1 Like

I have really strange problems with this device. Im guessing it is either a faulty device or that I havent upgraded to the latest firmware (that was redrawn).

My problem is that it “Failed at: Setting special association”. If I remove the line with AssociationSet 1,z.8;1,z.9 … that problem disappears but then it doesnt update the temp sensors at all (as expected).
I tried to do a manually associaion group, and pick the master as device and types 8,9,10,11 for multichannel endpoints it acceptes it and updates all 4 temperature sensors once. If I reload the engine it gets stuck in the “Failed at: Setting special association” again.
At some point (I dont know why or how, all the child endpoints disappears and suddenly comes back with it default values (that the script changed) and the multichcapabilites is also back to default. It seems the engine detects some misconfig and resets the master device together with its children.

Can it be the firmware version that causes this? Im running 1.7.4453 on veraplus

Be sure to include and configure this device at no more than 1 mt of distance from the controller.

I can confirm that I am including with the device sitting next to the vera controller too, which seems to work.

Whilst not strictly associated with this device, how can scenes be triggered with greater temperature granularity or how can an ‘equal to’ value be defined?

The implant is reporting on changes of 0.1C for me as I edited variable #67 to be a value of ‘1’ which represents 0.1 units. This is great, however if I set a trigger on a scene to say switch a heater off when the temperature goes above 16C, my Vera edge waits until the temperature reaches 17 (as this is indeed ‘above’ 16) before it runs the scene. I can only set values in increments of 1 degree, and I cant set ‘equal to’.

Is there a setting I can apply to the edge to allow greater granularity for triggers or at least >= ?

AFAIK you can’t. That’s why 90% of times I use some code to achieve the same thing.

Gotcha, yet that’s a shame. I wonder if the vera config doesn’t handle floating point variables? Or if it’s just a low level config thing where maybe it can be defined.

I think it’s more a UI problem. Probably they coded for F, but in C 1 point makes a difference. Try to open a ticket with support, maybe they will address in a future release.

I have also installed the -222, but with 5 temperature sensors, and I have not been able to update the code to incorporate the 5th. Does someone have a clean version of the script that all of you have been working on that I can start with ? I can install as a -223 as mentioned prior, and I can get the temperature sensors and outputs working, but I cannot get it to update without polling, and if I do ANYthing to change configuration, I get that dreaded “Failed at: Setting special association." Anybody have this completely figured out ? I really want to make this work, it would be useful in several areas for me.

Thank !

Tim

Remove it, and pair it again as generic. Otherwise, it won’t work properly. Here’s a script for 5 temp sensors:
local masterID = 301
local desc = “SmartImplant”

-- master
luup.attr_set("device_file", "D_ComboDevice1.xml", masterID)
luup.attr_set("device_json", "D_ComboDevice1.json", masterID)
luup.attr_set("device_type", "urn:schemas-micasaverde-com:device:ComboDevice:1", masterID)
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "BasicSetCapabilities", "00=Ue1,FF=Te1,2=Ue2,1=Te2", masterID)
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "VariablesSet", "20-IN1 mode,1d,1,21-IN2 mode,1d,1,52-IN2 value for ON,2d,1,54-IN2 value for OFF,2d,2,67-ext temp change external channel,2d,3,68-ext temp periodical report,2d,3600", masterID)
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "AssociationSet", "1,z.8;1,z.9;1,z.10;1,z.11;1,z.12", masterID) -- this will report temp from endpoints 8, 9, 10 and 11. if you have less sensors, remove the unused ones
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "MultiChSensType", "m3=15,m4=15,m7=1,m8=1,m9=1,m10=1,m11=1,m12=1", masterID) -- for child: if you 4 temp sensors, leave it as it is. otherwise, remove or add mx=1 according to your config
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollSettings", "0", masterID) -- polling can be disabled
luup.variable_set("urn:micasaverde-com:serviceId:HaDevice1", "ChildrenSameRoom", "0", masterID) -- if you want to freely move children in other rooms
luup.attr_set("name", (desc .. " Master"), masterID)
luup.devices[masterID].subcategory_num = 11
luup.devices[masterID].category_num = 0

-- children
for deviceNo, d in pairs(luup.devices) do
    local parent = d.device_num_parent or -1
    if parent == masterID then
		local altid = luup.attr_get("altid", deviceNo)
		-- fix binary sensors
		if altid == "e1" or altid == "e2" then
			luup.attr_set("device_file", "D_MotionSensor1.xml", deviceNo)
			luup.attr_set("device_json", "D_MotionSensorAsSirenNoArm1.json", deviceNo)
			luup.attr_set("device_type", "urn:schemas-micasaverde-com:device:MotionSensor:1", deviceNo)
			luup.attr_set("name", (desc .. " " .. (altid == "e1" and "IN1" or "IN2")), deviceNo)
			d.category_num = 4
			d.subcategory_num = 8
		-- fix for temp sensors
		elseif altid == "e7" or altid == "e8" or altid == "e9" or altid == "e10" or altid == "e11" or altid == "e12" then
			luup.attr_set("device_file", "D_TemperatureSensor1.xml", deviceNo)
			luup.attr_set("device_json", "D_TemperatureSensor1.json", deviceNo)
			luup.attr_set("device_type", "urn:schemas-micasaverde-com:device:TemperatureSensor:1", deviceNo)
			luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "SensorMlScale", 1, deviceNo)
			luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "SensorMlType", 1, deviceNo)

			local name = "T #" .. tostring(tonumber(string.sub(altid, 2)) - 7)

			luup.attr_set("name", (desc .. " " .. (altid == "e7" and "Int T" or name)), deviceNo)

			d.category_num = 17
			d.subcategory_num = 0

			luup.attr_set("invisible", "0", deviceNo)
		-- hide all
		elseif altid == "e3" or altid == "e4" or altid == "e5" or altid == "e6" or altid == "m15" or altid == "m1" or altid == "b10" then
			luup.attr_set("invisible", "1", deviceNo)
		end
    end

end

Then, go to the device and edit MultiChCapabilities variables as follow:

1,7,1,94,108,34,152,159,
2,7,1,94,108,34,152,159,
3,33,1,94,108,34,152,159,
4,33,1,94,108,34,152,159,
5,16,1,94,108,34,152,159,
6,16,1,94,108,34,152,159,
7,33,1,94,108,34,152,159,
8,33,1,94,108,34,152,159,
9,33,1,94,108,34,152,159,
10,33,1,94,108,34,152,159,
11,33,1,94,108,34,152,159,
12,33,1,94,108,34,152,159,

Thank you so much, I’ll give it a shot tonight !

Tim

Hello
is the module 100% supported please ?

No, in this thread you will found the workaround I found. It’s not supported and I didn’t tested the outputs.

How can I set binary sensors. I need outputs (that work) and binary sensors.
THX

Just run the script in the 3rd post.

After I run the script I get this:

Have you paired it as a generic zwave device?

yes … as a generic zwave device