Skip to content

Commit

Permalink
Merge pull request Yveaux#6 from aaron832/master
Browse files Browse the repository at this point in the history
Updated to match definitions in MySensors/core/MyMessages.h version 5…
  • Loading branch information
Yveaux committed Feb 1, 2016
2 parents 44c8e50 + a2c0f74 commit 64931ae
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions mqttGateway2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@
V_IMPEDANCE V_ARMED V_TRIPPED V_WATT V_KWH V_SCENE_ON V_SCENE_OFF
V_HEATER V_HEATER_SW V_LIGHT_LEVEL V_VAR1 V_VAR2 V_VAR3 V_VAR4 V_VAR5
V_UP V_DOWN V_STOP V_IR_SEND V_IR_RECEIVE V_FLOW V_VOLUME V_LOCK_STATUS
V_DUST_LEVEL V_VOLTAGE V_CURRENT };
V_DUST_LEVEL V_VOLTAGE V_CURRENT V_RGB V_RGBW V_ID V_UNIT_PREFIX V_HVAC_SETPOINT_COOL
V_HVAC_SETPOINT_HEAT V_HVAC_FLOW_MODE V_TEXT V_CUSTOM V_POSITION V_IR_RECORD };
use constant variableTypesToStr => qw{ V_TEMP V_HUM V_LIGHT V_DIMMER V_PRESSURE V_FORECAST V_RAIN
V_RAINRATE V_WIND V_GUST V_DIRECTION V_UV V_WEIGHT V_DISTANCE
V_IMPEDANCE V_ARMED V_TRIPPED V_WATT V_KWH V_SCENE_ON V_SCENE_OFF
V_HEATER V_HEATER_SW V_LIGHT_LEVEL V_VAR1 V_VAR2 V_VAR3 V_VAR4 V_VAR5
V_UP V_DOWN V_STOP V_IR_SEND V_IR_RECEIVE V_FLOW V_VOLUME V_LOCK_STATUS
V_DUST_LEVEL V_VOLTAGE V_CURRENT };
V_DUST_LEVEL V_VOLTAGE V_CURRENT V_RGB V_RGBW V_ID V_UNIT_PREFIX V_HVAC_SETPOINT_COOL
V_HVAC_SETPOINT_HEAT V_HVAC_FLOW_MODE V_TEXT V_CUSTOM V_POSITION V_IR_RECORD };

sub variableTypeToIdx
{
Expand All @@ -80,21 +82,31 @@ sub variableTypeToIdx
use enum qw { I_BATTERY_LEVEL=0 I_TIME I_VERSION I_ID_REQUEST I_ID_RESPONSE
I_INCLUSION_MODE I_CONFIG I_FIND_PARENT I_FIND_PARENT_RESPONSE
I_LOG_MESSAGE I_CHILDREN I_SKETCH_NAME I_SKETCH_VERSION
I_REBOOT I_GATEWAY_READY };
I_REBOOT I_GATEWAY_READY
I_SIGNING_PRESENTATION
I_NONCE_REQUEST
I_NONCE_RESPONSE
I_HEARTBEAT I_PRESENTATION I_DISCOVER I_DISCOVER_RESPONSE I_HEARTBEAT_RESPONSE };
use constant internalMessageTypesToStr => qw{ I_BATTERY_LEVEL I_TIME I_VERSION I_ID_REQUEST I_ID_RESPONSE
I_INCLUSION_MODE I_CONFIG I_FIND_PARENT I_FIND_PARENT_RESPONSE
I_LOG_MESSAGE I_CHILDREN I_SKETCH_NAME I_SKETCH_VERSION
I_REBOOT I_GATEWAY_READY };
I_REBOOT I_GATEWAY_READY
I_SIGNING_PRESENTATION
I_NONCE_REQUEST
I_NONCE_RESPONSE
I_HEARTBEAT I_PRESENTATION I_DISCOVER I_DISCOVER_RESPONSE I_HEARTBEAT_RESPONSE };

#-- Sensor types
use enum qw { S_DOOR=0 S_MOTION S_SMOKE S_LIGHT S_DIMMER S_COVER S_TEMP S_HUM S_BARO S_WIND
S_RAIN S_UV S_WEIGHT S_POWER S_HEATER S_DISTANCE S_LIGHT_LEVEL S_ARDUINO_NODE
S_ARDUINO_REPEATER_NODE S_LOCK S_IR S_WATER S_AIR_QUALITY S_CUSTOM S_DUST
S_SCENE_CONTROLLER };
S_SCENE_CONTROLLER S_RGB_LIGHT S_RGBW_LIGHT S_COLOR_SENSOR S_HVAC S_MULTIMETER
S_SPRINKLER S_WATER_LEAK S_SOUND S_VIBRATION S_MOISTURE S_INFO S_GAS S_GPS };
use constant sensorTypesToStr => qw{ S_DOOR S_MOTION S_SMOKE S_LIGHT S_DIMMER S_COVER S_TEMP S_HUM S_BARO S_WIND
S_RAIN S_UV S_WEIGHT S_POWER S_HEATER S_DISTANCE S_LIGHT_LEVEL S_ARDUINO_NODE
S_ARDUINO_REPEATER_NODE S_LOCK S_IR S_WATER S_AIR_QUALITY S_CUSTOM S_DUST
S_SCENE_CONTROLLER };
S_SCENE_CONTROLLER S_RGB_LIGHT S_RGBW_LIGHT S_COLOR_SENSOR S_HVAC S_MULTIMETER
S_SPRINKLER S_WATER_LEAK S_SOUND S_VIBRATION S_MOISTURE S_INFO S_GAS S_GPS };

#-- Datastream types
use enum qw { ST_FIRMWARE_CONFIG_REQUEST=0 ST_FIRMWARE_CONFIG_RESPONSE ST_FIRMWARE_REQUEST ST_FIRMWARE_RESPONSE
Expand Down

0 comments on commit 64931ae

Please sign in to comment.