Hauptmenü

Fehler in Color.pm

Begonnen von Zwer2k, 20 September 2015, 01:14:09

Vorheriges Thema - Nächstes Thema

Zwer2k

Hallo,

in Color.pm genauer in der Funktion hsb2rgb gibt es kleinen Fehler mit großer Wirkung  ;) .

hsb2rgb ($$$) {

....

    return ( $h, $s, $bri );
    return ( $r, $g, $b );
}

justme1968

habs repariert.

gruss
  andre
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

justcallmeal

Hallo,

hab hier auch noch 'ne Kleinigkeit gefunden, - auch wenn manch einer das belächeln wird, so hatte ich anfänglich nicht verstanden, was die Meldung

Color::hsv2rgb value our of range [180,1,0.5]. should be in 0..1.

heißen soll. Na klar sollte es hier "out" of range heißen... - was mir erst später klar wurde.
Sorry, wenn ich gleich noch mit  ner "dummen" Frage komme, aber mein Thai-Ginseng ist gerade alle: Kann mir mal jemand auf die Sprünge helfen welcher Wert bei obigem Beispiel zwischen 0 und 1 liegen soll?

VG,
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

justme1968

natürlich der der > 1 ist. also dein h mit 180.

Zitat von: justcallmeal am 22 Dezember 2019, 11:44:56
Hallo,

hab hier auch noch 'ne Kleinigkeit gefunden, - auch wenn manch einer das belächeln wird, so hatte ich anfänglich nicht verstanden, was die Meldung

Color::hsv2rgb value our of range [180,1,0.5]. should be in 0..1.

heißen soll. Na klar sollte es hier "out" of range heißen... - was mir erst später klar wurde.
Sorry, wenn ich gleich noch mit  ner "dummen" Frage komme, aber mein Thai-Ginseng ist gerade alle: Kann mir mal jemand auf die Sprünge helfen welcher Wert bei obigem Beispiel zwischen 0 und 1 liegen soll?

VG,
al
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

justcallmeal

Zitat von: justme1968 am 22 Dezember 2019, 12:17:27
natürlich der der > 1 ist. also dein h mit 180.

hm, stehe da nun ganz auf'm Schlauch...

meine Befehlszeile hierzu lautet...

set shellyRGB_79 hsv 180,1,0.5;; set shellyRGB_79 on

wie sollte ich den Farbwert "cyan" (180) denn anders ausdrücken?

VG,
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

justme1968

#5
da unterschiedliche geräte unterschiedliche bereiche verwenden  (0-100, 0-359, 0-360, 0-65535)  erwartet Color::hsv2rgb die werte im bereich 0..1. auch hsv. d.h. du musst deinen wertebereich auf 0..1 skalieren.

da dies scheinbar in einem modul passiert muss du das dort als fehler melden.

bisdahin kannst du die meldung einfach ignorieren weil die routine als fallback selber durch 359 teilt.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

justcallmeal

Zitat von: justme1968 am 22 Dezember 2019, 16:06:58
da unterschiedliche geräte unterschiedliche bereiche verwenden  (0-100, 0-359, 0-360, 0-65535)  erwartet Color::hsv2rgb die werte im bereich 0..1. auch hsv. d.h. du musst deinen wertebereich auf 0..1 skalieren.

So, habe nun ein wenig herumexperimentiert. Der niedrigste "value" bei einer meiner RGB-Leuchten ist skaliert 0.002. Das funktioniert auch prima
(deutlich sichtbarer Helligkeitsunterschied zwischen 0.01 und 0.005 und 0.002) - trotzdem steht dann die Meldung

Color::hsv2rgb value our of range [180,1,0.002]. should be in 0..1.

im logfile.

Danke für den Support, meine gewünschte Funktion habe ich damit gut hingekriegt; - aber seltsam ist's trotzdem.

vg
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

justme1968

es geht um hue. den ersten wert. der ist bei dir 180. und das ist definitiv nicht im bereich 0..1.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

justcallmeal

Zitat von: justme1968 am 31 Dezember 2019, 09:39:44
es geht um hue. den ersten wert. der ist bei dir 180. und das ist definitiv nicht im bereich 0..1.
Ups, ja, Du hast Recht! da hab ich schneller geschrieben als nachgedacht ;-)
Vielen Dank und guten Rutsch!
al
HM-Sen-DB-PCB, HM-Sec-SCo, HM-MOD-Re-8, HM-SEC-SC-2, HM-Sen-MDIR-O, HM-LC-Sw1PBU-FM, HM-LC-RGBW-WM, HM-ES-PMSw1-SM, HM-LC-Sw1-DR

majestro84

#9
Hallo zusammen

Ich habe eine Frage wie bekomme ich raus welche Lampe bzw. welches Modul für die Meldung verantwortlich ist.
Color::hsv2rgb value out of range [0.718165865568017,1.00393700787402,0.291338582677165]. should be in 0..1.

stacktrace auf 1 hat mir keine weiteren Infos gebracht.
Die Meldung ist seit dem 9.2 im log.

Für einen Tipp wäre ich dankbar.

VG Alex

Nachtrag:
Habe das HUE Modul auf verbose 5 im log sieht es nun so aus.
2020.02.28 10:42:58.083 4: using HttpUtils_NonblockingGet: GET lights
2020.02.28 10:42:58.158 1: Color::hsv2rgb value out of range [0.718165865568017,1.00393700787402,0.291338582677165]. should be in 0..1.


Wie kann ich bei kanpp 20 Hue Lampen einfach rausbekommen welche des Eintrag erzeugt?
Server: Fujitsu ESPRIMO Q920 - aktuellen FHEM-Docker Image:Z-Wave (RollerShutter,DoorWindow,Socket,PIR,....) | ENIGMA2 | EGPM2LAN | BLE-Tag(PRESENCE) | HUE | alexa-fhem | Shelly | MQTT2
1.Pi-Zero:Viessmann(optolink) mit 89_VCONTROL300.pm
2.Pi3 Dongle Server: Zigbee2MQTT(CC1352P-2), Z-Wave(UZB1), BT

eisman

#10
Hi, habe auch das Problem,

im HUE device LEDstrip

