Neue Firmware für HM_LC_Sw1PBU_FM mit getrenntem Aktor, Taster + Wechselschalter

Begonnen von jab, 29 Dezember 2013, 22:04:10

Vorheriges Thema - Nächstes Thema

Samsi

Hallo Jan,

leider lässt sich der Sketch nicht kompilieren:

AskSin.cpp.o: In function `HM::setListFromMsg(unsigned char, unsigned char, unsigned char*, unsigned char const*, unsigned char)':

AskSin.cpp:1625: undefined reference to `pHex(unsigned char const*, unsigned char)'

Grüße
FHEM 5.5 / BBB Debian Wheezy

Homematic CFG-LAN

HM-Sec-MDIR / HM-Sec-SD / HM-Sec-WDS / HM-LC-Sw2-FM / HM-Sec-SC / HM-LC-Sw1PBU-FM / HM-SCI-3-FM / HM-Sec-Key / HM-RC-Key3-B / HM-LC-Dim1TPBU-FM /  HM-CC-RT-DN / HM-PBI-4-FM / HM-RC-Key4-2 / HM-ES-PMSw1-Pl / HM-LC-Sw4-WM

trilu

kannst du leicht fixen - geh in die AskSin.cpp auf die Funktion
HM::setListFromMsg(unsigned char, unsigned char, unsigned char*, unsigned char const*, unsigned char)

such dort drin nach der Zeile mit pHex und kommentier sie aus.
pHex macht nur die Anzeige auf der seriellen Konsole...

Die Zeile die vermutlich Ärger macht fängt mit Serial << ... an

jab

Moin Samsi,

hast du geguckt ob du alle Files ausgecheckt hast? Das ist in der AskSin.h und AskSin.cpp geändert. Da habe ich ein Argument von uint8_t auf const uint8_t geändert. Startest du die Arduino IDE neu wenn du den Code auscheckst? Ansonsten bekommt die meistens nicht alle Änderungen mit.


Gruß,
Jan

Samsi

Hallo Jan,

ja ich habe das komplette zip runter-geladen und den alten Ordner vorher komplett gelöscht und neu gestartet.

Mit dem Auskommentieren wie trilu sagte, kompiliert er. Ich werde nach her noch mal testen.

Muss jetzt erst mal ne Waschmaschine reparieren hat mir heute gerade noch gefehlt :(
FHEM 5.5 / BBB Debian Wheezy

Homematic CFG-LAN

HM-Sec-MDIR / HM-Sec-SD / HM-Sec-WDS / HM-LC-Sw2-FM / HM-Sec-SC / HM-LC-Sw1PBU-FM / HM-SCI-3-FM / HM-Sec-Key / HM-RC-Key3-B / HM-LC-Dim1TPBU-FM /  HM-CC-RT-DN / HM-PBI-4-FM / HM-RC-Key4-2 / HM-ES-PMSw1-Pl / HM-LC-Sw4-WM

jab

Komisch. Könnte schwören, dass es gestern bei mir kompiliert hat. Genaueres kann ich erst heute Abend testen.

Viel Erfolg mit der Waschmaschine!


Gruß,
Jan

trilu

Hi Jan,

glaub ich nicht das er kompiliert hat :-)
Vermutlich hattest du das entsprechende Debug Flag nicht gesetzt; Samsi aber schon und damit
versucht er das Serial Statement auch zu kompilieren...
pHex(unsigned char const*, unsigned char)
Du übergibst hier einen const char an print Hex, ich hab in der Routine aber nichts gecastet.

Viele Grüße
Horst

Samsi

@trilu
Setzt man das debug flag mit der Arduino IDE oder ist das irgendwo ein define? Denn am Code habe ich def. nichts geändert. Wenn dann muss es schon immer in der IDE gewesen sein, aber bisher gab es damit auch keine Probleme.


@Jan:

