Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Energy consumption measuring support [INSPELNING] #10

Closed
kevin-wijnen opened this issue Sep 11, 2024 · 10 comments
Closed

Energy consumption measuring support [INSPELNING] #10

kevin-wijnen opened this issue Sep 11, 2024 · 10 comments

Comments

@kevin-wijnen
Copy link

kevin-wijnen commented Sep 11, 2024

Background

As of yesterday, IKEA launched the INSPELNING plug (in the United States, and also France) which is capable of turning its powering device(s) on/off but also measuring their energy consumption. It coincides with IKEA's earlier announcement to support end users with energy consumption readings through their own proprietary mobile apps.

Feature Request

Is it possible to add support for energy consumption readings originating from the INSPELNING, to allow for outputting said data to use it in other tools?

The outlet code might provide base support for controlling the state of plugged in devices, but the energy consumption readings need to be added in to fully support the new released plug.

Although a quick scan through the documentation did not make it clear to me how to contribute it, I'd be willing to help developing support for it once the product is also launched where I do live.

@lpgera lpgera changed the title Energy consumption measuring support [INSPILNING] Energy consumption measuring support [INSPELNING] Sep 11, 2024
@lpgera
Copy link
Owner

lpgera commented Sep 11, 2024

Hey @kevin-wijnen!

Thanks for opening this issue! I've heard the news yesterday and I'd love to add energy consumption monitoring support to the library, but the INSPELNING plugs are not available here in my country yet, and I couldn't even find a planned release date. 😢

If you, or anybody else reading this issue could create a JSON dump of their system and post the relevant part showing the new device here, that'd be a huge help to get the development going.

@kevin-wijnen
Copy link
Author

kevin-wijnen commented Sep 11, 2024

Hey @lpgera 👏!

Thanks for the fast response - yeah I am waiting for the INSPELNING plugs to get an European release. Looking at the initial (public) announcement/press release in May, it looks like they moved up the release from October to September. So I would assume we'll get them in Europe sooner than later. 👀 EDIT: Seems like France also has them available.

Thanks for pointing me to the dump section of the README - seems like I skipped that part during my quick scan. Hopefully someone sooner or later will be able to help. Count on my testing/support once I can order them myself.

@kevin-wijnen
Copy link
Author

Wanted to give a heads up: apparently the INSPELNING should be unofficially available in some countries through the physical stores, looking at Koenkk/zigbee2mqtt#23961.

There's also some information, possibly usable for direct implementation.

@kevin-wijnen
Copy link
Author

Another couple updates:

  1. A Python library for the Dirigera had a pull request merged recently, which does provide some dumpoed JSON data originating from the smart plug that could be used for implementation for this TypeScript library as well.
  2. In case we do prefer an own data dumping through the project's tools, I ordered the plugs earlier this week as they became available in the Netherlands this Wednesday. Although I would receive it within the first week of October. This is also really neat for actual testing any implementation with this library.

@lpgera
Copy link
Owner

lpgera commented Sep 27, 2024

Thanks for all the info! The dump from that other library's PR is definitely useful and I can get started with adding the new attributes based on that one.

I'll also likely need to rely on you to test the changes when I get there, because there's still no news about the device in Switzerland.

@kevin-wijnen
Copy link
Author

kevin-wijnen commented Sep 27, 2024

Thanks for all the info! The dump from that other library's PR is definitely useful and I can get started with adding the new attributes based on that one.

Forgot to add this, but when a Zigbee project started implementing it, there were some spotted issues with the measured values. Not sure if they showed up in the Python library, but might be worth knowing when someone gets to testing.

I'll also likely need to rely on you to test the changes when I get there, because there's still no news about the device in Switzerland.

No worries, I'll get to testing it once I get my order in. 👍

@lpgera
Copy link
Owner

lpgera commented Sep 28, 2024

I looked through all the Inspelning info I could find, including the issues you linked, and implemented the support for the new plug type in 667ede0. (Not published as a new version as of yet.)

These are the new device attributes which are going to be available:

  startUpCurrentLevel: number
  currentActivePower: number
  energyConsumedAtLastReset: number
  currentAmps: number
  currentVoltage: number
  timeOfLastEnergyReset: string
  totalEnergyConsumed: number
  totalEnergyConsumedLastUpdated: string
  childLock: boolean
  statusLight: boolean

And I added the following new outlet device methods to the lib:

await client.outlet.setStatusLight({
  id: 'YOUR_DEVICE_ID',
  statusLight: false,
})

await client.outlet.setChildLock({
  id: 'YOUR_DEVICE_ID',
  childLock: true,
})

I have no real world info about the capability of switching the status light on or off, or whether there really is a child lock feature on this device, but the JSON dumps suggest that these should work. 🤞

There's one more feature which I couldn't decipher yet. According to the JSON dumps, the device is capable of receiving the energyConsumedAtLastReset property, but I don't understand what kind of input it accepts and what it actually does.

@kevin-wijnen
Copy link
Author

Update

Seems like IKEA went from "in stock" (when I ordered) to "out of stock" (auto-cancelling my order) to "limited to large orders" (referring to when they deliver by truck for furniture). 😵‍💫

So I can't test it soon, sadly. I will keep this issue up-to-date once I can actually start testing, or when the plug should be available in Switzerland.

@kevin-wijnen
Copy link
Author

Oh hah, I just checked IKEA and it seems to be available for Swiss customers @lpgera!

@lpgera
Copy link
Owner

lpgera commented Oct 2, 2024

Oh hah, I just checked IKEA and it seems to be available for Swiss customers @lpgera!

Huge thanks for the ping, I managed to buy one today.

Support has landed in version 1.1.0 just now!

Closing the issue, but feel free to continue posting questions here, or just open a new one if you find any bugs.

@lpgera lpgera closed this as completed Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants