16 Commits
Author SHA1 Message Date
Susis Strolch 53f3f44ae2 hunting the Software Watchdog restart
° unconditionaly show the last reset reason on telnet connect
° trying to enable stack trace also for Software watchdog events
° add wtdfeed() to MyESP loop
2019-07-31 11:17:36 +02:00
Susis Strolch 6dba02603f Merge branch 'dev' of https://github.com/proddy/EMS-ESP-Boiler into txmode2
* 'dev' of https://github.com/proddy/EMS-ESP-Boiler:
  tidy up includes
  write to ems+ thermostats (https://github.com/proddy/EMS-ESP/issues/145)
2019-07-31 10:44:52 +02:00
Susis Strolch 573ebcffeb txstatus: remove all references and settings 2019-07-29 21:35:22 +02:00
Susis Strolch a32da99618 txmode2 / Junkers autodetect
* reduce logs in jabber mode
* disable explicit test for Junkers

* add HT3 document
2019-07-29 19:10:19 +02:00
Susis Strolch e680ae6066 ° fix compile time error in ems.cpp (missing comment)
° show 'echo:telegram' msg only in jabber mode
° fix wrong value when applying 'log j'
2019-07-29 19:10:19 +02:00
Susis Strolch dab66ce918 fixing tx_mode 2
° stabilize emsuart_rx...
  We can get more than 32 bytes because of the trailing BRK.
  So the buffersize for Rx interrupt is (for safety) increased to 36 bytes.
  If length exceeds 36 bytes we dump them to /dev/null

° reintroduced the phantomBreak flag again
  We _must_ signal to Rx that we have a double break, otherwise
  we get problems in emsuart_recvTask...

° add ems_dumpBuffer which shows TxBuffer before send and RxBuffer after
  receive and applying phantomBreak.
  The dump is activated in "log j" mode and used to debug the
  protocol problems.

° change handling of ID bit 7
  on system start we listen for telegram until we receive a valid one,
  larger than 5 byte.
  Depending on the bit7 of the source address we decide if we have a
  Buderus EMS or a Junkers EMS bus.
  This decision is used to set the variables emsIDMask (0x00 for Buderus,
  0x80 for Junkers) and the emsPollAck buffer, used to send the propper
  acknowledge, depending on EMS type.

° move poll acknowledge function (emsuart_tx_poll) from emsuart.cpp to ems.cpp
  and rename to ems_pollAck

° add EMS_TX_REV_DETECT status for detecting the SourceID.7 bit and setting
  emsIDMask and emsPollAck buffer accordingly

° set initial emsTxStatus to EMS_TX_REV_DETECT

° add 'log j' - jabber - for more extensive debug logs
2019-07-29 19:10:19 +02:00
Susis Strolch 41837bf328 Merge branch 'master' of https://github.com/proddy/EMS-ESP-Boiler
* 'master' of https://github.com/proddy/EMS-ESP-Boiler:
  fix curr temp when higher than 25.5
  added devices
2019-07-29 09:55:12 +02:00
Susis Strolch 0a700b9451 in ems-esp:setup: set GPIO15 to HIGH so we don't disturb the EMS-Bus during boot 2019-07-19 15:46:18 +02:00
Susis Strolch 5587b9d267 reworks because of 'tx_mode 2' and protocol issues
° added markers (GIO12, GPIO14) for logic analyzer debugging

° change UART initialisation
  - set RxFIFO full to 1 char, so we can detect active telegram on EMS-Bus
  - set RxTOT to 1 char for the same reason

° in ems_parseTelegram: ignore telegram if  emsRxStatus != EMS_RX_STATUS_IDLE
  because we missed to respond in a timely manner

° ems_tx_buffer is not void anymore, instead we return the Tx status
° extended the emsTxStatus
  - EMS_TX_WTD_TIMEOUT: timeout while waiting for echo of last Tx byte
    out telegram was ignored by the bus master, so the byte wasn't echoed
  - EMS_TX_BRK_DETECT:  BRK detected while sending the telegram
    bus master send us a break because of protocol violation

° add burnStarts, burnWorkMin and heatWorkMin to MQTT boiler message

TODO:
  + take care of ems_tx_buffer return code
  + accept direct telegram in ems_parse_telegram and do a proper acknowledge
  + split the heartbeat in static (version, IP-address) and dynamic (RSS etc)
  + change the hearbeat to a JSON structure so we can easier pick the uptime
2019-07-19 13:16:23 +02:00
Susis Strolch 7743ff5d56 add burnStarts, burnWorkMin, heatWorkMin to boiler data set 2019-07-18 16:26:42 +02:00
Susis Strolch 7d361061c6 add marker pins (GPIO12, GPIO14) for logic analyser
° use faster macros for LA markers
2019-07-18 11:26:43 +02:00
Susis Strolch 98076f35a9 change filemode, remove .exe extension 2019-06-19 13:51:56 +02:00
Susis Strolch fdebf6bbdf tx_mode=2: compensate phantom BRK 2019-05-27 12:47:06 +02:00
Susis Strolch 078f89ce7e Merge branch 'dev' of https://github.com/proddy/EMS-ESP-Boiler into dev
* 'dev' of https://github.com/proddy/EMS-ESP-Boiler:
  heatpump minor changes
2019-05-27 10:53:07 +02:00
Susis Strolch 5479313e53 smart-tx - tx_mode 2 solved
after sending the byte we wait until we receive the busmaster response.
sending the BRK is done in loopback mode.
Only caveat: we will get a phantom \0 in Rx FIFO
2019-05-27 10:08:01 +02:00
Susis Strolch 93b6b1ea4c smart tx - try to fix Tx problems
- fix typo - replace emsaurt_tx_poll by emsuart_tx_poll
- smart tx - enabled by EMS_Sys_Status.emsTxDelay == 2
  use loopback to send in burst mode
- change emsuart_tx_poll to use emsuart_tx_buffer
- encapsulate uart_swap in #ifndef NO_UART_SWAP (private use)
2019-05-21 22:50:26 +02:00