Eingeschaltet und ohne Verbraucher schickt er immer noch alle 2 Sekunden Statusmeldungen:
2014-01-22_14:47:15 licht_kellerFlur_Sw_02 deviceMsg: off (to HMLAN1)
2014-01-22_14:47:15 licht_kellerFlur_Sw_02 off
2014-01-22_14:47:15 licht_kellerFlur_Sw_02 timedOn: off
2014-01-22_14:47:16 licht_kellerFlur_Sw_02 level: 0 %
2014-01-22_14:47:16 licht_kellerFlur_Sw_02 pct: 0
2014-01-22_14:47:16 licht_kellerFlur_Sw_02 deviceMsg: off (to HMLAN1)
2014-01-22_14:47:16 licht_kellerFlur_Sw_02 off
2014-01-22_14:47:16 licht_kellerFlur_Sw_02 timedOn: off
2014-01-22_14:47:18 licht_kellerFlur_Sw_02 level: 0 %
2014-01-22_14:47:18 licht_kellerFlur_Sw_02 pct: 0
2014-01-22_14:47:18 licht_kellerFlur_Sw_02 deviceMsg: off (to HMLAN1)
2014-01-22_14:47:18 licht_kellerFlur_Sw_02 off
2014-01-22_14:47:18 licht_kellerFlur_Sw_02 timedOn: off
2014-01-22_14:47:19 licht_kellerFlur_Sw_02 level: 0 %
2014-01-22_14:47:19 licht_kellerFlur_Sw_02 pct: 0
2014-01-22_14:47:19 licht_kellerFlur_Sw_02 deviceMsg: off (to HMLAN1)
2014-01-22_14:47:19 licht_kellerFlur_Sw_02 off
2014-01-22_14:47:19 licht_kellerFlur_Sw_02 timedOn: off
2014-01-22_14:47:21 licht_kellerFlur_Sw_02 level: 0 %
2014-01-22_14:47:21 licht_kellerFlur_Sw_02 pct: 0
2014-01-22_14:47:21 licht_kellerFlur_Sw_02 deviceMsg: off (to HMLAN1)



Ich habe diesmal nur ein paar Lampen getestet, da der Unterschied zu  vorher eher gering ist. Man sieht das die mittelung funktioniert, am ersten wert ganz deutlich:

Glühlampe 15W, gemessen 16,2W 
2014-01-22_15:16:52 licht_kellerFlur_Sw_02 current: 5116
2014-01-22_15:17:22 licht_kellerFlur_Sw_02 current: 6968
2014-01-22_15:17:52 licht_kellerFlur_Sw_02 current: 6958
2014-01-22_15:18:22 licht_kellerFlur_Sw_02 current: 6961
2014-01-22_15:18:52 licht_kellerFlur_Sw_02 current: 6960
2014-01-22_15:19:22 licht_kellerFlur_Sw_02 current: 6963
2014-01-22_15:19:52 licht_kellerFlur_Sw_02 current: 6953
2014-01-22_15:20:22 licht_kellerFlur_Sw_02 current: 6960
2014-01-22_15:20:52 licht_kellerFlur_Sw_02 current: 6953
2014-01-22_15:21:22 licht_kellerFlur_Sw_02 current: 6962
2014-01-22_15:21:52 licht_kellerFlur_Sw_02 current: 6948
2014-01-22_15:22:22 licht_kellerFlur_Sw_02 current: 6961
2014-01-22_15:22:52 licht_kellerFlur_Sw_02 current: 6964
2014-01-22_15:23:22 licht_kellerFlur_Sw_02 current: 6949
.
.
.
Hier sieht man auch die Mittelung am Ende
2014-01-22_15:34:20 licht_kellerFlur_Sw_02 off
2014-01-22_15:34:20 licht_kellerFlur_Sw_02 timedOn: off
2014-01-22_15:34:21 licht_kellerFlur_Sw_02 current: 1859




