Edilkamin pellet stove controlled with "the mind"

Hey guys,
I’ve started working on this today.
I’ve made the original JS and Python implementation, but I’m seeing more demand for Home Assistant lately so I’m giving it a go.

I can turn on/off the stove from Home Assistant.
It’s a very early implementation.
I’d like to release early/often with a basic pull request to Home Assistant, but first I’d like to get the device discovery right otherwise people would have to enter the MAC address by hand and that’s a bit painful to get right.

Leveraging the bluetooth to do so seems easy enough because the device advertise itself as EDILKAMIN_*, however later the MAC address used to identify the device to control it via the remote mqtt service uses the wifi MAC address.
I’ve identified a possible relation between the two, but I need to verify if it’s indeed the case or not.
Could you share a few info like:

  • the device bluetooth name (for me it’s EDILKAMIN_EP)
  • device bluetooth MAC address (A8:03:2A:FE:D5:0A for me)
  • device wifi MAC address (A8:03:2A:FE:D5:08 for me)

I’ll have more question later, I’ll actually join the Discord server, that would be easier to sync up.

Edit: went through the source code a bit and yeah there’s a relation between the two.

    private final void getFullMac(String str) {
        if (!Intrinsics.areEqual(str, "null")) {
            StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
            String format = String.format("%02X", Arrays.copyOf(new Object[]{Long.valueOf(Long.parseLong(StringsKt.replace$default(str, ":", "", false, 4, (Object) null), CharsKt.checkRadix(16)) - ((long) 2))}, 1));
            Intrinsics.checkNotNullExpressionValue(format, "java.lang.String.format(format, *args)");
            Locale locale = Locale.ROOT;
            Intrinsics.checkNotNullExpressionValue(locale, "Locale.ROOT");
            if (format != null) {
                String lowerCase = format.toLowerCase(locale);
                Intrinsics.checkNotNullExpressionValue(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
                BluetoothState.INSTANCE.setMqttWifi(StringsKt.padStart(lowerCase, 12, '0'));
                return;
            }
            throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
        }
    }

So they simply do -2 from the bluetooth MAC to get the wifi MAC it seems.
I’m going back to the implementation then :slight_smile: