Man-fred/culfw.esp8266

rf_moritz compile failed

Closed this issue · 32 comments

Hi Manfred

I see that moritz you have enabled.

It fails when I compile

Multiple libraries were found for "WiFiUdp.h"
/home/richard/Arduino/libraries/rf_moritz/rf_moritz.c:5:27: fatal error: avr/interrupt.h: No such file or directory
Used: /home/richard/.arduino15/packages/esp8266/hardware/esp8266/2.6.3/libraries/ESP8266WiFi
#include <avr/interrupt.h>
Not used: /home/richard/Downloads/arduino-1.8.12/libraries/WiFi

regards Richard

Hi Richard,
it seems you have local a file rf_moritz.c, but there is no file on github. In the directory /libraries/rf_moritz should only be the files rf_moritz.h and rf_moritz.cpp
regards Manfred

removed the .c file , and now compiled no errors. fhem start, but it doesn't have credits, i get no answer, that is required that he creates cul_max device(s)

credit10ms | No answer

and should be

credit10ms =>900

Hi, in my just now compiled version i get an answer on credit10ms: "ESP_CUL credit10ms => 786". Could it be, that the problems with fht8v consume all of the 1% credit?

Yes, on normal mode I get credits. But setting attribute rfmode MAX, than credits is N/A

Do you have credits when in rfmode MAX?

Hi, yes, I get credits. After a couple of minutes I get 900. I'm waiting for the delivery of the MAX!-devices and then I can test it.

Hi Manfred. I made a second espcul, and this one I tested first if I received something from fs20, and yes this works. Then I tried the moritz mode. De credits are working, but pairing nothing happens.

Did you already received you max products?

Hi Richard,
yesterday I got my MAX!-devices. And I started the Debugging. I see packets from the MAX! but they are no valid MAX!-signals. It seems the timing is not correct. I will continue to work on this in the evening.

Hi Manfred,

Good to that you received the max devices. Good luck with debugging and troubleshooting. Let me know if I can do/test something

regards Richard

Hi,

Any progress with debugging/troubleshooten?

Hi, now i learned how interrupts work in esp8266 and the first test for MAX! is online. My wall thermostate and shutter contact are online and connected. But it seems that not all messages are sended. A raw "Zr" command seems to help, but I'am working on it.

Hi,

Tried your new version, but paring of my wallthermostat didn't work yet.

at starting fhem I get this

2020.05.30 22:59:33 0: Server started with 10 defined entities (fhem.pl:21952/2020-05-16 perl:5.026001 os:linux user:fhem pid:20800)
2020.05.30 22:59:33 5: CUL/RAW: /0D2E2D07D3913D04320000060021656A55E43023B900070018146C070090876BF85611
2020.05.30 22:59:33 5: CUL/RAW: 0D2E2D07D3913D04320000060021656A55E43023B900070018146C070090876BF85611/E92A001F4100Z on

2020.05.30 22:59:33 4: CUL_Parse: culesp 0D2E2D07D3913D04320000060021656A55E43023B900070018146C070090876BF85611E92A001F4100Z on
2020.05.30 22:59:33 5: culesp: dispatch 0D2E2D07D3913D04320000060021656A55E43023B900070018146C070090876BF85611E92A001F4100Z on
2020.05.30 22:59:33 3: culesp: Unknown code 0D2E2D07D3913D04320000060021656A55E43023B900070018146C070090876BF85611E92A001F4100Z on, help me!
2020.05.30 22:59:36 2: AttrTemplates: got 160 entries
2020.05.30 22:59:38 5: culesp sending Za123456
2020.05.30 22:59:38 5: SW: Za123456
2020.05.30 22:59:38 5: culesp sending Zw111111
2020.05.30 22:59:38 5: SW: Zw111111

Hi Manfred,

more progress already?

regards Richard

Hi Richard,
now I get a stable release with readings from wall thermostate and shutter contact. After pairing fhem shows a reading "PairedTo". But it seems that I can't send to the thermostate.

I found my busware-cul :) and I use it parallel to the esp. Now I can analyse the differences. Like you says I get the acknowledgements for the sent messages and I can them see them on the esp8266. Now I'm curious what the busware see when I sent with the esp.

Nice, Let's hope everything is going to work.

I just received 4 max thermostat basics that I want to go to use instead of the fht8v's

I'm configuring it first with a busware-cul, and hopefully laster with the espcul

What I read and what I think is that there is a problem with the SPI-interface between esp8266 and cc1101. But I'm missing a logic analyser for examination. So i solder the next esp-cul and will test it without CRC and whitening. Let's see what this does.

Hi Richard,
my esp-cul now sends :)) I haved uploaded the next version, but only for testing. In this version the 1%-rule is inactive (it sends every times immediately) and the output level is fixed to +10db. If it works with your esp8266/cc1101 I will set this to normal and programmable value .

You can ignore the debugging output between "Zs.." and "Z0..." on USB. If you get no connection please add the 6 rows in the comment.

Hi,

Tested als with wallthermostat, Autocreate failed but when editing it works with some values also write works. Below log of autocreate and log of same wallthermostat with espcul en buswarecul
But already good job!

log of autocreate

2020.06.07 21:13:57 3: CULMAX0, Send Queue missing ack from MAX_1ade43 for PairPong, removing from queue
2020.06.07 21:13:34 1: MAX_Parse, ohne Namen msg: MAX,0,WallThermostatConfig,1ade43,17,21,30.5,4.5,444855084520452045204520452045204520452045204520452044485508452045204520452045204520452045204520452045204448546c44cc55144520452045204520452045204520452045204448546c44cc55144520452045204520452045204520452045204448546c44cc55144520452045204520452045204520452045204448546c44cc55144520452045204520452045204520452045204448546c44cc5514452045204520452045204520452045204520,80,5,0,12
2020.06.07 21:13:34 1: PERL WARNING: Use of uninitialized value $dev in hash element at fhem.pl line 3661.
2020.06.07 21:13:34 1:     main::CallFn                        called by fhem.pl (760)
2020.06.07 21:13:34 1:     main::CUL_Read                      called by fhem.pl (3789)
2020.06.07 21:13:34 1:     main::CUL_Parse                     called by ./FHEM/00_CUL.pm (831)
2020.06.07 21:13:34 1:     main::Dispatch                      called by ./FHEM/00_CUL.pm (953)
2020.06.07 21:13:34 1:     main::CUL_MAX_Parse                 called by fhem.pl (3985)
2020.06.07 21:13:34 1:     main::readingsBulkUpdate            called by ./FHEM/14_CUL_MAX.pm (865)
2020.06.07 21:13:34 1: stacktrace:
2020.06.07 21:13:34 1: readingsUpdate(,SerialNr,OEQ2099934) missed to call readingsBeginUpdate first.
2020.06.07 21:13:34 1:     main::CallFn                        called by fhem.pl (760)
2020.06.07 21:13:34 1:     main::CUL_Read                      called by fhem.pl (3789)
2020.06.07 21:13:34 1:     main::CUL_Parse                     called by ./FHEM/00_CUL.pm (831)
2020.06.07 21:13:34 1:     main::Dispatch                      called by ./FHEM/00_CUL.pm (953)
2020.06.07 21:13:34 1:     main::CUL_MAX_Parse                 called by fhem.pl (3985)
2020.06.07 21:13:34 1:     main::readingsBulkUpdate            called by ./FHEM/14_CUL_MAX.pm (864)
2020.06.07 21:13:34 1: stacktrace:
2020.06.07 21:13:34 1: readingsUpdate(,PairedTo,000000) missed to call readingsBeginUpdate first.
2020.06.07 21:13:34 1:     main::CallFn                        called by fhem.pl (760)
2020.06.07 21:13:34 1:     main::CUL_Read                      called by fhem.pl (3789)
2020.06.07 21:13:34 1:     main::CUL_Parse                     called by ./FHEM/00_CUL.pm (831)
2020.06.07 21:13:34 1:     main::Dispatch                      called by ./FHEM/00_CUL.pm (953)
2020.06.07 21:13:34 1:     main::CUL_MAX_Parse                 called by fhem.pl (3985)
2020.06.07 21:13:34 1:     main::readingsBulkUpdate            called by ./FHEM/14_CUL_MAX.pm (863)
2020.06.07 21:13:34 1: stacktrace:
2020.06.07 21:13:34 1: readingsUpdate(,testresult,255) missed to call readingsBeginUpdate first.
2020.06.07 21:13:34 1:     main::CallFn                        called by fhem.pl (760)
2020.06.07 21:13:34 1:     main::CUL_Read                      called by fhem.pl (3789)
2020.06.07 21:13:34 1:     main::CUL_Parse                     called by ./FHEM/00_CUL.pm (831)
2020.06.07 21:13:34 1:     main::Dispatch                      called by ./FHEM/00_CUL.pm (953)
2020.06.07 21:13:34 1:     main::CUL_MAX_Parse                 called by fhem.pl (3985)
2020.06.07 21:13:34 1:     main::readingsBulkUpdate            called by ./FHEM/14_CUL_MAX.pm (862)
2020.06.07 21:13:34 1: stacktrace:
2020.06.07 21:13:34 1: readingsUpdate(,firmware,1.0) missed to call readingsBeginUpdate first.
2020.06.07 21:13:34 1:     main::CallFn                        called by fhem.pl (760)
2020.06.07 21:13:34 1:     main::CUL_Read                      called by fhem.pl (3789)
2020.06.07 21:13:34 1:     main::CUL_Parse                     called by ./FHEM/00_CUL.pm (831)
2020.06.07 21:13:34 1:     main::Dispatch                      called by ./FHEM/00_CUL.pm (953)
2020.06.07 21:13:34 1:     main::CUL_MAX_Parse                 called by fhem.pl (3985)
2020.06.07 21:13:34 1:     main::readingsBeginUpdate           called by ./FHEM/14_CUL_MAX.pm (861)
2020.06.07 21:13:34 1: stacktrace:
2020.06.07 21:13:34 1: ERROR: empty name in readingsBeginUpdate
2020.06.07 21:13:34 1: MAX_Parse, ohne Namen msg: MAX,0,define,1ade43,WallMountedThermostat,OEQ2099934,0
2020.06.07 21:13:34 3: CULMAX0, Pairing device MAX_1ade43 of type WallMountedThermostat with serial OEQ2099934
2020.06.07 21:13:34 3: CULMAX0, source device 1ade43 has no name !