2021.10.31 11:05:48 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:05:53 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:05:54 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:03 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:13 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:23 1: Color::hsv2rgb value out of range [0.65626001373312,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:24 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:30 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:33 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:43 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:06:56 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:07:06 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:07:16 1: Color::hsv2rgb value out of range [0.65626001373312,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:09:33 1: Color::hsv2rgb value out of range [0.32813000686656,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:12:45 1: Color::hsv2rgb value out of range [0.273121232928969,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:12:50 1: Color::hsv2rgb value out of range [0.273121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:12:51 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:12:51 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:12:55 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:13:01 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:13:04 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:13:06 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:13:09 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:13:14 1: Color::hsv2rgb value out of range [0.673121232928969,0.996062992125984,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:18 1: Color::hsv2rgb value out of range [0.0117189288166629,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:19 1: Color::hsv2rgb value out of range [0.191622796978714,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:26 1: Color::hsv2rgb value out of range [0.199069199664302,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:27 1: Color::hsv2rgb value out of range [0.199069199664302,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:33 1: Color::hsv2rgb value out of range [0.954116121156634,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:36 1: Color::hsv2rgb value out of range [0.954116121156634,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:43 1: Color::hsv2rgb value out of range [0.753124284733349,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:46 1: Color::hsv2rgb value out of range [0.753124284733349,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:52 1: Color::hsv2rgb value out of range [0.512153810940719,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:17:56 1: Color::hsv2rgb value out of range [0.512153810940719,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:01 1: Color::hsv2rgb value out of range [0.267185473411154,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:06 1: Color::hsv2rgb value out of range [0.267185473411154,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:10 1: Color::hsv2rgb value out of range [0.0581979095140002,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:16 1: Color::hsv2rgb value out of range [0.0581979095140002,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:19 1: Color::hsv2rgb value out of range [0.72129396505684,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:29 1: Color::hsv2rgb value out of range [0.456336308842603,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:30 1: Color::hsv2rgb value out of range [0.456336308842603,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:36 1: Color::hsv2rgb value out of range [0.0114747844663157,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:39 1: Color::hsv2rgb value out of range [0.0114747844663157,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:44 1: Color::hsv2rgb value out of range [0.554634927901122,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:49 1: Color::hsv2rgb value out of range [0.554634927901122,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:52 1: Color::hsv2rgb value out of range [0.0897840848401617,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:18:59 1: Color::hsv2rgb value out of range [0.0897840848401617,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:01 1: Color::hsv2rgb value out of range [0.836835278858625,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:09 1: Color::hsv2rgb value out of range [0.836835278858625,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:11 1: Color::hsv2rgb value out of range [0.70780498970016,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:19 1: Color::hsv2rgb value out of range [0.70780498970016,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:21 1: Color::hsv2rgb value out of range [0.658731975280385,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:32 1: Color::hsv2rgb value out of range [0.589669642175937,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:33 1: Color::hsv2rgb value out of range [0.589669642175937,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:41 1: Color::hsv2rgb value out of range [0.564583810177768,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:42 1: Color::hsv2rgb value out of range [0.564583810177768,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:51 1: Color::hsv2rgb value out of range [0.431555657282368,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:19:52 1: Color::hsv2rgb value out of range [0.431555657282368,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:01 1: Color::hsv2rgb value out of range [0.386480506599527,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:02 1: Color::hsv2rgb value out of range [0.386480506599527,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:11 1: Color::hsv2rgb value out of range [0.317418173495079,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:12 1: Color::hsv2rgb value out of range [0.317418173495079,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:21 1: Color::hsv2rgb value out of range [0.264347295338369,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:22 1: Color::hsv2rgb value out of range [0.264347295338369,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:31 1: Color::hsv2rgb value out of range [0.16729991607538,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:35 1: Color::hsv2rgb value out of range [0.16729991607538,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:41 1: Color::hsv2rgb value out of range [0.0902418554970626,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:45 1: Color::hsv2rgb value out of range [0.0902418554970626,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:51 1: Color::hsv2rgb value out of range [0.0211795223926146,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:20:55 1: Color::hsv2rgb value out of range [0.0211795223926146,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:01 1: Color::hsv2rgb value out of range [0.968123903257801,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:05 1: Color::hsv2rgb value out of range [0.968123903257801,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:11 1: Color::hsv2rgb value out of range [0.875074387731746,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:15 1: Color::hsv2rgb value out of range [0.875074387731746,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:18 1: Color::hsv2rgb value out of range [0.875074387731746,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:21 1: Color::hsv2rgb value out of range [0.0117189288166629,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:25 1: Color::hsv2rgb value out of range [0.0117189288166629,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:21:39 1: Color::hsv2rgb value out of range [0.0117189288166629,0.984251968503937,1.00393700787402]. should be in 0..1.
2021.10.31 11:27:50 1: Color::hsv2rgb value out of range [0.668528267338064,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:27:56 1: Color::hsv2rgb value out of range [0.668528267338064,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:28:04 1: Color::hsv2rgb value out of range [0.668528267338064,1,1.00393700787402]. should be in 0..1.
2021.10.31 11:28:06 1: Color::hsv2rgb value out of range [0.668528267338064,1,1.00393700787402]. should be in 0..1.


gruss
1x FHEM Debian, Homematic,ZigBee,FS20 / 1X Raspberry, ConBee / 5x ESP
1x FHEM Debian, Homematic,ZigBee         / 1X Raspberry, ConBee / 5x ESP
1x FHEM Debian,MQTT                               / 1X Raspberry, i2c,onewire,gpio
1x auf Windows 2012 Hyper-V-S