Salus sp600 driver

I just got one of these plugs.
The generic zigbee outlet works fine to turn on and off however I noticed that there is a power monitor feature

Is there a specific driver for this?

I knocked one up earlier in the year:

Although really, there's no reason that they shouldn't work with the generic drivers, they don't do anything special .....

I think at the time there was an issue with power metering in the generic driver, but think I saw it fixed in a HE update a while ago. I've not tried switching back to the generic one myself.

Does it not report power after hitting configure / refresh in the generic driver?

IF not, maybe one for @mike.maxwell to take a look at.

2 Likes

The 3 of us are becoming the UK Salus fan club!

I am pretty sure the standard driver still doesn't report power on these. I am still using a version of @martyn's driver for mine. I did post some additional info that I had found for adjusted some variables on the SP600 in the thread linked to above. You can change the minimum report time and the Watt threshold change it reports. I've successfully used different values for different units depending on how accurate and how often I need the power report.

This is my modified version of Martyn's driver with configurable minimum report time and Wattage change.

/**
 * 
 *  Driver for Salus SP600 Smart Plug *
 *  
 *	
 */


metadata {

	definition (name: "Salus SP600 Smart Plug GT02", namespace: "Salus", author: "Salus") {

		capability "Configuration"
		capability "Switch"
		capability "Power Meter"
		capability "Refresh"

		fingerprint profileId: "0104", inClusters: "0000, 0001, 0003, 0004, 0005, 0006, 0402, 0702, FC01", outClusters: "0019", manufacturer: "Computime", model: "SP600", deviceJoinName: "Salus SP600 Smart Plug"
	}

}


preferences {
	
	input name: "logEnable", type: "bool", title: "Enable debug logging", defaultValue: true
	input name: "txtEnable", type: "bool", title: "Enable descriptionText logging", defaultValue: true
	input name: "ReportMin", type: "number", title: "Minimum Report Time (seconds)", defaultValue: 1
	input name: "ReportDelta", type: "long", title: "Minimum Report Watt change 1 to 10", defaultValue: 5
}



def initialize() {
	
	log.warn "Initialize Called!"

	configure()
	
}

def logsOff(){

	log.warn "debug logging disabled!"

	device.updateSetting("logEnable",[value:"false",type:"bool"])

}

def updated(){

	log.info "Updated Called!"

	log.warn "debug logging is: ${logEnable == true}"
	log.warn "description logging is: ${txtEnable == true}"
	
	if (logEnable) runIn(1800,logsOff)

}

def parse(String description) {

	if (logEnable) {
		
		log.debug "Parse Called!"
		log.debug "description is $description"

	}
	
	def eventMap = zigbee.getEvent(description)

	if (!eventMap) {
		
		eventMap = getDescription(zigbee.parseDescriptionAsMap(description))	

	}

	if (eventMap) {
	
		if (txtEnable) log.info "$device eventMap name: ${eventMap.name} value: ${eventMap.value}"

		sendEvent(eventMap)

	}
	else {
		
//		log.warn "DID NOT PARSE MESSAGE for description: $description"			
		
		def descriptionMap = zigbee.parseDescriptionAsMap(description)
		if (logEnable) log.debug "descriptionMAp: $descriptionMap"			

	}	

}

def off() {

	zigbee.off()

}

def on() {

	zigbee.on()

}

def refresh() {
	
	if (logEnable) log.debug "Refresh Called!"
	
	zigbee.onOffRefresh() + simpleMeteringPowerRefresh()

}

def configure() {

	if (logEnable) log.debug "Configure Called!"

	zigbee.onOffConfig() + simpleMeteringPowerConfig() + zigbee.onOffRefresh() + simpleMeteringPowerRefresh()

}

def simpleMeteringPowerRefresh() {

	zigbee.readAttribute(0x0702, 0x0400)

}

def simpleMeteringPowerConfig(minReportTime=ReportMin.toInteger(), maxReportTime=600, reportableChange=ReportDelta.toInteger()) {

	zigbee.configureReporting(0x0702, 0x0400, DataType.INT24, minReportTime, maxReportTime, reportableChange)

}

def getDescription(descMap) {

	def powerValue = "undefined"

	if (descMap.cluster == "0702") {

		if (descMap.attrId == "0400") {

			if(descMap.value != "ffff") powerValue = zigbee.convertHexToInt(descMap.value)

		}

	}
	else if (descMap.clusterId == "0702") {

		if(descMap.command == "07"){

			return	[name: "update", value: "power (0702) capability configured successfully"]

		}

	}
	else if (descMap.clusterId == "0006") {

		if(descMap.command == "07"){

			return	[name: "update", value: "switch (0006) capability configured successfully"]

		}

	}

	if (powerValue != "undefined"){

		return	[name: "power", value: powerValue]

	}
	else {

		return null

	}

}
2 Likes

Both work really well. Thanks @martyn for the orginal driver.
The reason why I got this plug is because of the power reporting, it's not a bad price for the plug and power measurement.

Quick question, the power reports as 100 for 10 watts, is the decimal omitted on purpose? I had a slight heart attack thinking my bulbs were energy efficient and they were taking 100 watts - silly billy.

I did get the Salus TRV delivered today, hoping some generic drivers would work, but no :frowning:
I think the same cluster information came up as the relay switch

That's odd as mine all report normal values. I wonder if the firmware in them has been changed.

Do you get a decimal value?
This is what I get

No it only ever seems to output integers but mine are always reasonable numbers., certainly not out by a factor of 10

is there anything I can write in the driver to divide the result by 10 to display?

I'm no coder but I changed this line (if that is okay, I'm unsure on coding etiquette?)

if (powerValue != "undefined"){

	return	[name: "power", value: powerValue/10]

Yep. I've just tested the exact same change and a quick test proves it works as expected. A 60W lamp on mine now shows 7.5W

That's absolutely fine, that's how things get improved. And I nicked 99.9% of it from @martyn in the first place :grinning:

OMG :open_mouth: That's a quarter of the bulb power in my house lol

Thanks again for support

I know! I just kept one old style bulb in a plug in lampholder just for testing like this all my others are LED.

That's great, I didn't realise there was a driver that reported power on the Salus plugs. I have been using them for a while with the generic driver. Will give martyn's driver a try.

How come the Generic ZigBee Outlet driver doesn't do it @mike.maxwell?

How come what doesn't do what?

The Salus SP600 outlet supports power monitoring, but when using the Generic ZigBee Outlet driver it does not report any power usage. My understanding was that the generic driver would report it if the device supported it in the usual way.

When I switch to Martyn's driver it does report power usage. Is there something non-standard in the Salus SP600 that stops the generic driver reporting power usage?

don't know, since it's not on the compatibility list, and we don't have one to test.

Got one of these today and integrated it to my setup.
I really like the feel of it and the size is great.
My new goto outlet.

1 Like

I agree, it's a solid build and feels quality for the price

I've been buying the Salus outlets because the Samsung ones where not available in the UK, and Samsung couldn't tell me when their new version would be sold in the UK.

And the Salus ones were the cheapest power reporting ones I could find here at £23.

But I see Samsung is selling their 2019 version now for £22.50 on Amazon. Anyone used that?

Download the Hubitat app