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

First of all, thank you very much for your code in post 3.

After running the code, I can’ t find the Input (or Output) devices in the Scenes UI. If I want to create a scene triggered by _Generic IO 1 or 2 change of state or _Appliance Module, I can’t find those devices on the Scene.

I only see “SmartImplant Int T” for the temperature and “SmartImplant Master” where I can only use the “Battery level goes below” trigger.

What did I do wrong?

if the configuration is correct, you should see inputs (named IN1 & IN2) as well. Here’s a screenshot from my Vera:

Thank you for your reply. Strangely mine is working a different way. I manage to make it work removing it from Vera and making a new Generic ZWave Device pairing and changing the last line of the code so that the child devices don’t be invisible (changing the value to “0”… I know I could simply delete the line but I didn’t want to change nothing in the code):

luup.attr_set(“invisible”, “0”, deviceNo)

With this change I was able to see all the devices and they start to appear in the scenes adding tool. But even so, I have a difference from yours: I can only see, in the Scenes, the outputs, but not the inputs. For me it’s working because the outputs change when the inputs change, so, it’s the same goal.

So, I can’t see the digital inputs on the Trigger Devices of the Scenes Menu and my outputs look like this in the Scene Menu (I have changed the output name do “PowermaxArmado”):

Thank you very much for your help. I now have Powermax Pro Security Central communicating with Vera Plus in ZWave protocol… (armed and disarmed using PGM output from the central conected to the Smart Implant Fibaro Device - it’s very nice because the central as 12Vdc near the PGM output, so the smart implant stays inside de Powermax Pro).

Well, I’m happy you managed to make it work. Unfortunately zwave implementation in Vera is a mess and maybe you have a different fw version than mine.

1 Like

Hi,

Thank you all for you contributes to this thread. I have the same(?) problem as everybody else I guess.
I had a Binary Sensor running for two years, measuring the inside and outside temperature in one of our outhouses. The sensor stopped to report temperature some weeks ago and I bought the Smart Implant to replace it.
My problem is that if I pair it as a FGS-223 I can get it to report temperature, but if I pair it as a generic Z-wave I only get the internal temp sensor to work.
I have tried to run the code in the third post but it fails to report any data from the external sensors.
I’ve tried to remove the 9,10,11 sensors from the code if it was related to my setup with only one external sensor at this time but so far completely without luck.
I think that I have tried everything imaginable but I must have missed something.
Do I need to run anything else than luup.reload() after the code?
Please advise me.

Edit:
VeraPlus 1.7.4970 (7.31)

Pair as a generic and you will be good. I have it running since December for my weather stations and it’s OK. From time to time it stop reporting temperature, but I ran a new network heal lately and this seems to be back.

Here’s the code for 1 temp sensor:

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", "MultiChCapabilities", "1,7,1,94,108,34,152,159,\n2,7,1,94,108,34,152,159,\n3,33,1,94,108,34,152,159,\n4,33,1,94,108,34,152,159,\n5,16,1,94,108,34,152,159,\n6,16,1,94,108,34,152,159,\n7,33,1,94,133,142,89,49,113,108,34,152,159\n8,33,1,94,133,142,89,49,113,108,34,152,159", masterID)
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "AssociationSet", "1,z.7;1,z.8", masterID) -- add 1,z.9 to 11 if you have other child
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "MultiChSensType", "m3=15,m4=15,m7=1,m8=1", masterID) -- for child 
luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollSettings", "3600", masterID) -- polling to be enabled for temperature
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_MotionSensor1.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" 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 "Ext 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 Variables and be sure MultiChCapabilities is like this:

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,133,142,89,49,113,108,34,152,159
8,33,1,94,133,142,89,49,113,108,34,152,159

and do a luup.reload(). It’s crucial and it was missing from the first post, so this is an updated version of the script. Unfortunately I can’t edit it anymore and it’s buried into the thread.

2 Likes

Thank you, will try this.

You are my hero!
It was the MultiChCapabilities that was wrong for me. Now I get the temperature reported nicely. A huge thank you for your help!

1 Like

My pleasure! I will soon publish it to GitHub, so it could be easily pointed to, without messing with this forum.

This looks very interesting as I have the same problem.
However, can you tell me where in the process I run the luup code?

code can be run under Apps, Develop Apps, Test luup code.

Please be aware that an advanced knowledge of the Vera is recommended.

therealdb,

I have a Smart implant setup with 4 temperature sensors and 1 binary input (push button). Do you have the right code for me for this septup?

Thank you in advance!

A3

run the script, then go to Variables and be sure MultiChCapabilities is like this:

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,133,142,89,49,113,108,34,152,159
8,33,1,94,133,142,89,49,113,108,34,152,159
9,33,1,94,133,142,89,49,113,108,34,152,159
10,33,1,94,133,142,89,49,113,108,34,152,159
11,33,1,94,133,142,89,49,113,108,34,152,159

or simply run

luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "MultiChCapabilities", "1,7,1,94,108,34,152,159,\n2,7,1,94,108,34,152,159,\n3,33,1,94,108,34,152,159,\n4,33,1,94,108,34,152,159,\n5,16,1,94,108,34,152,159,\n6,16,1,94,108,34,152,159,\n7,33,1,94,133,142,89,49,113,108,34,152,159\n8,33,1,94,133,142,89,49,113,108,34,152,159\n9,33,1,94,133,142,89,49,113,108,34,152,159\n10,33,1,94,133,142,89,49,113,108,34,152,159\n11,33,1,94,133,142,89,49,113,108,34,152,159", 
masterID)

after the original script.

polling can be disabled with

luup.variable_set("urn:micasaverde-com:serviceId:ZWaveDevice1", "PollSettings", "0", masterID)

since it’s not needed. After all the code, just execute a luup.reload() and watch for your temperature sensor to update :slight_smile:

Edit: script was ok, I just updated instructions.

1 Like

Thanks for your great work! How would the code & configuration change if I would use just two outputs in smart implant, and not any temperature sensors or inputs?

Just remove the MultiChCapabilities after the 7th endpoint (included) and you shoudl be good to go.

1 Like

This is super! I bought two Implants and managed to get the temperature sensors working in Vera via the script provided above :slight_smile: :grinning:

However I lose the outputs somehow…? I do see the outputs showing up as _Appliance Module 2 and _Appliance Module 3 after loading the Luup code and running luup.reload() but I cannot create a scene to control the outputs (they don’s show up in the Device Actions list) and if I change some device names, for example the two inputs, then the outputs no longer show up. Also both the _GET_LANGsens… “devices” - or whatever they are - disappear.

If I cannot see the outputs anymore and I re-run the Luup code, the outputs (_Appliance module 2+3) are back again…

Tried the obvious tings like unpair and add the device again, but get each time the same result.

Does anybody has an idea :thinking:? :smiley:

I’ve never messed with outputs, so I can’t help. To be honest, I’ve powered it off, because it’s causing major problems. I’ve opened a ticket with Fibaro, but so far they’ve not really replied. In my case, a Smart Implant becomes hot (as per the internal temp sensor), then hangs and the entire ZWave network is affected, at the point to become unusable.

Oeps… OK thx for sharing this info. I have one Implant whereby I use the Logical Inputs and Temperature sensor and used your Luup code (for that one it is OK not to have the outputs). With the other other Implant I do not use the Inputs (but do use the temperature sensor) and Output relays and that one is paired as FGS 223 and the temperature sensor and logical output relays are working. So far so good. Thank you for sharing your observations, good to continue to monitor the behaviour

Maybe mine is defective. I have a case open with Fibaro, because it’s constantly at 30+ degrees (at 35+ and more), and then it hangs. I’m seeing from yours that you’re under 30C. I have another one spare around, and I’ll probably pair with ZWay just to see if it’s Vera, the device or both.

So they should be:

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,

Still, after multiple luup reloads there are a lot of “extra” devices. See attached image (it’s showing just a subset of all smart implant devices)

Would only want outputs to show up.