Fork of the espurna firmware for `mhsw` switches
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
4.8 KiB

  1. //--------------------------------------------------------------------------------
  2. // PROGMEM definitions
  3. //--------------------------------------------------------------------------------
  4. //--------------------------------------------------------------------------------
  5. // Reset reasons
  6. //--------------------------------------------------------------------------------
  7. PROGMEM const char custom_reset_hardware[] = "Hardware button";
  8. PROGMEM const char custom_reset_web[] = "Reboot from web interface";
  9. PROGMEM const char custom_reset_terminal[] = "Reboot from terminal";
  10. PROGMEM const char custom_reset_mqtt[] = "Reboot from MQTT";
  11. PROGMEM const char custom_reset_rpc[] = "Reboot from RPC";
  12. PROGMEM const char custom_reset_ota[] = "Reboot after successful OTA update";
  13. PROGMEM const char custom_reset_http[] = "Reboot from HTTP";
  14. PROGMEM const char custom_reset_nofuss[] = "Reboot after successful NoFUSS update";
  15. PROGMEM const char custom_reset_upgrade[] = "Reboot after successful web update";
  16. PROGMEM const char custom_reset_factory[] = "Factory reset";
  17. PROGMEM const char* const custom_reset_string[] = {
  18. custom_reset_hardware, custom_reset_web, custom_reset_terminal,
  19. custom_reset_mqtt, custom_reset_rpc, custom_reset_ota,
  20. custom_reset_http, custom_reset_nofuss, custom_reset_upgrade,
  21. custom_reset_factory
  22. };
  23. //--------------------------------------------------------------------------------
  24. // Sensors
  25. //--------------------------------------------------------------------------------
  26. #if SENSOR_SUPPORT
  27. PROGMEM const unsigned char magnitude_decimals[] = {
  28. 0,
  29. 1, 0, 2,
  30. 3, 0, 0, 0, 0, 0, 0, 0,
  31. 0, 0, 0,
  32. 0, 0, 0,
  33. 0, 0, 3, 3
  34. };
  35. PROGMEM const char magnitude_unknown_topic[] = "unknown";
  36. PROGMEM const char magnitude_temperature_topic[] = "temperature";
  37. PROGMEM const char magnitude_humidity_topic[] = "humidity";
  38. PROGMEM const char magnitude_pressure_topic[] = "pressure";
  39. PROGMEM const char magnitude_current_topic[] = "current";
  40. PROGMEM const char magnitude_voltage_topic[] = "voltage";
  41. PROGMEM const char magnitude_active_power_topic[] = "power";
  42. PROGMEM const char magnitude_apparent_power_topic[] = "apparent";
  43. PROGMEM const char magnitude_reactive_power_topic[] = "reactive";
  44. PROGMEM const char magnitude_power_factor_topic[] = "factor";
  45. PROGMEM const char magnitude_energy_topic[] = "energy";
  46. PROGMEM const char magnitude_energy_delta_topic[] = "energy_delta";
  47. PROGMEM const char magnitude_analog_topic[] = "analog";
  48. PROGMEM const char magnitude_digital_topic[] = "digital";
  49. PROGMEM const char magnitude_events_topic[] = "events";
  50. PROGMEM const char magnitude_pm1dot0_topic[] = "pm1dot0";
  51. PROGMEM const char magnitude_pm2dot5_topic[] = "pm2dot5";
  52. PROGMEM const char magnitude_pm10_topic[] = "pm10";
  53. PROGMEM const char magnitude_co2_topic[] = "co2";
  54. PROGMEM const char magnitude_lux_topic[] = "lux";
  55. PROGMEM const char magnitude_uv_topic[] = "uv";
  56. PROGMEM const char magnitude_distance_topic[] = "distance";
  57. PROGMEM const char magnitude_hcho_topic[] = "hcho";
  58. PROGMEM const char* const magnitude_topics[] = {
  59. magnitude_unknown_topic, magnitude_temperature_topic, magnitude_humidity_topic,
  60. magnitude_pressure_topic, magnitude_current_topic, magnitude_voltage_topic,
  61. magnitude_active_power_topic, magnitude_apparent_power_topic, magnitude_reactive_power_topic,
  62. magnitude_power_factor_topic, magnitude_energy_topic, magnitude_energy_delta_topic,
  63. magnitude_analog_topic, magnitude_digital_topic, magnitude_events_topic,
  64. magnitude_pm1dot0_topic, magnitude_pm2dot5_topic, magnitude_pm10_topic,
  65. magnitude_co2_topic, magnitude_lux_topic, magnitude_uv_topic,
  66. magnitude_distance_topic, magnitude_hcho_topic
  67. };
  68. PROGMEM const char magnitude_empty[] = "";
  69. PROGMEM const char magnitude_celsius[] = "C";
  70. PROGMEM const char magnitude_fahrenheit[] = "F";
  71. PROGMEM const char magnitude_percentage[] = "%";
  72. PROGMEM const char magnitude_hectopascals[] = "hPa";
  73. PROGMEM const char magnitude_amperes[] = "A";
  74. PROGMEM const char magnitude_volts[] = "V";
  75. PROGMEM const char magnitude_watts[] = "W";
  76. PROGMEM const char magnitude_kw[] = "kW";
  77. PROGMEM const char magnitude_joules[] = "J";
  78. PROGMEM const char magnitude_kwh[] = "kWh";
  79. PROGMEM const char magnitude_ugm3[] = "µg/m3";
  80. PROGMEM const char magnitude_ppm[] = "ppm";
  81. PROGMEM const char magnitude_lux[] = "lux";
  82. PROGMEM const char magnitude_uv[] = "uv";
  83. PROGMEM const char magnitude_distance[] = "m";
  84. PROGMEM const char* const magnitude_units[] = {
  85. magnitude_empty, magnitude_celsius, magnitude_percentage,
  86. magnitude_hectopascals, magnitude_amperes, magnitude_volts,
  87. magnitude_watts, magnitude_watts, magnitude_watts,
  88. magnitude_percentage, magnitude_joules, magnitude_joules,
  89. magnitude_empty, magnitude_empty, magnitude_empty,
  90. magnitude_ugm3, magnitude_ugm3, magnitude_ugm3,
  91. magnitude_ppm, magnitude_lux, magnitude_uv,
  92. magnitude_distance, magnitude_empty
  93. };
  94. #endif