Log of espcul


fhem> l MAX_1ade43
Internals:
   CULMAX0_MSGCNT 4
   CULMAX0_TIME 2020-06-07 21:28:01
   DEF        WallMountedThermostat 1ade43
   FUUID      5eda811f-f33f-d772-d650-939d4b9382660fb3
   IODev      CULMAX0
   LASTInputDev CULMAX0
   MSGCNT     4
   NAME       MAX_1ade43
   NR         60
   NTFY_ORDER 50-MAX_1ade43
   STATE      15.0&deg;C
   SVN        22023
   TYPE       MAX
   TimeSlot   0
   addr       1ade43
   devtype    3
   type       WallMountedThermostat
   READINGS:
     2020-06-07 21:22:32   RSSI            -39.5
     2020-06-07 21:22:32   battery         ok
     2020-06-07 21:22:32   batteryState    ok
     2020-06-07 21:22:32   desiredTemperature 15.0
     2020-06-07 21:22:32   displayActualTemperature 1
     2020-06-07 21:28:01   error           Invalid command/argument  8119011E
     2020-06-07 21:22:32   gateway         1
     2020-06-07 21:22:13   groupid         0
     2020-06-07 21:22:13   lastcmd         set_desiredTemperature 15.0
     2020-06-07 21:22:32   mode            manual
     2020-06-07 21:22:13   msgcnt          1
     2020-06-07 21:22:32   panel           unlocked
     2020-06-07 21:22:32   peerIDs         000000
     2020-06-07 21:22:32   peerList        Broadcast
     2020-06-07 21:22:32   rferror         0
     2020-06-07 21:22:32   state           15.0&deg;C
   helper:
     io:
       cul:
         raw        Z0E3E02021ADE43123456008119011E
         rssi       -35.5
         time       1591558081.33684
Attributes:
   IODev      CULMAX0
   alias      Wandthermostaat
   group      Klimaat
   model      WallMountedThermostat
   room       Zolder

buswarecul


fhem> l MAX_1ade43
Internals:
   CULMAX_MSGCNT 45
   CULMAX_TIME 2020-06-07 21:31:40
   DEF        WallMountedThermostat 1ade43
   FUUID      5eda811f-f33f-d772-d650-939d4b9382660fb3
   IODev      CULMAX
   LASTInputDev CULMAX
   MSGCNT     45
   NAME       MAX_1ade43
   NR         184
   NTFY_ORDER 50-MAX_1ade43
   STATE      15.0&deg;C
   SVN        22023
   TYPE       MAX
   TimeSlot   1
   addr       1ade43
   devtype    3
   type       WallMountedThermostat
   READINGS:
     2020-06-07 21:13:34   PairedTo        000000
     2020-06-07 21:30:51   RSSI            -83
     2020-06-07 21:13:34   SerialNr        OEQ2099934
     2020-06-07 21:24:22   battery         ok
     2020-06-07 21:24:22   batteryState    ok
     2020-06-07 21:13:34   boostDuration   25
     2020-06-07 21:13:34   boostValveposition 80
     2020-06-07 21:13:34   comfortTemperature 21.0
     2020-06-07 21:30:51   desiredTemperature 15.0
     2020-06-07 21:30:51   deviation       7.5
     2020-06-07 21:24:22   displayActualTemperature 1
     2020-06-07 21:13:34   ecoTemperature  17.0
     2020-06-07 21:31:40   error           Invalid command/argument  8119011E
     2020-06-07 21:13:34   firmware        1.0
     2020-06-07 21:24:22   gateway         1
     2020-06-05 19:30:07   groupid         0
     2020-06-07 21:13:36   lastTimeSync    2020-06-07 21:13:36
     2020-06-07 21:13:34   lastcmd         WallThermostatConfig
     2020-06-07 21:13:34   maximumTemperature on
     2020-06-07 21:13:34   measurementOffset 0.0
     2020-06-07 21:13:34   minimumTemperature off
     2020-06-07 21:24:22   mode            manual
     2020-06-07 21:13:36   msgcnt          64
     2020-06-07 21:24:22   panel           unlocked
     2020-06-07 21:30:51   peerIDs         000000,1b0e7a,1b972d
     2020-06-07 21:30:51   peerList        Broadcast,MAX_1b0e7a,MAX_1b972d
     2020-06-05 19:33:33   peers           1b972d
     2020-06-07 21:24:22   rferror         0
     2020-06-07 21:30:51   state           15.0&deg;C
     2020-06-07 21:30:51   temperature     22.5
     2020-06-07 21:13:34   testresult      255
     2020-06-07 21:13:34   weekprofile-0-Sat-temp 17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-0-Sat-time 00:00-06:00  /  06:00-22:00  /  22:00-24:00
     2020-06-07 21:13:34   weekprofile-1-Sun-temp 17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-1-Sun-time 00:00-06:00  /  06:00-22:00  /  22:00-24:00
     2020-06-07 21:13:34   weekprofile-2-Mon-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-2-Mon-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-24:00
     2020-06-07 21:13:34   weekprofile-3-Tue-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-3-Tue-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-24:00
     2020-06-07 21:13:34   weekprofile-4-Wed-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-4-Wed-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-24:00
     2020-06-07 21:13:34   weekprofile-5-Thu-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-5-Thu-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-24:00
     2020-06-07 21:13:34   weekprofile-6-Fri-temp 17.0 °C  /  21.0 °C  /  17.0 °C  /  21.0 °C  /  17.0 °C
     2020-06-07 21:13:34   weekprofile-6-Fri-time 00:00-06:00  /  06:00-09:00  /  09:00-17:00  /  17:00-23:00  /  23:00-24:00
     2020-06-07 21:13:34   windowOpenTemperature 12.0
   helper:
     dt         21.0
     myday      1
     io:
       cul:
         raw        Z0E3F02021ADE43123456008119011E
         rssi       -84
         time       1591558300.20565
Attributes:
   IODev      CULMAX
   alias      Wandthermostaat
   group      Klimaat
   model      WallMountedThermostat
   mqttPublish desiredTemperature|temperature:topic={"/Zolderkamertemp/$name"} desiredTemperature|temperature:retain=1
   room       Zolder

My test with a WallMountedThermostat:

  • reset to factory settings
  • pairing on the thermostat
  • before I could start the pairing in fhem i got in the log:
2020.06.08 07:23:26 4: CUL_Parse: ESP_CUL Z170004001C1BCC000000001003FF5145513230323236343761 -25.5
2020.06.08 07:23:26 5: ESP_CUL: dispatch Z170004001C1BCC000000001003FF51455132303232363437
2020.06.08 07:23:26 3: ESP_MAX, source device 1c1bcc has no name !
  • autocreate failed (failure in CUL_MAX?), manuell cration was only possible after fhem restart. Something similar is in the fhem-forum:
define MAX_1c1bcc MAX WallMountedThermostat 1c1bcc
  • pairing initialized first on CUL_MAX, second on thermostat seems ok, after this the command
set MAX_1c1bcc displayActualTemperature 1

shows immediately the correct temperature on the thermostat and that wasn't in my first tests without correct pairing.

I have simplified the code a little bit and removed the debug-messages. The only change to the original bahavior is that I set the max. credits to 3600. I think in the pairing and initializing phase, also after restart of the cul, fhem needs more than 900.

regards, Manfred

Hi Richard,
an updated esp8266 - core is available in the arduino-ide. I now use 2.7.1, previos one was 2.6.3. But I think this should make no differences by MAX!. My interaction with MAX!-devices is further without problems, FS20 also.

Off topic:

  1. A disruptive change are the commands Wis, Wik and WiD, these are absolutely necessary for using wlan.
  2. I activated over-the-air updates, see readme.md or Wiki
  3. The repository I forked from is inactive. i separated it, but this is only possible with a new name. Please change to https://github.com/Man-fred/culfw.esp8266. After your answer I will also move this issue. From now on, all changes can only be found there.

Regards, Manfred

Manfred , ok I will try the new version this weekend on the new location

I let you know on the new location if everything works

Manfred

I compiled the new version. Setting the network was a little difficult , dhcp didn't work, so static went ok.

I have now 4 thermostat basics 1 wallthermostat and 1 fakewallthermostat, and looks like it works

Good job. I will check tomorrow late if everything is stable

Hi Richard,
great that it works for you, my MAX!-devices seems also running, so I can rollout it in all rooms.
Regards, Manfred

Manfred,

It looks stable. Only the the hostname (devicename) is not working. In the console commad Rid I get esp-cul, but on the network it shows still ESP-F44XXXX. Also reboot and/erased reflashed but not working.

regards Richard

Hi,
the problem with the hostname is a problem in dns/dhcp. Perhaps it helps to delete the name in the dns-server and then restart the esp. Then it should show the new and correct name.

Hi,

Removed everything from dns/dhcp entries, erased the the esp, and reprogrammed. Tried both esps, and both gives ESP-F****

With the old private.h it worked

Hi,
I will test it. I have two more esp and will upload the sketch. Maybe then I can see the problem myself.

Good news: I found the error in setting the hostname. But i changed something more and must test if the changes are stable.

Good to hear. Let me know when I can test it.

My 4 thermostat basic and 1 wandthermostat works fine at the moment.

Hi Richard,
I pushed the changes in testing the hostname to master. Nothing else is changed, so the stability shouldn't be affected.
Regards, Manfred

Manfred,

Now it works. the hostname comes correct in the wifi router

thnx , I close this issue. Thnx for all the support.