ZWave Status

From MiOS
(Difference between revisions)
Jump to: navigation, search
m
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 +
[[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]]  
 
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]]  
  
Line 40: Line 41:
 
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.  
 
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:  
+
All are separated by tabs. The ConfigStatus and PollStatus have this:  
  
 
enum ZWaveJobStatus<br> {<br>  
 
enum ZWaveJobStatus<br> {<br>  
  
    ejs_NoJob=1,
+
  ejs_NoJob=1,
 
   
 
   
 
   ejs_WaitingToStart=2,
 
   ejs_WaitingToStart=2,
Line 67: Line 68:
 
CONFIG, POLL, ON, OFF, LEVEL, MISC  
 
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  
+
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)<br>
+
{
  
    ejs_Running=3, (blue)
+
  ejs_WaitingToStart=2, (gray)
 +
 +
  ejs_Running=3, (blue)
 
   
 
   
 
   ejs_JobSuccessful=4, (green)
 
   ejs_JobSuccessful=4, (green)
 
   
 
   
 
   ejs_JobFailed=5, (red)
 
   ejs_JobFailed=5, (red)
 
  
So, you've got 20 different icons: 5 types (CONFIG, POLL, ON, OFF, LEVEL, MISC) and each one has 4 possible states. Daniel will do the icons. For now, just create 20 solid squares with the gray/blue/green/red. I propose icon names of:  
+
};
 +
 
 +
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>
 
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