Plugwise Plugs component

Hi Devastator, I am also patiently but eagerly awaiting your project to come online, thanks in advance!

I’ve kind of the same demand too. So I started to rewrite the mentioned plugwise lib into an required async version. I’ve the basics structure on github at this branch almost ready. Still a lot of fine tuning, code cleanup and testing to be done…
No promises yet, but a native Home Assistant integration look feasible somewhere in the near future :grinning:

1 Like

Sorry, I now see that this topic is about the Circle plugs, not about the new Plugs, so never mind.

That’s sweet and just in time :). My Plugwise Stretch burned out the other day, so I could use the Pi to read all my circles with this?

Gave it a go, but its not quite clear how to initialize the stick. The supplied python code errored out for me:

admin@Pi4:~/git/python-plugwise-async/example $ sudo python3 scan.py
Traceback (most recent call last):
  File "scan.py", line 4, in <module>
    plugwise.scan(discovery_finished)
NameError: name 'discovery_finished' is not defined

Trying to run a scan (after changing com5 to /dev/ttyUSB0) with the example code seems to get stuck at the connecting stage:

admin@Pi4:~/git/python-plugwise-async/example $ sudo python3 example.py
start connecting to stick

PS I got everything running with what cyberjunky made @ https://github.com/cyberjunky/home-assistant-custom-components

Hi @brefra, awesome development!
Since it is needed to python setup.py install I assume this doesn’t run on hass.io?

@Devastator, is it possible to publish the code as-is? Maybe the community can “polish” it?

@JeeCee, It will run on hass.io

I have made good progress to write a native “plugwise stick” integration which:

  • has new config flow to easy setup
  • only the connection string to the stick is required
  • discovers all linked nodes automatically
  • an optimal update frequency is automatically setup
  • shows the zigbee network details

Just have to do some more testing…but it’s getting close to summit to homeassistant code base.
A sneak preview:

image

image

image

image

3 Likes

Looks great! Can’t wait until its published!
Can you please give me a pointer on how to install the version you referred to earlier, I can’t use python setup.py. Thanks!

Readme was wrong, I have updated now. I’ve published the library to pip so you can install the lib it using command:

pip install python-plugwise

I still have to do some bug fixing and code cleanup for the integration part at HA. As soon as it’s stable enough I’ll try to publish it as custom component so you can give it a try. Final goal is to get it as a native integration as part of HA.

2 Likes

Thanks, but also pip is not found.
Are you using hass.io or hassbian?

Wonderful work, can’t wait to try it out! Please keep us posted and if you need any testers, let us know.

People who want to do some early (beta) testing => Copy the contents of this zip file to your custom_components folder of your HA instance.

1 Like

Oeh play-time :slight_smile:

Almost worked out of the box/zip. At first I wondered what ‘Connection string’ could refer to during integration setup. Only variable to be known to me here was the serial port, so indeed it needed /dev/ttyUSB0 here. I suggest just asking for ‘port’ or ‘serial port’ and maybe pre-fill the field with /dev/ttyUSB0, which would be most common, if possible.

Had to remove previous plugwise references from configuration.yaml, probably to make the serial port available for this integration. All I got was a connection failed at first.

Some initial data seems to have come in, it even found my Stealth (which is not much more than a Circle in a different enclosure). For most plugs I only have 1 or 2 initial data points in the last 20 minutes, which suggests it has trouble retrieving data I guess. In home-assistant.log I see many warnings, for example:

2020-03-28 15:45:23 WARNING (send_messages_deamon) [plugwise] Resend NodePingRequest for 000D6F00004EEB0A (b'0196') because stick did not acknowledged send request
2020-03-28 15:45:24 WARNING (send_messages_deamon) [plugwise] Resend CirclePowerUsageRequest for 000D6F00004EEB0A (b'0196') because stick did not acknowledged send request

this happened for all Circles, also Circle+.

Figured I’d set the logging to debug, restart HA and try again. This time all seemed to work and am still getting data points for most devices. Will test some more and report back later.

2 Likes

It looks like it only works for a few minutes after starting HA and initializing the Stick. Within those minutes I see data being gathered from the stick without issue for all my Circles and Stealths like this:

2020-03-28 16:12:59 DEBUG (MainThread) [plugwise] Open USB serial connection to Plugwise Zigbee stick
2020-03-28 16:12:59 DEBUG (MainThread) [plugwise] start serial port
2020-03-28 16:12:59 DEBUG (MainThread) [plugwise] Serial port initialized
2020-03-28 16:12:59 DEBUG (MainThread) [plugwise] Send init request to Plugwise Zigbee stick
2020-03-28 16:12:59 DEBUG (write_packets_process) [plugwise] Sending StickInitRequest to plugwise stick (b'\x05\x05\x03\x03000AB43C\r\n')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Feed data: b'\n'
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Feed data: b'\x05\x05\x03\x030000099900'
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Parse data: b'\n\x05\x05\x03\x030000099900' 
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\n\x05\x05\x03\x030000099900')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Valid message header found at index 1
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000099900')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] No valid message footer found yet
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Feed data: b'C'
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Parse data: b'\x05\x05\x03\x030000099900C' 
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x05\x03\x030000099900C')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Valid message header found at index 0
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000099900C')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] No valid message footer found yet
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Feed data: b'19FEE\r\n\x05\x05\x03\x0300110999000D6F000258842E0101220D6F0002588DB0DD22FF01C9\r\n\x83'
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Parse data: b'\x05\x05\x03\x030000099900C19FEE\r\n\x05\x05\x03\x0300110999000D6F000258842E0101220D6F0002588DB0DD22FF01C9\r\n\x83' 
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x05\x03\x030000099900C19FEE\r\n\x05\x05\x03\x0300110999000D6F000258842E0101220D6F0002588DB0DD22FF01C9\r\n\x83')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Valid message header found at index 0
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000099900C19FEE\r\n\x05\x05\x03\x0300110999000D6F000258842E0101220D6F0002588DB0DD22FF01C9\r\n\x83')
2020-03-28 16:12:59 DEBUG (Thread-2) [plugwise] Valid message footer found at index 20

But after some happy data gathering, it all grinds to a halt here:

