[RELEASE] Fibaro Smart Implant FGBS-222

I use the sensors in alarm contact sensor mode and they work perfectly ... once you manually trigger them.

Can anyone tell me if I can get an analog reading, or number, from a voltage input on this unit? It appears from the driver it will, but not sure.

What I have is a 0 to 10 volt analog position sensor. I need to read what the position is. Don't care what the conversion units are, as long as it's an analog value.

@j715, yes, the device 2 inputs can be configured as analog, 0-10V. They appear as analog child devices with voltage. You can refresh manually or configure for automatic updates based on time or interval voltage change.

1 Like

I'm having an issue getting binary inputs to report AND not be connected to the output.

I have C-7 hardware, verson 2.2.4.158
FGBS-222 hardware version 2, firmware version 5.01, protocol version 6.02

Connected to a gate controller - two dry-contact relays for input , and outputting to regular gate inputs.

I want to read the inputs as binary, and have them disconnected from the outputs.

Using the stock hubitat driver I can achieve this on input/output 1, but ouput 2 seems to always follow input 2.
Using the @christi999 driver (v1.7.2) it seems the inputs/outputs are disconnected, but the inputs never report. I can manually refresh the analogue input and get a sensible voltage, but the digital input never reports. Even after manually triggering the inputs a few times.

Any tips on how to resolve this?

I’m using the stock driver, the more advanced one just doesn’t work well for me.

Can you get both input 1 and input 2 to not affect their respective output?

Some issues started to show with the C7 for a few users using my driver. I don't have one so I never fixed it. I suspect there may be some configuration messages lost when the implant is "configured". I suggested increasing the delay between messages (line 717, currently 500ms, increase to maybe 2000ms, configure will take a long time though, maybe 2 minutes...) but I didn't receive feedback....

@christi999 - ok, trying that now.

@dJOS - can you get both input 1 and 2 to act "disconnected" from output 1 and 2 with the stock driver?

Yes, just turn this setting off:

Screen Shot 2021-01-11 at 11.21.06 am

Be careful tho, when you make changes to the device config and save them, it will trigger the relays (no idea why).

Tried that and it only seems to work for input 1. Input 2 still controls output 2.

If you feel like giving it a try... I reworked the configure() function to improve the separation between commands, it is a bit clunky but gets the job done for now.

def configure() {
	def configuration = new XmlSlurper().parseText(configuration_model())
	def cmds = []
	cmds << toEndpoint(zwave.protectionV2.protectionSet(localProtectionState : localProtection1.toInteger(), rfProtectionState: rfProtection1.toInteger()), 5)
	cmds << toEndpoint(zwave.protectionV2.protectionSet(localProtectionState : localProtection2.toInteger(), rfProtectionState: rfProtection2.toInteger()), 6)
	cmds << zwave.associationV2.associationRemove(groupingIdentifier: 1, nodeId: zwaveHubNodeId)
	cmds << zwave.associationV2.associationRemove(groupingIdentifier: 2, nodeId: zwaveHubNodeId)
	cmds << zwave.associationV2.associationRemove(groupingIdentifier: 3, nodeId: zwaveHubNodeId)
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationRemove(groupingIdentifier: 1, nodeId: [zwaveHubNodeId])
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationRemove(groupingIdentifier: 2, nodeId: [zwaveHubNodeId])
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationRemove(groupingIdentifier: 3, nodeId: [zwaveHubNodeId])
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationSet(groupingIdentifier: 1, nodeId: [0,1,1])  // 
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationSet(groupingIdentifier: 2, nodeId: [0,1,1])   // Used when IN1 input is triggered (using Basic Command Class).
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationSet(groupingIdentifier: 3, nodeId: [0,1,2])   // Used when IN2 input is triggered (using Basic Command Class).     
	logDebug "cmds: ${cmds}"
	formatCommands(cmds, 500)
       
	pauseExecution(4000)
	configuration.Value.each {
		def settingValue = settings[it.@index.toString()].toInteger()
		def byteSize = sizeOfParameter(it)

		if (settingValue != null) {
			if (settingValue == "") {
				logDebug "Setting ${it.@index} is empty"
			}

			def index = it.@index.toInteger()
			cmds = []
			cmds << zwave.configurationV1.configurationSet(configurationValue: integerToBytes(settingValue, byteSize), parameterNumber: index, size: byteSize)
			logDebug "cmds: ${cmds}"
			pauseExecution(500)
			formatCommands(cmds, 500)
		} else {
			logDebug "Setting ${it.@index} has null value"
		}
	}
	
	configuration.Value.each {
		def settingValue = settings[it.@index.toString()].toInteger()
		def byteSize = sizeOfParameter(it)

		if (settingValue != null) {
			if (settingValue == "") {
				logDebug "Setting ${it.@index} is empty"
			}

			def index = it.@index.toInteger()
			cmds = []
			cmds << zwave.configurationV1.configurationGet(parameterNumber: index)
			logDebug "cmds: ${cmds}"
			pauseExecution(500)
			formatCommands(cmds, 500)
			
		} else {
			logDebug "Setting ${it.@index} has null value"
		}
	}
	
	cmds = []
	cmds << zwave.versionV1.versionGet()
	cmds << zwave.associationV2.associationGet( groupingIdentifier: 1)	 
	cmds << zwave.associationV2.associationGet( groupingIdentifier: 2)	
	cmds << zwave.associationV2.associationGet( groupingIdentifier: 3)	
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier: 1)
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier: 2)
	cmds << zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier: 3)
	
	logDebug "cmds: ${cmds}"
	pauseExecution(500)
	formatCommands(cmds, 500)
}

