Thanks for the link, I’ve spent all morning trying to get my head around the CLI, but there are just too many steps for me at this time. I’m still using my modified ide handler, but am trying to migrate across to edge before the ide gets switched off.
The Frient Power Meter is the type that uses a sensor placed over the flashing LED, and it is hardcoded to assume 1000 pulses = 1 kWh. A quick search shows (mainly on the home assistant forums) plenty of users like me who have a meter that pulses at a different rate.
3200 per kWh in my case, but this can vary according to manufacturer.
Frient have not provided a way for users to alter this number (it is there in the firmware, but altering it is beyond a normal user).
As a result, the readings from both the old groovy Device Handler here and the new Edge Driver result in readings too high or too low for users who’s meter pulses differently.
In my case, 3.2 times too high.
The way around this I found was to alter the groovy code to compensate.
In my use case, in the old groovy code, altering powerDivisor activePowerDivisor and energyDivisor all to 3.2 resulted in readings that matched my Smart Meter Display.
If it is possible, rather than just produce a modified Edge Driver just for me, it might be useful to make the SIMPLE_METERING_DIVISOR_KEY and ELECTRICAL_MEASUREMENT_DIVISOR_KEY constants in the new Edge Driver user set variables instead.
Thank you, this works perfectly.
As expected, entering 3200 for the Simple Meter Divisor Key gives me the correct reading for the instantaneous Power Meter, maybe rename that to “Pulses per kWh” to make it easier to understand for other users.
I’ve only tested it for 20 minutes, but putting 32,000 as the Electrical Measure Divisor Key seems to be giving the correct output for the overall Energy Consumption. So it’s possible that can be hard coded to 10 times the Pulses per kWh figure.
I’m interested in a driver for iBlinds. The only capability it adds on top of a stock dimmer or window shade driver is the ability to send a “configure” command, which recalibrates the blinds. I have a WebCoRE piston that runs this regularly to keep the tilt setting from drifting.
This seems like it would be a relatively simple one to implement so I may try to work on it if I can get my head around setting up the Lua development environment…
Yes it is but ive noticed since its only doing white shades, not colour on the Sengled lamp, it works on colour and whites on the lidl one.
Its strange that on the ide handler both lidl and sengled lamps worked on whites and colour on both of the device handlers so thought it may do the colour on this custom handler, what do you think.