diff --git a/usermods/BH1750_v2/usermod_bh1750.h b/usermods/BH1750_v2/usermod_bh1750.h index 0cb4bf1890..1903240fc3 100644 --- a/usermods/BH1750_v2/usermod_bh1750.h +++ b/usermods/BH1750_v2/usermod_bh1750.h @@ -118,8 +118,8 @@ class Usermod_BH1750 : public Usermod JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device device[F("name")] = serverDescription; device[F("identifiers")] = "wled-sensor-" + String(mqttClientID); - device[F("manufacturer")] = F("WLED"); - device[F("model")] = F("FOSS"); + device[F("manufacturer")] = F(WLED_BRAND); //WLEDMM + Moustachauve/Wled-Native + device[F("model")] = F(WLED_PRODUCT_NAME); //WLEDMM + Moustachauve/Wled-Native device[F("sw_version")] = versionString; String temp; diff --git a/usermods/BME280_v2/usermod_bme280.h b/usermods/BME280_v2/usermod_bme280.h index 3b9c80ec20..6fe5dba929 100644 --- a/usermods/BME280_v2/usermod_bme280.h +++ b/usermods/BME280_v2/usermod_bme280.h @@ -163,8 +163,8 @@ class UsermodBME280 : public Usermod JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device device[F("name")] = serverDescription; device[F("identifiers")] = "wled-sensor-" + String(mqttClientID); - device[F("manufacturer")] = F("WLED"); - device[F("model")] = F("FOSS"); + device[F("manufacturer")] = F(WLED_BRAND); //WLEDMM + Moustachauve/Wled-Native + device[F("model")] = F(WLED_PRODUCT_NAME); //WLEDMM + Moustachauve/Wled-Native device[F("sw_version")] = versionString; String temp; diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h index 288edb32d9..3d69c2082c 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h @@ -189,8 +189,8 @@ class PIRsensorSwitch : public Usermod JsonObject device = doc.createNestedObject(F("device")); // attach the sensor to the same device device[F("name")] = serverDescription; device[F("ids")] = String(F("wled-sensor-")) + mqttClientID; - device[F("mf")] = "WLED"; - device[F("mdl")] = F("FOSS"); + device[F("mf")] = F(WLED_BRAND); //WLEDMM + Moustachauve/Wled-Native + device[F("mdl")] = F(WLED_PRODUCT_NAME); //WLEDMM + Moustachauve/Wled-Native device[F("sw")] = versionString; sprintf_P(buf, PSTR("homeassistant/binary_sensor/%s/config"), uid); diff --git a/wled00/FX.cpp b/wled00/FX.cpp index e9e9e110a5..dc19c502bb 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -8033,7 +8033,7 @@ uint16_t mode_2Doctopus() { } if (true) // WLEDMM SuperSync - SEGENV.step = (strip.now / 25) * (SEGMENT.speed / 32 + 1); // WLEDMM 40fps + SEGENV.step = strip.now * (SEGMENT.speed / 32 + 1) / 25; // WLEDMM 40fps else SEGENV.step += SEGMENT.speed / 32 + 1; // 1-4 range diff --git a/wled00/json.cpp b/wled00/json.cpp index 810c2de696..7499a26ef6 100644 --- a/wled00/json.cpp +++ b/wled00/json.cpp @@ -1093,8 +1093,8 @@ void serializeInfo(JsonObject root) #endif root[F("opt")] = os; - root[F("brand")] = "WLED"; - root[F("product")] = F("FOSS"); + root[F("brand")] = F(WLED_BRAND); //WLEDMM + Moustachauve/Wled-Native + root[F("product")] = F(WLED_PRODUCT_NAME); //WLEDMM + Moustachauve/Wled-Native root["mac"] = escapedMac; char s[16] = ""; if (Network.isConnected()) diff --git a/wled00/wled.h b/wled00/wled.h index fdd2bed3aa..1fb293b3ac 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,25 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2310081 +#define VERSION 2310150 + +//WLEDMM + Moustachauve/Wled-Native +// You can define custom product info from build flags. +// This is useful to allow API consumer to identify what type of WLED version +// they are interacting with. Be aware that changing this might cause some third +// party API consumers to consider this as a non-WLED device since the values +// returned by the API and by MQTT will no longer be default. However, most +// third party only uses mDNS to validate, so this is generally fine to change. +// For example, Home Assistant will still work fine even with this value changed. +// Use like this: +// -D WLED_BRAND="\"Custom Brand\"" +// -D WLED_PRODUCT_NAME="\"Custom Product\"" +#ifndef WLED_BRAND + #define WLED_BRAND "WLED" +#endif +#ifndef WLED_PRODUCT_NAME + #define WLED_PRODUCT_NAME "MoonModules" +#endif //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG