[OBSOLETE] MiHome (Connect) V2.0.1 [Energenie] (not Xiaomi MiHome)

The three inputs are for monitoring 3 phase power, so I’m not sure what you’d see connecting different devices. Probably just a sum of the readings?

On a related note, having just had solar PV fitted, I can confirm that the Energenie monitor cannot tell the difference between power draw and feed. Mine is reporting my 1.5kw feed as usage, so I may have to rethink what I do with it.

They are £16 on eBay, so I guess you’d buy two units (in your case an additional unit). Clip one onto your consumer unit and name it “Consumption” and clip the other unit to the output of your inverter and call it “Solar PV”. Then you can set up rules for each

The issue is that my “Consumption” meter is also reporting surplus generation being returned to the grid as usage. Over the weekend it was bright sunshine, there was under 1kw being used in the house, fed entirely from solar and the Whole House Monitor was reporting 2kw usage (rather than 0, or -2kw)

I could get closer with some creative maths and logic/guesswork, but I can’t see a solution that will tell me my actual grid usage without getting a smart meter involved.

Hi Mark, I reached out to them and this is their answer below:


Hi Ramiro,

Thank you for your query. API documentation is not currently available for the Dimmer Switch. Documentation is planned and will be provided in the future.

Kind Regards

Technical Team

Have you got the device added in smartthings? If you can see what data is beeing sent you.may be able to revers engineer

Hi Mark, yeah unfortunately this is the only way that I know how to bring the Energenie lights into ST. So no, I can’t see it at all in ST.

Thank god it still works with the google home integration, so I do have some way NOT to use their app which is pretty horrible and limited in functionality. Fingers crossed, they’ll release the API soon.

They’re having some issue with the latest firmware update on their gateway and the double-gang switches too. It’s a shame that this is the only product for UK/Ireland type of connections.

could try adding it as a switch and then see if you can get the data from it

But that’s the thing, I wouldn’t know how to add it without this integration. ST will not detect the switch nor I could add it manually… Alyc100’s script wont show it to add it as a regular switch either.

I’m probably missing something super obvious and don’t mind being told when I’m being an idiot, so feel free to do so :smiley: :smiley:

find this section in the smartapp, and uncomment the log debug, this should list all you devices on the account

def devicesList() {
	logErrors([]) {
		def resp = apiGET("subdevices/list")
//log.debug "device list '$resp.data'"
		if (resp.status == 200) {
        	state.data = ' '
            state.data = resp.data
            //log.debug "device states '${state.data}'"
			return resp.data.data
		} 
        else {
			log.error "Non-200 from device list call. ${resp.status}" // ${resp.data}"
			state.data = null
            return []
		}
	}
}

like this
debug device list '[data:[[aggregated_daily_at:2019-02-10T18:17:28.000Z, aggregated_hourly_at:2019-02-11T13:54:23.000Z, container_number:null, controlling_thermostat_id:null, created_at:2018-03-15T18:17:28.000Z, device_groups:[[id:8754, name:All, user_id:8332]], device_id:983, device_type:etrv, disconnected_at:null, energenie_thermostat_id:null, extra_data:null, firmware_version:null, frequency:null, hardware_version:null, id:122977, **label:**Front room SMALL eTRV, last_diagnostic_flags:[created_at:2019-02-09T02:09:48.000Z, diagnostic_flags:512, id:261968, subdevice_id:122977, updated_at:2019-02-09T02:09:48.000Z], last_temperature:17, nest_thermostat_id:null, notifications_enabled:true, optimise_warm_up_schedule:false, parent_device_last_seen_at:2019-02-11T14:45:38.000Z, power_state:0, power_state_1:null, power_state_2:null, power_state_3:null, power_state_4:null, rate_limit_tokens_updated_at:null, rate_limit_tokens_used:null, reactive_power:null, real_power:null, remote_id:1, side:null, socket1_label:null, socket2_label:null, socket3_label:null, socket4_label:null, startup_mode:0, target_temperature:30, timer1_enabled:null, timer1_friday:null, timer1_monday:null, timer1_off_time:null, timer1_on_time:null, timer1_saturday:null, timer1_sunday:null, timer1_thursday:null, timer1_tuesday:null, timer1_wednesday:null, timer2_enabled:null, timer2_friday:null, timer2_monday:null, timer2_off_time:null, timer2_on_time:null, timer2_saturday:null, timer2_sunday:null, timer2_thursday:null, timer2_tuesday:null, timer2_wednesday:null, timer3_enabled:null, timer3_friday:null, timer3_monday:null, timer3_off_time:null, timer3_on_time:null, timer3_saturday:null, timer3_sunday:null, timer3_thursday:null, timer3_tuesday:null, timer3_wednesday:null, updated_at:2019-02-11T13:55:42.000Z, voltage:2.82812, voltage_reported_at:2019-02-11T11:55:06.000Z], [aggregated_daily_at:2019-02-10T18:26:30.000Z, aggregated_hourly_at:2019-02-11T14:21:04.000Z, container_number:null, controlling_thermostat_id:null, created_at:2018-03-15T18:26:30.000Z, device_group…[TRUNCATED]

or slip this in (just the bold bit) under "def updateDevices() "

    else if (device.device_type == 'motion' || device.device_type == 'open' ) {
    	log.debug "Identified: device ${device.id}: ${device.device_type}: ${device.label}"
        selectors.add("${device.id}")
        def value = "${device.label} Motion Sensor"
		def key = device.id
		state.miMotionSensors["${key}"] = value
        
        //Update names of devices with MiHome
 		def childDevice = getChildDevice("${device.id}")
 		if (childDevice) {
 			//Update name of device if different.
 			if(childDevice.name != device.label + " Motion Sensor") {
				childDevice.name = device.label + " Motion Sensor"
				log.debug "Device's name has changed."
			}
 		}
    }

else {
** log.warn "UnIdentified: device {device.id}: {device.device_type}: ${device.label}"
}
}
log.debug selectors
}

it should show you the device type

once we have the type and id number we can quiry the parameters it will report

Hi

Please can someone let me know if this supports the energenie mihome dimmer switch as well as the standard one? Would like the option to dim.

Thanks

Dave

Hi,
I’m new to Smartthings and have a lot of Energenie stuff already and this integration is fab. One quick question though, Has anyone got this working with the door/windows sensors please? I don’t have any yet but was looking to get a couple. Many thanks
Pete

i haven’t tried myself but earlier posts in this tread suggest not :frowning:

Thank you. Indeed, I just hopes perhaps it has come on from the time when they were posted. Boo!

Find my link to github mine works it will show as a motion sensor, so add thats

https://github.com/Mark-C-uk/SmartThingsPublic/tree/master/devicetypes/alyc100

Sorry for the dumb question but is your code in answer to my door sensor question or the dimmer switch one please? Many Thanks

So I took a punt and ordered a MiHome contact sensor and it works fine. Alyc100’s original device handlers pick it up as a motion sensor (Motion when open and no motion when closed) so all is good :slight_smile: Thanks.
Pete

Daft question but you need both ST and the Mi hub right? would be better with less boxes if possible.