Commit Graph

572 Commits

Author SHA1 Message Date
croghostrider
6254fc9b67
fix bulid (#143)
fix bulid


fix bulid


fix bulid
2021-06-14 08:10:48 +02:00
croghostrider
31e35695e6
fix wrong IP (#142) 2021-06-08 20:27:33 +02:00
croghostrider
59d1b67d6c
add KNX IP discovery support (#141)
for ESP8266 and ESP32
2021-06-04 17:23:23 +02:00
croghostrider
2450c1c458
fix ESP32 IP KNX Demo (#139) 2021-06-02 17:55:07 +02:00
croghostrider
14462d410d
Change individual address (#140)
to 15.15.255
2021-06-02 17:53:46 +02:00
etrinh
75c863bffe
Add new KNX_NO_STRTOx_CONVERSION define for footprint reduction (#137)
* Remove uniqueSerialNumber debug log to reduce footprint

* add KNX_NO_STRTOx_CONVERSION to avoid expensive strtod conversion
2021-05-12 13:03:10 +02:00
OutOfSync1
ed54da7089
fix some typos (#136)
* removed one section that was duplicate in dptconvert.cpp
2021-05-04 16:19:29 +02:00
OutOfSync1
95cf9df7fc
fix userdata saverestore (#133) (#135)
* set saveSize at compile time

* make sure USERDATA_SAVE_SIZE is set to valid value
2021-05-04 16:17:27 +02:00
etrinh
a4e74ebae5
Remove uniqueSerialNumber debug log to reduce footprint (#134) 2021-04-17 11:12:19 +02:00
OutOfSync1
14162fb1a4
fix userdata saverestore (#133)
* * fix for save/restore of userdata

* change declaration of restore() in knx_facade.h to "const uint8_t* restore(const uint8_t* buffer)" to avoid calling default implementation in save_restore.h

* change typedefs to separate SaveCallback and RestoreCallback

* fix BME60 example, knx.setRestoreCallback() needs to use const uint8_t* as well

* fix commitToEeprom for ESP32

* trigger dirty flag for ESP32 to make sure data is committed
2021-04-14 23:46:03 +02:00
OutOfSync1
1343ed0b7d
fixes to enable partial programming (#132)
* fixes to enable partial programming (thanks to mumpf and proggerKA at KNX-UF!)

* add PID_MCB_TABLE to TableObject

* add CallBackProperty to send PID_MCB_TABLE

* calculate crc checksum using Crc16Citt when state switches to LOAD_COMPLETED

* add crc to save(), restore() and saveSize() to save crc to flash

* add CallBackProperty for read and write of PID_PROG_VERSION to ApplicationProgramObject

* create overrides for save, restore, and saveSize in ApplicationProgramObject to save _programVersion to flash

* improve crc calculation

* removed TableObject::crc16Citt method and use the one in bits.h

* do not save crc in flash, instead calculate on-the-fly in CallbackProperty when state==LS_LOADED

* use DataProperty to store PID_PROG_VERSION

* WARNING: segmentSize calculation for crc calculation is currently not correct. Need to somehow access size of data in class that inherits from TableObject (e.g. ApplicationObject or RouterObject)

* fix segment size in TableObject()

* save size after TableObject::allocTable() is called. Also change save() and restore() to save _size to flash. Modify saveSize()

* use _size to calculate crc value in CallbackProperty

* reduce footprint, save 5 byte

* add comment why _size field is needed

* remove PID_MCB_TABLE from RouterObject

* this is now implemented in TableObject
2021-04-14 23:44:12 +02:00
OutOfSync1
e57bbf9dbe
generate unique serial number (#90) (#131)
* generate unique serial number (#90)

* see https://github.com/ricaun/ArduinoUniqueID

* calculated from ESP.getEfuseMac() on ESP32

* ESP.getChipId() on ESP8266

* SERIAL_NUMBER_WORD_0-3 on SAMD

* HAL_GetUIDw0-2() on STM32

* defaults to 0x01020304 on other platforms

* fix variable name for ESP platform

* another fix variable name for ESP platform (need more coffee...)
2021-04-12 11:40:56 +02:00
etrinh
036bd54c79
Tweak for Ram usage (#129)
* Add KNX_NO_DEFAULT_UART to avoid default uart assignation for ArduinoPlatforms and derivatives, with associated defines (HWSERIAL_NONE for stm32) to recover RAM from unused RX/TX buffers
Remove ArduinoPlatform(HardwareSerial* knxSerial) constructor, seems not useable by KnxFacade

* Restore ArduinoPlatform::ArduinoPlatform(HardwareSerial* knxSerial) constructor

* revert xxxPlatform(HardwareSerial* s) constructors
2021-04-01 09:34:26 +02:00
etrinh
446ea1b9aa
Fix int32 -> KNXValue conversion (#128)
Add KNX_NO_SPI to reduce footprint
2021-03-11 20:31:09 +01:00
etrinh
44075d80f7
Add KNX_NO_PRINT to define in project to avoid console info and reduce footprint (#127) 2021-03-11 09:38:06 +01:00
mumpf
164bf59166
added alternative GroupObject with less mangagement footprint (#125)
* corrected float with DPT9

* Switch Programming-LED also via Bus/ETS

* Again: Prog-LED switchable from bus/ETS

* DPT16 (to bus) implemented

* - added SMALL_GROUPOBJECT

* - added knx-demo-small-go example
- added config.h option (commented)
- changed platformio-ci.ini with -DSMALL_GROUPOBJECT
- changed plantformio.ini with tested -DSMALL_GROUPOBJECT

* - removed duplicate files

Co-authored-by: Waldemar Porscha <waldemar@porscha.eu>
Co-authored-by: Waldemar Porscha <waldemar.porscha@sap.com>
2021-02-18 09:40:35 +01:00
zelogik
21a05ae9b3
Add knx-433 (#122)
* knx-pzem004v30

Add first draft of a pzem-004t power/current/tension/etc.. on your main line (BE CAREFUL WITH VOLTAGE!)

PZEM-004t-v30 wired on a samd21 with the use of Sercom2

Use with slight modification of: https://github.com/mandulaj/PZEM-004T-v30
View issue:  https://github.com/mandulaj/PZEM-004T-v30/issues/43

* Rename examples/knx-pzem0004t.xml to examples/knx-pzem004/knx-pzem0004t.xml

* Delete knx-pzem004t.knxprod

* Delete pzem-004t-v30.ino

* Update: 'just move to right directory'

* Update knx-pzem0004t.xml

* Add: ProgMode

* Fix/Update/Add

Add: ResetEnergy function with datetime
Update: led Class
Fix: many typo, errors

* Cleaning

Some strange bug/feature...
Information is transmitted only when the device got time from KNX, I have put 
        if (timeStatus() == timeSet && resetPeriod != 0)
        {
           resetEnergyLoop();
        }

But don't know if it's enough...

* Create knx-433Dio.ino

* Add Files:

README.md

.xml and knxprod files

* Delete pzem-004t-v30.ino

* Update pzem-004t-v30.ino
2021-02-09 02:37:14 +01:00
Thomas Kunze
cddef776f7 move MAX,MIN,ABS to bits.h 2021-02-08 20:54:49 +01:00
Dennis Fleurbaaij
f169e20f2f
opt-out global KNX, ability to DIY construct knx object, minor cleanups (#121)
* Refactored the knx_facade a bit to make the auto-building of the global knx object and the buttonUp() ISR function opt-in. Also added the ability to quite easily attach another serial (in this case tested with Serial2 of an ESP32).

* Added visual studio code temp files to .gitignore

* Fix for missing build flag for WifiManager in ESP32_ip demo

* Added example in which we DIY build the KNX object and use ESP32's second UART to connect so that you can debug with the first one that's connected to USB.

* Minor platform cleanups to remove compilation warnings.

* ESP32 can't handle the defaulted 8192 byte EPROM. Next to that I needed to begin() the eprom lib in my setup() to get it to work and that requires knowing how much memory KNX will use. This fix makes the default more conservative and moves it's definition to the .h file so that other files can always use it as well.

* After comments from thelsing, inverted the logic. The default global knx object is now opt-out by defining KNX_NO_AUTOMATIC_GLOBAL_INSTANCE. See the knx-demo-diy project for an example.
Minor syntactic cleanups.

* Removed hardwareserial from facade (detail which was not needed)
Placed facade constructors together
Minor syntactic cleanup

* Fixed knx-cc1310 where own button routine was calling now private internal knx facade variable.
Renamed files in knx-demo-diy
Minor syntactic stuff

* Added gitattributes for binary knxprod files
2021-02-05 15:57:45 +01:00
zelogik
58d3721571
Add: 'Demo example for PZEM004t-V3 (#120)
* knx-pzem004v30

Add first draft of a pzem-004t power/current/tension/etc.. on your main line (BE CAREFUL WITH VOLTAGE!)

PZEM-004t-v30 wired on a samd21 with the use of Sercom2

Use with slight modification of: https://github.com/mandulaj/PZEM-004T-v30
View issue:  https://github.com/mandulaj/PZEM-004T-v30/issues/43

* Rename examples/knx-pzem0004t.xml to examples/knx-pzem004/knx-pzem0004t.xml

* Delete knx-pzem004t.knxprod

* Delete pzem-004t-v30.ino

* Update: 'just move to right directory'

* Update knx-pzem0004t.xml

* Add: ProgMode

* Fix/Update/Add

Add: ResetEnergy function with datetime
Update: led Class
Fix: many typo, errors
2021-01-21 18:41:55 +01:00
rueckix
742e7a1ee7
Fixing metadata size (#119) 2021-01-08 14:06:54 +01:00
rueckix
d46b51fd4f
Fix ambiguous call to attachInterrupt (#118)
* Fix ambiguous call to attachInterrupt
in new SAMD arduino core

* select attachInterrupt
signature based on Arduino version
2021-01-08 14:06:13 +01:00
rueckix
73df7fd28c
Fix: "bool BauSystemBCoupler::configured()" (#112)
* Fix: "bool BauSystemBCoupler::configured()"
always returns false when KNXSecure is not supported/configured in ETS

* Update platformio-ci.ini

activate optional  USE_DATASECURE

* Update platformio-ci.ini

activate optional  USE_DATASECURE

* Update platformio-ci.ini

activate optional  USE_DATASECURE
2020-12-10 19:17:45 +01:00
rueckix
8405d1f47d
Adding std::function support for SAMD (#113) 2020-12-09 19:45:13 +01:00
nanosonde
f3751b6ccd
Add nano.specs to linker to reduce memory footprint and increase HEAP+STACK sizes. (#107)
Reduce buffer size for Segger RTT UP-Buffer.
2020-11-20 20:07:51 +01:00
Thomas Kunze
24c27815cf fix build 2020-11-18 18:39:35 +01:00
Thomas Kunze
9dd7aeb353 add masks for esp8266 2020-11-18 17:56:19 +01:00
Thomas Kunze
2aecc213ff Rename DataSecurity enums; conflict with Wifimanager 2020-11-18 17:46:47 +01:00
nanosonde
eab31e7808
Finish RX on cancelled RX_CmdAdv if we issued hard abort due to crc16/address mismatch (#105) 2020-11-17 21:08:53 +01:00
nanosonde
abb37c3b63
Add warning message in TP-UART data link layer (#104)
* Fix address type bug in TP-UART data link layer

* Fix address check

* Fix blank
2020-11-17 17:57:51 +01:00
nanosonde
390ca8ccfb
Remove unused array (#103) 2020-11-17 17:55:46 +01:00
nanosonde
c91e78824c
Add workflow for CC1310 example (#102)
* Add workflow for CC1310 example

* Fix env vars

* Use Ubuntu Focal and fix cmake

* Fix cmake

* Change workflow names
2020-11-17 17:54:46 +01:00
Thomas Kunze
d962da414d another bugfix try for #83 2020-11-17 17:49:54 +01:00
thelsing
4f1b7502f6
Delete .travis.yml 2020-11-16 22:01:24 +01:00
thelsing
b487fe3540
Update platform-io.yml 2020-11-16 21:50:21 +01:00
thelsing
b948c0845c
Update cmake.yml 2020-11-16 21:50:03 +01:00
thelsing
b34d0b26fe
Remove travis badge 2020-11-16 21:40:43 +01:00
thelsing
e244e0c9dd
disable esp8266 build again 2020-11-16 21:40:06 +01:00
thelsing
2cfb384ca2
Update platform-io.yml 2020-11-16 21:34:43 +01:00
thelsing
ca7d8a93b3
Create platform-io.yml 2020-11-16 21:32:47 +01:00
nanosonde
04e95b2100
Add TI code composer project files for CC1310 example (#101)
* Remove required HEAP size

* Add Code Composer Project files

* Add default debug print to UART

* Update .cproject

* Add README.md
2020-11-16 21:23:16 +01:00
thelsing
67398e3bde
Create cmake.yml 2020-11-16 21:22:04 +01:00
thelsing
80b61d2f10
Update platformio-ci.ini
Check if build of wifimanager with tagged version fails.
2020-11-16 20:51:23 +01:00
thelsing
389201cf8a
fix build 2020-11-16 20:39:03 +01:00
Thomas Kunze
45158bb071 also ack indivisual broadcasts 2020-11-16 20:35:08 +01:00
thelsing
bb818d9877
Update README.md 2020-11-11 23:08:11 +01:00
ali esmaeilpour
083d83f777
Add float type for parameters & a few fixes (#95)
* Fix not-relative include

throws if a include directory is not set.

* add forgotten defined() in environment checking '#elif's

* fix mis-spelled "config.j"

* Add float type support to Parameters

All 3 encodings supported.

* Using dptconvert functions to handle parameters handling
2020-11-11 22:55:35 +01:00
Thomas Kunze
c167305a87 set valid default value for routing count 2020-11-11 22:51:23 +01:00
Thomas Kunze
c3d7f3e190 fix path for Readme.md 2020-11-11 22:48:04 +01:00
nanosonde
d90843ba45
Add support for CC1310 platform based on SimpleLink SDK (#94)
* Initial commit

* Clean up

* Remove display code

* Change cmake build

* Add SimpleLink SDK for CC13xx/CC26xx as submodule

* Remove commented line from build.sh

* Working build

* Remove SDK submodule

* Squashed 'examples/knx-cc1310/coresdk_cc13xx_cc26xx/' content from commit 0d78d32

git-subtree-dir: examples/knx-cc1310/coresdk_cc13xx_cc26xx
git-subtree-split: 0d78d3280357416a5c0388148cda13717c9ffaa5

* Add more comments and enable Power_idleFunc() for NoRTOS variant.
Internal SDK driver functions which have to wait for something
will cause Power_idleFunc to be called instead of doing busy wait.

* Move CC1310 platform init around

* Optimize a bit more in debug build config as the binary does not fit into 128Kb flash otherwise.

* Explicitly list each source/header file in build config. Use linker group to resolve circular dependencies.

* Ignore vscode settings.json

* Increase stacks size

* Only compile CC1310 source code if #define DeviceFamily_CC13X0

* initial commit of CC1310 RF driver with first working RX version

* Better handling of buttonUp() across platforms

* Start cleanup

* continue cleanup

* Fix bau2920 compilation

* Continue cleanup

* Fix compilation in other examples

* Fix compilation

* htons() and ntohs() only for SAMD and STM32, but not for Linux and ESP8266 and ESP32

* htons(9 and ntohs() needed for CC13x0

* Continue cleanup

* Add CC1310 platform to CI

* Fix CI

* Use more recent toolchain from ARM

* Fix travis

* Use Ubuntu Focal

* Fix toolchain for travis

* Fix package name

* Fix toolchain

* Add libstdc++-dev package

* Add newlib packages

* Remove commented commands from CI

* Fix travis

* Fix compilation of knxPython

* Clean up linefeeds

* Fix RX callback

* Move RF CRC16-DNP to bits.cpp

* Fix TX

* Optimization: do not calc CRC for block1 again in rf_data_link_layer

* Make newline optional in printHex

* Cleanup. First working version: ETS5 programming of individual address via KNX/RF coupler.

* Use LEDs and Buttons to control ProgMode and Flash Erase

* Remove settings.json (VScode)

* Add README.md

* Update README.md

* Update README.md

* Fix typo
2020-11-10 21:52:38 +01:00