- The stick initialization command actually seems to be a command to verify whether the stick and Circle+ (plugwise stack) are up and running. It will return three values:
- Up (yes/no) (2 bytes boolean 00 = false, everything else = true)
- Extended pan ID (16 bytes)
- Pan ID (4 bytes)
PAN = Personal Area Network, that uniquely identifies the network. Zigbee devices make the decision on what radio networks to join based on their Pan ID.The Pan ID is determined by the Pan coordinator, the ZigBee device which is responsible for starting the formation of a ZigBee network. For as far as I understand, the Circl+ is Pluwise' Pan coordinator. There is only one ZigBee PAN Coordinator in any ZigBee network; it’s ZigBee address is always 0.
- The power information response indeed reports both power usage and production. Please find the returned data below:
- 1s data - 4 bytes
- 8s data - 4 bytes
- Tick-count consumed - 8 bytes
- Tick-count produced - 8 bytes
- Remainder - 8 bytes
- The device information request indeed returns the fields you mentioned, the last field seems to indicate the module type. 01 indicates a regular plug-to-socket module.
- When you send a command to the Plugwise stack, it will produce two responses, the first one is an almost instantanous response from the Zigbee stack (in your document you called this response an acknowledgement). Usually this response is C1, which means Okay. There are other responses as well though. E.g. if you send an invalid command you will receive C2 or C3. The second response is the response from the module you sent the command to, which is not always that instantanous.
This behaviour almost demands a certain threaded programming model. When a command is fired, the process should wait for the response from the Plugwise stack (synchronous) so that it can keep track of the request. It should not wait for the module response though, but should try to receive the module response asynchronously. This allows for commands to be sent off, while waiting for the various module responses (slow) to be received at the same time.
Maarten, perhaps it would be a nice idea to open-source this document, by uploading it to Google docs or something, so that all other experiences with the Plugwise protocol can be added to the document as well.




