Commit Graph

24 Commits

Author SHA1 Message Date
Paul
719755127b move buffers off heap 2019-11-22 21:15:07 +01:00
Paul
f39ecb860a remove emsuart debug messages 2019-10-14 18:25:12 +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
Paul Derbyshire
2a2a50b8c3 tidy up includes 2019-07-29 22:40:33 +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
Paul
caad7c8173 EMS_MAXBUFFERSIZE set to 34 for 2 additional BRKs 2019-07-26 15:16:26 +02:00
Paul
eb3cd7da01 added ems_getTxDisabled() 2019-07-26 12:46:11 +02:00
Paul
f8aabd9bf8 merged in https://github.com/proddy/EMS-ESP/pull/154 from @susisstrolch 2019-07-20 10:22:47 +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
Paul
b56d775d5d formatting 2019-06-29 08:56:50 +02:00
Paul
4e50d13bd1 add tx_mode back as new tx code can cause resets 2019-06-26 22:02:16 +02:00
Paul
4b28a1d9b5 add check for max telegram length 2019-06-23 23:55:16 +02:00
Paul
3766780cab version 1.8.0 final 2019-06-15 15:24:56 +02:00
Paul
40659df6be optimize Tx to handle phantom brk 2019-06-11 22:27:46 +02:00
proddy
1d7310411f merge Junkers Tx logic 2019-05-26 12:23:50 +02:00
proddy
57442db11c small changes 2019-05-22 18:48:27 +02:00
proddy
f9c5cb9dca merged Tx Delay https://github.com/proddy/EMS-ESP/pull/113 2019-05-21 23:50:47 +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
proddy
2701c8a0df change verbose logging to find duplicates 2019-03-17 22:40:13 +01:00
proddy
4a559866c7 1.6.0 b2 2019-03-17 14:59:37 +01:00
proddy
8e62a99417 1.5.7b 2019-03-10 15:09:51 +01:00
proddy
895175d03a minor updates 2018-06-06 17:56:30 +02:00
proddy
615c5417de cleanup 2018-05-17 21:57:46 +02:00
proddy
4ab7bb6835 first commit 2018-05-14 23:16:06 +02:00