2020-03-28 16:15:22 DEBUG (send_messages_deamon) [plugwise] send CirclePowerUsageRequest to 000D6F000076CAB4 using seq_id b'0B28'
2020-03-28 16:15:22 DEBUG (write_packets_process) [plugwise] Sending CirclePowerUsageRequest to plugwise stick (b'\x05\x05\x03\x030012000D6F000076CAB4EE24\r\n')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Feed data: b'\x05'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Feed data: b'\x05\x03\x0300000B2800C13953\r\n\x83'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Parse data: b'\x05\x05\x03\x0300000B2800C13953\r\n\x83' 
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x05\x03\x0300000B2800C13953\r\n\x83')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Valid message header found at index 0
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x0300000B2800C13953\r\n\x83')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Valid message footer found at index 20
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Success acknowledge on message request with sequence id b'0B28'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Reset parser : b'000B2800C13953\r\n\x83'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Parse data: b'000B2800C13953\r\n\x83' 
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'000B2800C13953\r\n\x83')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] No valid message header found yet
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Feed data: b'\x05'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Parse data: b'000B2800C13953\r\n\x83\x05' 
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'000B2800C13953\r\n\x83\x05')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] No valid message header found yet
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Feed data: b'\x05\x03\x0300130B28000D6F000076CAB40000FFFF00000000FFFFFFBA000B166C\r\n'
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Parse data: b'000B2800C13953\r\n\x83\x05\x05\x03\x0300130B28000D6F000076CAB40000FFFF00000000FFFFFFBA000B166C\r\n' 
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'000B2800C13953\r\n\x83\x05\x05\x03\x0300130B28000D6F000076CAB40000FFFF00000000FFFFFFBA000B166C\r\n')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Valid message header found at index 17
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x0300130B28000D6F000076CAB40000FFFF00000000FFFFFFBA000B166C\r\n')
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Valid message footer found at index 60
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] New CirclePowerUsageResponse message with seq id b'0B28' for 000D6F000076CAB4
2020-03-28 16:15:22 DEBUG (Thread-2) [plugwise] Last update 2020-03-28 16:15:22.199340 of node 000D6F000076CAB4, last message 2020-03-28 16:15:22.363516
2020-03-28 16:15:22 DEBUG (send_messages_deamon) [plugwise] send NodePingRequest to 000D6F00004EEB0A using seq_id b'0B29'
2020-03-28 16:15:22 DEBUG (write_packets_process) [plugwise] Sending NodePingRequest to plugwise stick (b'\x05\x05\x03\x03000D000D6F00004EEB0A252A\r\n')
2020-03-28 16:15:23 WARNING (send_messages_deamon) [plugwise] Resend NodePingRequest for 000D6F00004EEB0A (b'0B29') because stick did not acknowledged send request
2020-03-28 16:15:23 DEBUG (send_messages_deamon) [plugwise] send CirclePowerUsageRequest to 000D6F00004EEB0A using seq_id b'0B29'
2020-03-28 16:15:23 DEBUG (write_packets_process) [plugwise] Sending CirclePowerUsageRequest to plugwise stick (b'\x05\x05\x03\x030012000D6F00004EEB0AED50\r\n')
2020-03-28 16:15:24 WARNING (send_messages_deamon) [plugwise] Resend CirclePowerUsageRequest for 000D6F00004EEB0A (b'0B29') because stick did not acknowledged send request
2020-03-28 16:15:24 DEBUG (send_messages_deamon) [plugwise] send NodePingRequest to 000D6F000416BA68 using seq_id b'0B29'
2020-03-28 16:15:24 DEBUG (write_packets_process) [plugwise] Sending NodePingRequest to plugwise stick (b'\x05\x05\x03\x03000D000D6F000416BA6819DC\r\n')
2020-03-28 16:15:26 WARNING (send_messages_deamon) [plugwise] Resend NodePingRequest for 000D6F000416BA68 (b'0B29') because stick did not acknowledged send request
2020-03-28 16:15:26 DEBUG (send_messages_deamon) [plugwise] send CirclePowerUsageRequest to 000D6F000416BA68 using seq_id b'0B29'
2020-03-28 16:15:26 DEBUG (write_packets_process) [plugwise] Sending CirclePowerUsageRequest to plugwise stick (b'\x05\x05\x03\x030012000D6F000416BA68D1A6\r\n')
2020-03-28 16:15:27 WARNING (send_messages_deamon) [plugwise] Resend CirclePowerUsageRequest for 000D6F000416BA68 (b'0B29') because stick did not acknowledged send request
2020-03-28 16:15:27 DEBUG (send_messages_deamon) [plugwise] send NodePingRequest to 000D6F000046A0B1 using seq_id b'0B29'
2020-03-28 16:15:27 DEBUG (write_packets_process) [plugwise] Sending NodePingRequest to plugwise stick (b'\x05\x05\x03\x03000D000D6F000046A0B1BA4B\r\n')
2020-03-28 16:15:28 WARNING (send_messages_deamon) [plugwise] Resend NodePingRequest for 000D6F000046A0B1 (b'0B29') because stick did not acknowledged send request
2020-03-28 16:15:28 DEBUG (send_messages_deamon) [plugwise] send CirclePowerUsageRequest to 000D6F000046A0B1 using seq_id b'0B29'
2020-03-28 16:15:28 DEBUG (write_packets_process) [plugwise] Sending CirclePowerUsageRequest to plugwise stick (b'\x05\x05\x03\x030012000D6F000046A0B17231\r\n')
2020-03-28 16:15:29 WARNING (send_messages_deamon) [plugwise] Resend CirclePowerUsageRequest for 000D6F000046A0B1 (b'0B29') because stick did not acknowledged send request

and does not seem to recover until I restart HA again.

EDIT: interesting detail, this was all in a USB2 port on my Pi4. If I try a USB3 port, it never comes this far and stalls on the initialization part.

It looks like the processing of the power use message fails when invalid poweruse is reported back and after that the receiving thread dies.
I tried to quick fix this in release 0.4.

Please update the requirement versie to 0.4 at the manifest.json file inside the custom_component folder like below:

"requirements": ["python-plugwise==0.4"]

1 Like

Works like a charm, been humming along nicely now for the past 10 minutes. :+1:

Hi,

Just FYI, @CoMPaTech and me, @bouwew, are working on a HA custom_component that supports the “new” Plugs, via the Adam HA.
Any suggestion on how we should name these new Plugs so they can be distinguished from the “old” Plug: the Circles and the Stealth’s?

Or, maybe the title of this topic can be changed to “Plugwise legacy Plugs component”?

(I have a number of these old units lying around collecting dust, several Sticks as well, anyone interested?)

@brefra thank you for this plugin!
i just got started with hass, so it took some time to get it running, but after a reboot or 2 it started working, and automatically showed my plugs, very cool indeed.

