Plugwise USB Stick / Circle+

Hi,

I got a bunch of old Plugwise Circle plugs, as well as a Circle+ and a Plugwise USB stick. I sourced them second hand from different sources. This means the Circle+ is not paired with the USB stick. So now I’m looking for a method to get that fixed.

What I’ve tried so far:

  • This Python script. It’s very outdated. I first ran 2to3 on it, to convert it from Python 2 to 3. After fixing some Python errors after that, it still didn’t pair the Circle+ to the Stick.
  • This also outdated Python script. Although it’s Python 3, I also couldn’t get it to work. The documentation is minimal and unclear.
  • I found a link to the original Plugwise Source software here. I installed a trial version of Parallels on my MacBook and installed the Source software. I had to manually install DotNet Framework first, but than it installed. However, it doesn’t seem to be able to connect to the Stick. When I plug the stick in, Parallels asks if it needs to connect the stick to macOS or to Windows, I choose Windows of course. But nothing happens, the Source software keeps “searching for the Stick”.
  • (I noticed there’s a feature request for the Plugwise USB integration to integrate the pairing directly into the integration, but that’s open for almost 2 years now, so I’m not sure if that will ever be added.)

Is there any other way to pair my Circle+ to my Stick? I have available:

  • A MacBook Air with M2 processor (with a trial version of Parallels, but I’m not sure if I’ll be able to get the stick working on that)
  • An Odroid machine where HomeAssistant runs on.

As I understand it, once I have paired the Circle+ to the Stick, the other Circles will pair to the Circle+ automatically, once I reset them via plugging in/out for 3 seconds 3 times in a row. I really hope I can get this all to work, since that will enable me to measure energy usage of a lot of devices with these very cheap Circle plugs.

@brefa, @ArnoutD_77 can you maybe help?

You will need the software called “source” which runs on windows with a license. For more then 20 circles you will need an special license.
Run source software and create a network from the circles. Give each circle it’s own name (I used the ID for that) and place it in special room and group (I used misc for that)
When you are able to switch each circle via source software you are one step further.

Connect Plugwise stick to HA machine and use HACS Plugwise beta integration (at least that’s what I use) and after a while you will get every circle as entity in HA. But beware the initial start is with me a bit flaky. Sometimes it takes multiple tries and patience before it works. When you get it working it’s running great.
I think my problem is that I’ve got a network of 35+ devices but 10 of them are stored in a drawer and not online. I’ve got the feeling that this is causing routing problems somehow. Still working on that but before I added the last circles all work great.

I’m on a Mac. I tried running that “Source” app on Windows via Parallels, but it didn’t work. It didn’t connect to the stick.

You need a windows box. I’ve got a W7 box on VMWare specially for this :slight_smile:

What’s the difference between your VMWare “windows box” and me running Windows via Parallels?

To be honest, don’t know. Not familiar with parallels but one thing is for sure, usb passthrough has to work correctly.

The stick must be linked to a Circle+ first. All other devices are then registered within the memory of the Circle+. Using the original Plugwise source software is the most easy and recommended way to do this. The python Plugwise usb lib has some methods to do this manually but is not documented.

The current version (v0.40.7) of the custom integration in hacs plugwise_usb-beta does not cache any data, so it is retrieving all energy information during startup, which requires a really stable plugwise network to be reliable. Including to have all devices be reachable/online.

The development version (v0.50a2, only visible if you enable beta in hacs) is a full rewrite of the custom integration support caching of data. This with some other architectural changes makes the integration less dependent to a reliable network, especially during startup.

Can you elaborate on that? I tried it, but didn’t have any success. What functions should be called in what order?

1 Like

@bartkummel Are you still using the Plugwise Stick?
If you are, can you please test Plugwise_usb-beta v0.50.0a25?
In that versions I’ve managed to make automatic joining work, as well as the device-add / device-remove services.
Looks like its all working in my system but I need others to confirm this :slight_smile:

Hi @bouwew,

Great news that you’re working on this and that you seem to have some success. Today I finally found some time to try this. I had disconnected my stick since I can’t do anything useful with it if I can’t pair any plug to it. So, I reconnected it and updated to v0.50.0a37 of the Plugwise USB beta. It didn’t connect to the stick, so I removed the “hub” and started the installation process again. After selecting the correct serial port, it starts doing stuff, and then after a while it fails. I tried multiple times, every time with the same outcome. Here are the relevant log lines:

2025-05-25 12:08:48.425 WARNING (MainThread) [plugwise_usb.connection.receiver] Invalid message length received for StickInitResponse, expected 42 bytes got 20
2025-05-25 12:09:03.407 WARNING (MainThread) [plugwise_usb.connection.queue] No device response to StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1) within 15 seconds, cancel
2025-05-25 12:09:03.415 WARNING (MainThread) [plugwise_usb.connection.receiver] Connection lost

PS
I also tried with the exact same version you recommended in your last message (v0.50.0a25) but that didn’t make any difference either.

I went back to v0.50.0a37 and enabled debug logging. Here’s what appeared in the log now:

2025-05-25 12:34:21.631 INFO (MainThread) [plugwise_usb.connection.receiver] Connection made
2025-05-25 12:34:21.662 DEBUG (MainThread) [plugwise_usb.connection.queue] submit | start (1) StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=0)
2025-05-25 12:34:21.662 DEBUG (MainThread) [plugwise_usb.connection.queue] Add request to queue: StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=0)
2025-05-25 12:34:21.696 DEBUG (MainThread) [plugwise_usb.connection.queue] Send_queue_worker started
2025-05-25 12:34:21.696 DEBUG (MainThread) [plugwise_usb.connection.queue] Sending from send queue StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=0)
2025-05-25 12:34:21.696 DEBUG (MainThread) [plugwise_usb.connection.manager] Write to USB-stick: StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=0)
2025-05-25 12:34:21.702 INFO (MainThread) [plugwise_usb.connection.sender] Sending StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1)
2025-05-25 12:34:21.703 DEBUG (MainThread) [plugwise_usb.connection.sender] write_request_to_port | Write StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1) to port as b'\x05\x05\x03\x03000AB43C\r\n'
2025-05-25 12:34:21.786 DEBUG (MainThread) [plugwise_usb.connection.receiver] Received data from USB-Stick: b'\x05\x05\x03\x030000000500C177EB\r\n\x05\x05\x03\x0300110005000D6F000075BD6101009BBC\r\n\x83'
2025-05-25 12:34:21.796 DEBUG (MainThread) [plugwise_usb.connection.receiver] Data queue worker started
2025-05-25 12:34:21.797 DEBUG (MainThread) [plugwise_usb.connection.receiver] Data b'\x05\x05\x03\x030000000500C177EB' converted into StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT)
2025-05-25 12:34:21.797 DEBUG (MainThread) [plugwise_usb.connection.receiver] Add response to queue: StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT)
2025-05-25 12:34:21.800 DEBUG (MainThread) [plugwise_usb.connection.receiver] Queue: start new worker-task
2025-05-25 12:34:21.829 DEBUG (MainThread) [plugwise_usb.connection.receiver] Message queue worker started
2025-05-25 12:34:21.829 DEBUG (MainThread) [plugwise_usb.connection.receiver] Priority: Priority.HIGH
2025-05-25 12:34:21.831 DEBUG (MainThread) [plugwise_usb.connection.receiver] Message queue worker queue: StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT)
2025-05-25 12:34:21.831 DEBUG (MainThread) [plugwise_usb.connection.receiver] Notify stick request subscriber for StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT)
2025-05-25 12:34:21.831 DEBUG (MainThread) [plugwise_usb.connection.sender] Received StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT) as reply to StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1)
2025-05-25 12:34:21.833 DEBUG (MainThread) [plugwise_usb.connection.receiver] Finished Notify stick response subscriber for StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT)
2025-05-25 12:34:21.837 WARNING (MainThread) [plugwise_usb.connection.receiver] Invalid message length received for StickInitResponse, expected 42 bytes got 20
2025-05-25 12:34:21.884 DEBUG (MainThread) [plugwise_usb.connection.sender] write_request_to_port | USB-Stick replied with StickResponse (seq_id=b'0005', retries=0, ack=ACCEPT) to request StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1)
2025-05-25 12:34:21.884 DEBUG (MainThread) [plugwise_usb.connection.receiver] Node response subscriber added: mac=None, msg_idS=(b'0011',), seq_id=b'0005'
2025-05-25 12:34:21.884 DEBUG (MainThread) [plugwise_usb.connection.receiver] node subscription created for None - b'0005'
2025-05-25 12:34:21.884 DEBUG (MainThread) [plugwise_usb.connection.sender] write_request_to_port | request has subscribed : StickInitRequest (mac=not defined, seq_id=b'0005', attempt=1)
2025-05-25 12:34:21.884 DEBUG (MainThread) [plugwise_usb.connection.queue] Sent from queue StickInitRequest (mac=not defined, seq_id=b'0005', attempt=1)
2025-05-25 12:34:36.705 INFO (MainThread) [plugwise_usb.messages.requests] No response received for StickInitRequest (mac=not defined, seq_id=b'0005', attempt=1) within 15 seconds
2025-05-25 12:34:36.705 DEBUG (MainThread) [plugwise_usb.connection.receiver] Node response subscriber removed: mac=None, msg_idS=(b'0011',), seq_id=b'0005'
2025-05-25 12:34:36.707 WARNING (MainThread) [plugwise_usb.connection.queue] No device response to StickInitRequest (mac=not defined, seq_id=UNKNOWN, attempt=1) within 15 seconds, cancel request
2025-05-25 12:34:36.710 DEBUG (MainThread) [plugwise_usb.connection.queue] Stop queue
2025-05-25 12:34:36.713 DEBUG (MainThread) [plugwise_usb.connection.queue] Sending from send queue PlugwiseCancelRequest (mac=not defined, seq_id=UNKNOWN, attempt=0)
2025-05-25 12:34:36.717 DEBUG (MainThread) [plugwise_usb.connection.queue] queue stopped
2025-05-25 12:34:36.717 DEBUG (MainThread) [plugwise_usb.connection.manager] Disconnecting manager
2025-05-25 12:34:36.719 DEBUG (MainThread) [plugwise_usb.connection.receiver] Priority: Priority.CANCEL
2025-05-25 12:34:36.725 DEBUG (MainThread) [plugwise_usb.connection.manager] Manager disconnected
2025-05-25 12:34:36.735 WARNING (MainThread) [plugwise_usb.connection.receiver] Connection lost

Am I understanding you correctly? You want to run without the Stick?
That doesn’t work, you need at minimum a Stick - Circle + pair to get the software starting properly.

No, that’s not what I meant. I just meant to say that I had previously removed the stick and the integration, because it was useless for me since I couldn’t pair any plug. So after your message, I reconnected my stick and re-installed the integration. Which didn’t work and lead to the logs that I’ve included above.

OK thanks. Did you update an existing Plugwise_usb beta integration? Which version was that, do you remember?

My suggestion would be anyway to try to start fresh: remove the existing version of the Integration, restart HA, then add the Integration again via the Settings → Devices → + button.

That’s exactly what I did, because I had removed the integration before.

Since I have been trying lots of different approaches to pair my Circle+ plug to my stick, including running various Python scripts, could it be that I eventually damaged the stick? Or brought it in a weird state at least?

I’m not sure. In the log it says Invalid message length received for StickInitResponse, expected 42 bytes got 20.
Was your Stick maybe placed in a Stretch in the past?

If not, did you try the Plugwise Source software to link the Circle + to the Stick?
After reading your first post, you did not try this.
I would strongly suggest you try this because this will work if the Stick and Circle + are compatible, also to the Source software.

I was give an Stick and a Circle + that I could not link via Source. After some trying I found that the firmware of the Stick (visible in Source) was too new. A sign that it was placed in a Stretch.

I bought all my Plugwise stuff second hand from different sources. I don’t have a Windows computer, but I tried using the Plugwise Source software via a virtual machine on my Mac, without any success. Then I tried all Python scripts that I could find online, and even created one of my own. All without any luck.