Ok, so I did a bunch of testing and found bugs in both the stock driver, and @christi999's driver.

Reminder on my setup:
C-7 hardware, verson 2.2.4.158
FGBS-222 hardware version 2, firmware version 5.01, protocol version 6.02

To test this I wrote a function in the custom driver to just read all of the configurations, association reports and localProtection reports and spit it out (Will send pull request). Then I switched back and forth between the custom driver and the stock one to see what was happening.

The stock driver fails to set localProtection to 2 on endpoint 6 when de-selecting "Inputs connected to outputs":
image
This is why input 2 is always connected to output 2 (but input 1 is disconnected using the option).

Other than that the stock driver is missing a bunch of configuration options, but it doesn't override the options set by other drivers (so you can configure, then switch back to the stock driver if you like).

On my hardware (maybe C-7 specific) @christi999's driver sets associations which prevent messages getting back to the hub.
This is what the associations look like from the stock driver (which receives all the inputs/output changes that I could test):


After running configure from @christi999's driver it looks like this:

Which matches what the code is asking for - but the hub doesn't seem to receive reports sent to endpoints 1 and 2, and consequently nothing is reported. This results in the inputs not reporting anything, and the outputs not reporting if they turn themselves off (via a timer for example)

In the pull request I have the associationSet stuff all commented out (which works for me), but this may not work for everyone.

Hope this is helpful (see here: Split configure into two functions and add Check Config button by exciton · Pull Request #7 · muchu999/Hubitat · GitHub)

2 Likes

Version 1.7.3 is now available. Thanks to @bon's work, it seems to correct the major problems with the C7 hardware. I didn't comment-out the association stuff as @bon did but instead matched what the stock driver is doing. The changes shouldn't impact other users (tested on my C4), let me know if you encounter issues.

The configuration verification that use to be part of the "configure" command has been moved to a new command "Check Config". To configure the implant you still perform a "configure" and if you want to verify that everything is setup properly, you can then perform a "Check Config" and look at the logs for any problems.

As part of debugging, I added delays in the code to make sure the Z-WAVE network is not saturated. I left the delays in place for now, "configure" and "Check Config" each take about 40 sec (check the logs).

Hi,

I am wondering how you set the temperature offset for the internal thermometer? I do not see any setting for that specifically in the preferences.

If you use my driver, it is called "Internal Sensor Temp Offset". The Sensor usually reads hot because it receives heat from the implant's electronic. I think it might be meant to monitor that the implant is not overheating...

Thanks. Will check the driver out.

Might be a dumb question but where do I download the Internal Sensor Temp Offset driver?

From your question I assume you are using the hub's built in driver for the implant, which doesn't have settings for temperature offset.

There are many ways to install my driver, you could for instance install it very simply from the "Hubitat Package Manager" if you have that app installed. I recommend this method.

You can also download the 5 files from the github link at the top of this thread and install them as 5 drivers in the hub and then select that driver in the implant "device" page.

@christi999 thank you for your efforts. I haven't purchased an FSI yet - does your driver allow a temp offset for a DHT22 temperature and humidity sensor, and is there a humidity offset as well for that sensor?

Good Question, I never really looked at the details of the DHT22 before. No one else asked... I see in the manual that there can only be one of those (instead of 6 DS18B20) and that temp and humidity are mapped to endpoint 8 and 9.

The current driver wouldn't work correctly with that. Temperature on endpoint 8 will probably work fine (it already has a temperature offset parameter). However, endpoint 9 is always treated as a temperature reading. I will have to change a few things in the driver, no big deal. Not having a sensor, I will need someone to test it...A humidity offset would not be a problem.