i have a couple of circles i only use for monitoring power, and which i don’t want to toggle accidentally, so i’ve disabled the switch part of those devices.
when looking at the logs later, i noticed a warning message about the disabled switches.

2020-03-29 12:50:00 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.circle_ecf19 is incorrectly being triggered for updates while it is disabled. This is a bug in the plugwise_stick integration.
2020-03-29 12:50:53 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.circle_ef08e is incorrectly being triggered for updates while it is disabled. This is a bug in the plugwise_stick integration.
2020-03-29 12:51:48 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.circle_ba0ae is incorrectly being triggered for updates while it is disabled. This is a bug in the plugwise_stick integration.
2020-03-29 12:58:07 WARNING (MainThread) [homeassistant.helpers.entity] Entity switch.circle_bc4ff is incorrectly being triggered for updates while it is disabled. This is a bug in the plugwise_stick integration.

doesn’t seem to be a big problem, but thought i would mention it here :smiley:

I love to see my Plugwise stick integration is usable :slight_smile:

To anyone who is interested I just have updated the library and the required custom component files.

Besides some code fixes and cleanups, this release corrects the power consumption calculation of historic power use (last hour, today & yesterday). It also adds the power production messurement of Circle plugs.

@koter84, I’ll have a look into the warning messages.

@bouwew, we must indeed make a clear distinction between the old and new Plugwise products. I’ve called my integration plugwise_stick to “link” the name to the required (legacy) USB stick. I intend to emphasize this in the linked documentation when I do the final pull request to append this integration to HA core.

@brefra, thanks!
Would it be an idea to link to each others topics?
Our topic is here: Plugwise Smile custom_component (BETA)

@brefra I updated to your latest release, but it seems this broke the integration. All my modules are now offline and no data is coming in anymore. Also tried removing and re-adding through integrations, no joy.

The following is all the logging after adding the stick again. After this nothing happens anymore:

