ZWave Status

From MiOS
(Difference between revisions)
Jump to: navigation, search
(New page: You can see the status of the Z-Wave network and all devices with the data request zwave_status. See: Data_Provider_Catalog_Plugin and Data_Provider_Catalog_Plugin_Requests http:...)
 
m
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
You can see the status of the Z-Wave network and all devices with the data request zwave_status. See: [[Data_Provider_Catalog_Plugin]] and [[Data_Provider_Catalog_Plugin_Requests]]
+
[[Category:Development]]
 +
You can see the status of the Z-Wave network and all devices with the data request '''zwave_status'''. See: [[Data Provider Catalog Plugin]] and [[Data Provider Catalog Plugin Requests]]  
  
http://192.168.81.1:3451/data_request?id=zwave_status
+
http://192.168.81.1:3451/data_request?id=zwave_status returns something like this (note: add &output_format=json to the URL to get the same data in JSON format):
 +
 
 +
1 2 Waiting for controller<br> 11 0 0 5 1 0 <br> 12 0 0 5 1 0 <br> 13 FAILED 0 1 5 5 0 <br> 14 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0 <br> 15 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0 <br> 16 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0 <br> 17 0 0 5 1 0 <br>
 +
 
 +
The format is like this. The first line has:<br> ZWaveNetworkStatus [tab] JobStatus_TransferJobs [tab] Text description for transfer jobs.
 +
 
 +
The network status is this:<br>
 +
 
 +
enum ZWaveStatus // Make the enumerator public<br>
 +
 
 +
        {
 +
 +
          zws_NotSet=0,
 +
 +
          zws_OK=1,
 +
 +
          zws_Quiting=2,
 +
 +
            zws_WaitingToQuit=3,
 +
 +
          zws_NoDongle=4,
 +
 +
          zws_Configuring=5,  // Still running init/configure scripts
 +
 +
          zws_Failure=6
 +
 +
      };
 +
 +
 
 +
The network status is 1 (OK) then you don't need to warn the user to wait. If it is anything other than 1, you can display a 'wait' icon and some text like:<br> ZWaveStatus[0]="Please wait for the Z-Wave network"; #zws_NotSet<br> ZWaveStatus[2]="The Z-Wave network is being reset"<br> ZWaveStatus[3]="Waiting to reset the Z-Wave network"<br> ZWaveStatus[4]="The Z-Wave dongle has been removed"<br> ZWaveStatus[5]="Configuring Z-Wave devices"<br> ZWaveStatus[6]="The Z-Wave network is not functioning"<br>
 +
 
 +
*NOTE: If you do not get a response to the data request (i.e. if the poll fails), then that means the Z-Wave software module is busy resetting itself, which happens periodically when devices change. Just try the request again.
 +
 
 +
The rest of the lines in the result look like this:
 +
 
 +
5 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0
 +
 
 +
and have this format:<br> PK_Device State Status Configured(0/1) LastContactFailed(0/1) ConfigStatus DescriptionOfConfigStatus PollStatus DescriptionOfPollStatus NumOfActiveJobs Job#1 Job#2 Job#3 etc.
 +
 
 +
All are separated by tabs. The ConfigStatus and PollStatus have this:
 +
 
 +
enum ZWaveJobStatus<br> {<br>
 +
 
 +
  ejs_NoJob=1,
 +
 +
  ejs_WaitingToStart=2,
 +
 +
  ejs_Running=3,
 +
 +
  ejs_JobSuccessful=4,
 +
 +
  ejs_JobFailed=5
 +
 +
 
 +
};
 +
 
 +
The Job#1/2/3/etc. have this format:
 +
 
 +
icon_name,JobStatus,DescriptionOfJobStatus
 +
 
 +
so a job could look like this:<br> ON,3,Waiting for reply
 +
 
 +
In our UI, ConfigStatus, PollStatus, and each JobStatus will be an icon in the 'device info box'. If the status is ejs_NoJob=1, then that means don't show an icon. If it is &gt;1, then you will show the icon. Here are the icons:<br>
 +
 
 +
CONFIG, POLL, ON, OFF, LEVEL, MISC
 +
 
 +