Glühlampe 60 W  Gemessen: 63,8
2014-01-22_15:02:31 licht_kellerFlur_Sw_02 current: 3213
2014-01-22_15:03:01 licht_kellerFlur_Sw_02 current: 6877
2014-01-22_15:03:31 licht_kellerFlur_Sw_02 current: 6864
2014-01-22_15:04:01 licht_kellerFlur_Sw_02 current: 6877
2014-01-22_15:04:31 licht_kellerFlur_Sw_02 current: 6882
2014-01-22_15:05:01 licht_kellerFlur_Sw_02 current: 6881
2014-01-22_15:05:31 licht_kellerFlur_Sw_02 current: 6870
2014-01-22_15:06:01 licht_kellerFlur_Sw_02 current: 6880
2014-01-22_15:06:31 licht_kellerFlur_Sw_02 current: 6881
2014-01-22_15:07:00 licht_kellerFlur_Sw_02 current: 6870
2014-01-22_15:07:30 licht_kellerFlur_Sw_02 current: 6881
2014-01-22_15:08:00 licht_kellerFlur_Sw_02 current: 6878
2014-01-22_15:08:30 licht_kellerFlur_Sw_02 current: 6888
2014-01-22_15:09:00 licht_kellerFlur_Sw_02 current: 6884
2014-01-22_15:09:30 licht_kellerFlur_Sw_02 current: 6863
2014-01-22_15:10:00 licht_kellerFlur_Sw_02 current: 6879
2014-01-22_15:10:30 licht_kellerFlur_Sw_02 current: 6880




LED 2 5W Gemessen 6,5W
2014-01-22_15:36:51 licht_kellerFlur_Sw_02 current: 1840
2014-01-22_15:37:21 licht_kellerFlur_Sw_02 current: 3627
2014-01-22_15:37:51 licht_kellerFlur_Sw_02 current: 3637
2014-01-22_15:38:21 licht_kellerFlur_Sw_02 current: 3640
2014-01-22_15:38:51 licht_kellerFlur_Sw_02 current: 3642
2014-01-22_15:39:21 licht_kellerFlur_Sw_02 current: 3638
2014-01-22_15:39:51 licht_kellerFlur_Sw_02 current: 3640
2014-01-22_15:40:21 licht_kellerFlur_Sw_02 current: 3645
2014-01-22_15:40:51 licht_kellerFlur_Sw_02 current: 3645
2014-01-22_15:41:21 licht_kellerFlur_Sw_02 current: 3652
2014-01-22_15:41:51 licht_kellerFlur_Sw_02 current: 3662
2014-01-22_15:42:21 licht_kellerFlur_Sw_02 current: 3660
2014-01-22_15:42:51 licht_kellerFlur_Sw_02 current: 3665
2014-01-22_15:43:21 licht_kellerFlur_Sw_02 current: 3674


Grüße
FHEM 5.5 / BBB Debian Wheezy

Homematic CFG-LAN

HM-Sec-MDIR / HM-Sec-SD / HM-Sec-WDS / HM-LC-Sw2-FM / HM-Sec-SC / HM-LC-Sw1PBU-FM / HM-SCI-3-FM / HM-Sec-Key / HM-RC-Key3-B / HM-LC-Dim1TPBU-FM /  HM-CC-RT-DN / HM-PBI-4-FM / HM-RC-Key4-2 / HM-ES-PMSw1-Pl / HM-LC-Sw4-WM

jab

Moin,

@trilu: Du hast recht! Ich habe die in der Tat lokal anders gesetzt als in der eingecheckten Version (meine einzige Änderung aktuelle).

@Samsi: Du kannst Debug ändern:

//- Software config --------------------------------------------------------------------------------------------------------
//#define USE_SERIAL

#if defined(USE_SERIAL)
//#define CC_DBG                                                                                                                        // debug messages of the CC module, ~0.2k program space
//#define SM_DBG                                                                                                                        // debug messages of the SM module, ~1k program space
#define AS_DBG                                                                                                                                // debug messages of the HM module, ~0.6k program space
//#define AS_DBG_Explain                                                                                                // debug messages of the HM module, ~5k program space
#define RL_DBG
#endif

In der eingecheckten Version gibt es also keine Ausgabe auf der Seriellen Konsole. Dann gibt es die entsprechende Ausgabe Funktion auch nicht. Allerdings fehlt an der Stelle wohl ein #if defined. Füge ich noch ein.

Bei der Strommessung sind die Ergebnisse etwas schwer zu bewerten. Spannend finde ich, dass die 15W Glühlampe größere Werte als die 60W Glühlampe erzeugt. Die LED ist wie gesagt mit Vorsicht zu genießen, da sie vermutlich kein symetrisches Signal erzeugt. Bin mal gespannt ob wir da noch nützliche Informationen rausziehen können.


Gruß,
Jan

Samsi

ZitatBei der Strommessung sind die Ergebnisse etwas schwer zu bewerten. Spannend finde ich, dass die 15W Glühlampe größere Werte als die 60W Glühlampe erzeugt.
Ja, ich stenke die Strommessung kann man getrost abschreiben ;)  Wenn Du auf die messungen von gestern schaust, fällt auch auf, das der wert bei der einen, stärkeren  das nur die Hälfte von der anderen schwächeren LED ist.
Ich glaube bei denen die so um die 3K ausgeben, ist intern überall ein kleiner Übertrager eingebaut (auch bei der Energiesparlampe), während die andere ganz billig aufgebaut ist, mit einem Keramik-Kondensator (wenn ich das große dicke braune Bauteil richtig deute, steht leider nicht viel drauf nur 400V CBJ oder so) und einem Brückengleichrichter und ein paar Widerständen und noch einem Elko.

Grüße
FHEM 5.5 / BBB Debian Wheezy

Homematic CFG-LAN

HM-Sec-MDIR / HM-Sec-SD / HM-Sec-WDS / HM-LC-Sw2-FM / HM-Sec-SC / HM-LC-Sw1PBU-FM / HM-SCI-3-FM / HM-Sec-Key / HM-RC-Key3-B / HM-LC-Dim1TPBU-FM /  HM-CC-RT-DN / HM-PBI-4-FM / HM-RC-Key4-2 / HM-ES-PMSw1-Pl / HM-LC-Sw4-WM

daduke

Hallo zusammen,

versuche gerade den Code zu compilieren, aber ich bekomme

In file included from /usr/share/arduino/hardware/jabduino-master/cores/arduino/Arduino.h:8:0,
                 from AskSin.h:10,
                 from Asksin_HM_LC_Sw1PBU_FM.ino:2:
Asksin_HM_LC_Sw1PBU_FM.ino:41:25: error: variable 'jumptable' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


Die offensichtliche Idee, es einfach const zu deklarieren, funzt leider nicht:

Asksin_HM_LC_Sw1PBU_FM.ino:50:27: error: invalid conversion from 'const s_jumptable*' to 's_jumptable*' [-fpermissive]

jemand ne Idee?

danke,
-Christian
fhem auf pcengines apu, Philips Hue, MAX!, div. HomeMatic, Spark Core, panstamp, div. eigene Hardware

Samsi

Die Arduino IDE kommt mit Bindestrichen nicht zurecht. Ändere mal das Verzeichnis jabduino-master in jabduino um. Das gleiche musst Du für die Ordner
Asksin_HM_LC_Sw1PBU_FM-Master machen.

Grüße
FHEM 5.5 / BBB Debian Wheezy

Homematic CFG-LAN

HM-Sec-MDIR / HM-Sec-SD / HM-Sec-WDS / HM-LC-Sw2-FM / HM-Sec-SC / HM-LC-Sw1PBU-FM / HM-SCI-3-FM / HM-Sec-Key / HM-RC-Key3-B / HM-LC-Dim1TPBU-FM /  HM-CC-RT-DN / HM-PBI-4-FM / HM-RC-Key4-2 / HM-ES-PMSw1-Pl / HM-LC-Sw4-WM

daduke

Hallo Samsi,

danke für die Antwort. Bei Asksin_HM_LC_Sw1PBU_FM hatte ich es schon, bei jabduino-master nicht. Nur leider kommt immer noch der gleiche Fehler  :(

danke,
-Christian
fhem auf pcengines apu, Philips Hue, MAX!, div. HomeMatic, Spark Core, panstamp, div. eigene Hardware

jab

Möglicherweise hast du eine neuere GCC Version. Ich gucke mir das später an. Gibt da sicher noch ein paar Stellen die noch nicht optimal sind.


Gruß
Jan

daduke

Hallo Jan,

gcc version 4.8.2 (Fedora 4.8.2-1.fc20) falls das hilft.

danke,
-Christian
fhem auf pcengines apu, Philips Hue, MAX!, div. HomeMatic, Spark Core, panstamp, div. eigene Hardware

jab

Moin Christian,

ich habe das schnell im git gefixt. Bitte teste es mal und sag Bescheid wenn es noch Probleme beim kompilieren gibt.


Gruß,
Jan