2020-04-05 21:12:58 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for plugwise_stick which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Open USB serial connection to Plugwise Zigbee stick
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] start serial port
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Serial port initialized
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Send init request to Plugwise Zigbee stick
2020-04-05 21:13:29 INFO (MainThread) [homeassistant.setup] Setting up plugwise_stick
2020-04-05 21:13:29 DEBUG (write_packets_process) [plugwise] Sending StickInitRequest to plugwise stick (b'\x05\x05\x03\x03000AB43C\r\n')
2020-04-05 21:13:29 INFO (MainThread) [homeassistant.setup] Setup of domain plugwise_stick took 0.0 seconds.
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Open USB serial connection to Plugwise Zigbee stick
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] start serial port
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Serial port initialized
2020-04-05 21:13:29 DEBUG (MainThread) [plugwise] Send init request to Plugwise Zigbee stick
2020-04-05 21:13:29 DEBUG (write_packets_process) [plugwise] Sending StickInitRequest to plugwise stick (b'\x05\x05\x03\x03000AB43C\r\n')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:29 DEBUG (Thread-4) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Feed data: b'\x03\x030000000100C1FEED\r\n\x05\x05\x03\x0300110001000D6F000258842E0101220D6F0002588DB0DD22FF28C9\r\n\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Parse data: b'\x05\x03\x030000000100C1FEED\r\n\x05\x05\x03\x0300110001000D6F000258842E0101220D6F0002588DB0DD22FF28C9\r\n\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83' 
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x03\x030000000100C1FEED\r\n\x05\x05\x03\x0300110001000D6F000258842E0101220D6F0002588DB0DD22FF28C9\r\n\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message header found at index 21
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x0300110001000D6F000258842E0101220D6F0002588DB0DD22FF28C9\r\n\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message footer found at index 58
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] New StickInitResponse message with seq id b'0001' for 000D6F000258842E
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Reset parser : b'\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Parse data: b'\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83' 
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x83\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message header found at index 1
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Success acknowledge on message request with sequence id b'0002'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Reset parser : b'00000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Parse data: b'00000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83' 
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000200C1103F\r\n\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message header found at index 16
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x0300110002000D6F000258842E0101220D6F0002588DB0DD22FF9757\r\n\x83')
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Valid message footer found at index 58
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] New StickInitResponse message with seq id b'0002' for 000D6F000258842E
2020-04-05 21:13:29 ERROR (Thread-5) [plugwise] Error while processing StickInitResponse message : b'0002'
2020-04-05 21:13:29 DEBUG (Thread-5) [plugwise] Reset parser : b'\x83'
2020-04-05 21:13:30 DEBUG (send_messages_deamon) [plugwise] send NodeInfoRequest to 000D6F0002588DB0 using seq_id b'0003'
2020-04-05 21:13:30 DEBUG (write_packets_process) [plugwise] Sending NodeInfoRequest to plugwise stick (b'\x05\x05\x03\x030023000D6F0002588DB02DA1\r\n')
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:30 DEBUG (Thread-4) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Feed data: b'\x03\x030000000300C1BA6E\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000300E110C8\r\n\x83'
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Parse data: b'\x05\x03\x030000000300C1BA6E\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000300E110C8\r\n\x83' 
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x03\x030000000300C1BA6E\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000300E110C8\r\n\x83')
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Valid message header found at index 130
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000300E110C8\r\n\x83')
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Timeout acknowledge on message request with sequence id b'0003'
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] NodeInfoResponse request with seq id b'0003' processed
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Network time out received for (1 of 3) of NodeInfoRequest to 000D6F0002588DB0, resend request
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Reset parser : b'00000300E110C8\r\n\x83'
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Parse data: b'00000300E110C8\r\n\x83' 
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000300E110C8\r\n\x83')
2020-04-05 21:13:30 DEBUG (Thread-5) [plugwise] No valid message header found yet
2020-04-05 21:13:39 DEBUG (receive_timeout_deamon) [plugwise] Timeout expired for message with sequence ID b'0000'
2020-04-05 21:13:39 DEBUG (receive_timeout_deamon) [plugwise] Resend request StickInitRequest
2020-04-05 21:13:39 DEBUG (write_packets_process) [plugwise] Sending StickInitRequest to plugwise stick (b'\x05\x05\x03\x03000AB43C\r\n')
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:39 DEBUG (Thread-5) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Feed data: b'\x03\x030000000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83'
2020-04-05 21:13:39 DEBUG (Thread-5) [plugwise] Parse data: b'00000300E110C8\r\n\x83\x05' 
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Parse data: b'\x05\x05\x05\x03\x030000000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83' 
2020-04-05 21:13:39 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000300E110C8\r\n\x83\x05')
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x05\x05\x03\x030000000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83')
2020-04-05 21:13:39 DEBUG (Thread-5) [plugwise] No valid message header found yet
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Valid message header found at index 1
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83')
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Success acknowledge on message request with sequence id b'0004'
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Reset parser : b'00000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83'
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Parse data: b'00000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83' 
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000400C1DDBA\r\n\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83')
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Valid message header found at index 16
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x0300110004000D6F000258842E0101220D6F0002588DB0DD22FFF84A\r\n\x83')
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Valid message footer found at index 58
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] New StickInitResponse message with seq id b'0004' for 000D6F000258842E
2020-04-05 21:13:39 DEBUG (Thread-4) [plugwise] Reset parser : b'\x83'
2020-04-05 21:13:39 DEBUG (send_messages_deamon) [plugwise] send NodeInfoRequest to 000D6F0002588DB0 using seq_id b'0005'
2020-04-05 21:13:39 DEBUG (write_packets_process) [plugwise] Sending NodeInfoRequest to plugwise stick (b'\x05\x05\x03\x030023000D6F0002588DB02DA1\r\n')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Parse data: b'00000300E110C8\r\n\x83\x05\x05' 
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000300E110C8\r\n\x83\x05\x05')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] No valid message header found yet
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Feed data: b'\x05\x03\x030000000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Parse data: b'00000300E110C8\r\n\x83\x05\x05\x05\x03\x030000000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83' 
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000300E110C8\r\n\x83\x05\x05\x05\x03\x030000000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Valid message header found at index 18
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Success acknowledge on message request with sequence id b'0005'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Reset parser : b'00000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Parse data: b'00000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83' 
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000500C177EB\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000500E1DD4D\r\n\x83')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Valid message header found at index 125
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000500E1DD4D\r\n\x83')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Timeout acknowledge on message request with sequence id b'0005'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Reset parser : b'00000500E1DD4D\r\n\x83'
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Parse data: b'00000500E1DD4D\r\n\x83' 
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000500E1DD4D\r\n\x83')
2020-04-05 21:13:40 DEBUG (Thread-5) [plugwise] No valid message header found yet
2020-04-05 21:13:41 WARNING (send_messages_deamon) [plugwise] Resend NodeInfoRequest for 000D6F0002588DB0 because stick did not acknowledge request (b'0005')
2020-04-05 21:13:41 DEBUG (send_messages_deamon) [plugwise] send NodeInfoRequest to 000D6F0002588DB0 using seq_id b'0005'
2020-04-05 21:13:41 DEBUG (send_messages_deamon) [plugwise] Retry 1 for message NodeInfoRequest to 000D6F0002588DB0
2020-04-05 21:13:41 DEBUG (write_packets_process) [plugwise] Sending NodeInfoRequest to plugwise stick (b'\x05\x05\x03\x030023000D6F0002588DB02DA1\r\n')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Feed data: b'\x05\x03\x030000000600C19939\r\n# APSRequestNodeInf'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Parse data: b'\x05\x05\x03\x030000000600C19939\r\n# APSRequestNodeInf' 
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'\x05\x05\x03\x030000000600C19939\r\n# APSRequestNodeInf')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Valid message header found at index 0
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000600C19939\r\n# APSRequestNodeInf')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Success acknowledge on message request with sequence id b'0006'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Reset parser : b'00000600C19939\r\n# APSRequestNodeInf'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Parse data: b'00000600C19939\r\n# APSRequestNodeInf' 
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600C19939\r\n# APSRequestNodeInf')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] No valid message header found yet
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Feed data: b'o'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Parse data: b'00000600C19939\r\n# APSRequestNodeInfo' 
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600C19939\r\n# APSRequestNodeInfo')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] No valid message header found yet
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Feed data: b': Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000600E1339F\r\n\x83'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Parse data: b'00000600C19939\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000600E1339F\r\n\x83' 
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600C19939\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000600E1339F\r\n\x83')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Valid message header found at index 125
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000600E1339F\r\n\x83')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Timeout acknowledge on message request with sequence id b'0006'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Reset parser : b'00000600E1339F\r\n\x83'
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Parse data: b'00000600E1339F\r\n\x83' 
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600E1339F\r\n\x83')
2020-04-05 21:13:41 DEBUG (Thread-4) [plugwise] No valid message header found yet
2020-04-05 21:13:42 WARNING (send_messages_deamon) [plugwise] Resend NodeInfoRequest for 000D6F0002588DB0 because stick did not acknowledge request (b'0005')
2020-04-05 21:13:42 DEBUG (send_messages_deamon) [plugwise] send NodeInfoRequest to 000D6F0002588DB0 using seq_id b'0007'
2020-04-05 21:13:42 DEBUG (send_messages_deamon) [plugwise] Retry 2 for message NodeInfoRequest to 000D6F0002588DB0
2020-04-05 21:13:42 DEBUG (write_packets_process) [plugwise] Sending NodeInfoRequest to plugwise stick (b'\x05\x05\x03\x030023000D6F0002588DB02DA1\r\n')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Feed data: b'\x05'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Parse data: b'00000600E1339F\r\n\x83\x05' 
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600E1339F\r\n\x83\x05')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] No valid message header found yet
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Feed data: b'\x05\x03\x030000000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Parse data: b'00000600E1339F\r\n\x83\x05\x05\x03\x030000000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83' 
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000600E1339F\r\n\x83\x05\x05\x03\x030000000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Valid message header found at index 17
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Success acknowledge on message request with sequence id b'0007'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Reset parser : b'00000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Parse data: b'00000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83' 
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000700C13368\r\n# APSRequestNodeInfo: Source MAC: 000D6F000258842E# APSRequestNodeInfo: Destination MAC: \r\n000D6F0002588DB0\r\n\x05\x05\x03\x030000000700E199CE\r\n\x83')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Valid message header found at index 125
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message footer (b'\r\n') in (b'\x05\x05\x03\x030000000700E199CE\r\n\x83')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Valid message footer found at index 20
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Timeout acknowledge on message request with sequence id b'0007'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] NodeInfoResponse request with seq id b'0007' processed
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Network time out received for (3 of 3) of NodeInfoRequest to 000D6F0002588DB0, resend request
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Reset parser : b'00000700E199CE\r\n\x83'
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Parse data: b'00000700E199CE\r\n\x83' 
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] Lookup message header (b'\x05\x05\x03\x03') in (b'00000700E199CE\r\n\x83')
2020-04-05 21:13:42 DEBUG (Thread-4) [plugwise] No valid message header found yet