The first 2 icons correspond to ConfigStatus and PollStatus. The other 4 are possible icon_name's in JobStatus. Each job can have 4 possible states:
 +
 
 +
{
 +
 
 +
  ejs_WaitingToStart=2, (gray)
 +
 +
  ejs_Running=3, (blue)
 +
 +
  ejs_JobSuccessful=4, (green)
 +
 +
  ejs_JobFailed=5, (red)
 +
 
 +
};
 +
 
 +
So, you've got 24 different icons: 6 types (CONFIG, POLL, ON, OFF, LEVEL, MISC) and each one has 4 possible states. Daniel will do the icons. For now, just create 24 solid squares with the gray/blue/green/red. I propose icon names of:
 +
 
 +
CONFIG_3.gif (config icon, blue)<br> LEVEL_2.gif (level icon, gray)<br> etc.<br>

Latest revision as of 21:45, 17 April 2010

You can see the status of the Z-Wave network and all devices with the data request zwave_status. See: Data Provider Catalog Plugin and Data Provider Catalog Plugin Requests

http://192.168.81.1:3451/data_request?id=zwave_status returns something like this (note: add &output_format=json to the URL to get the same data in JSON format):

1 2 Waiting for controller
11 0 0 5 1 0
12 0 0 5 1 0
13 FAILED 0 1 5 5 0
14 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0
15 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0
16 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0
17 0 0 5 1 0

The format is like this. The first line has:
ZWaveNetworkStatus [tab] JobStatus_TransferJobs [tab] Text description for transfer jobs.

The network status is this:

enum ZWaveStatus // Make the enumerator public

       {

          zws_NotSet=0,

          zws_OK=1,

          zws_Quiting=2,

           zws_WaitingToQuit=3,

          zws_NoDongle=4,

          zws_Configuring=5,  // Still running init/configure scripts

          zws_Failure=6

      };

The network status is 1 (OK) then you don't need to warn the user to wait. If it is anything other than 1, you can display a 'wait' icon and some text like:
ZWaveStatus[0]="Please wait for the Z-Wave network"; #zws_NotSet
ZWaveStatus[2]="The Z-Wave network is being reset"
ZWaveStatus[3]="Waiting to reset the Z-Wave network"
ZWaveStatus[4]="The Z-Wave dongle has been removed"
ZWaveStatus[5]="Configuring Z-Wave devices"
ZWaveStatus[6]="The Z-Wave network is not functioning"

  • NOTE: If you do not get a response to the data request (i.e. if the poll fails), then that means the Z-Wave software module is busy resetting itself, which happens periodically when devices change. Just try the request again.

The rest of the lines in the result look like this:

5 FAILED 0 1 5 5 Job ending in error: Failed with TXStatus: 1 0

and have this format:
PK_Device State Status Configured(0/1) LastContactFailed(0/1) ConfigStatus DescriptionOfConfigStatus PollStatus DescriptionOfPollStatus NumOfActiveJobs Job#1 Job#2 Job#3 etc.

All are separated by tabs. The ConfigStatus and PollStatus have this:

enum ZWaveJobStatus
{

  ejs_NoJob=1,

  ejs_WaitingToStart=2,

  ejs_Running=3,

  ejs_JobSuccessful=4,

  ejs_JobFailed=5

};

The Job#1/2/3/etc. have this format:

icon_name,JobStatus,DescriptionOfJobStatus

so a job could look like this:
ON,3,Waiting for reply

In our UI, ConfigStatus, PollStatus, and each JobStatus will be an icon in the 'device info box'. If the status is ejs_NoJob=1, then that means don't show an icon. If it is >1, then you will show the icon. Here are the icons:

CONFIG, POLL, ON, OFF, LEVEL, MISC

The first 2 icons correspond to ConfigStatus and PollStatus. The other 4 are possible icon_name's in JobStatus. Each job can have 4 possible states:

{

  ejs_WaitingToStart=2, (gray)

  ejs_Running=3, (blue)

  ejs_JobSuccessful=4, (green)

  ejs_JobFailed=5, (red)

};

So, you've got 24 different icons: 6 types (CONFIG, POLL, ON, OFF, LEVEL, MISC) and each one has 4 possible states. Daniel will do the icons. For now, just create 24 solid squares with the gray/blue/green/red. I propose icon names of:

CONFIG_3.gif (config icon, blue)
LEVEL_2.gif (level icon, gray)
etc.

Personal tools