Commit Graph

96 Commits

Author SHA1 Message Date
Dom
7cbc0d8fff
Merge pull request #21 from OpenKNX/features/add_rp2040_to_demo
add rp2040 to knx-demo example
2024-04-23 17:20:46 +02:00
Dom
1ef4856740
Update platformio-ci.ini
use newest atmelsam plattform
2024-04-22 13:22:15 +02:00
Ing-Dom
cacbd9f175 add rp2040 build environment to knx-demo example for both example project and ci 2024-02-26 12:40:29 +01:00
Ing-Dom
defffbd573 fix build pipeline errors
custom_hwids.py was never executed in the ci pipeline, but the missing script was just a warning. With Plattform I/O Core 6.1.11 missing scripts are errors, so the pipeline fails.
2024-01-30 10:49:26 +01:00
Matthias B
8af9121f6f
H8I8O Example (#210)
Firmware for the H8I8O that allows configuring pins as input, output or PWM output in a similar way to the original.
2022-08-15 11:27:57 +02:00
thelsing
5dc3d7666b
Update platformio.ini 2022-08-15 11:12:48 +02:00
thelsing
476d9ce57d
Update platformio.ini 2022-08-15 11:12:30 +02:00
thelsing
6631d278a0
Update platformio-ci.ini 2022-08-15 11:12:16 +02:00
thelsing
2049321071
Update platformio-ci.ini 2022-08-15 11:11:57 +02:00
thelsing
704c334ffe
Update platformio-ci.ini 2022-08-15 11:10:06 +02:00
Matthias B
8b9ff4fce1
H8I8O (#209)
* Add defines for LED, button and serial port

To make supporting different board layouts easier, this introduces some new defines:

For all platforms:
- `KNX_LED` -  the programming LED, defaults to `LED_BUILTIN`
- `KNX_BUTTON` - the programming button, defaults to `0`

For Arduino platforms:
- `KNX_DEBUG_SERIAL` - the serial port that is used for debugging, defaults to `Serial`
- `KNX_SERIAL` - the serial port used for communication with the TPUART, default depends on platform

* GD32 flash workaround

Addressing #181

At least some GD32 devices seem to require unlocking the flash twice. As the unlock function exits with `HAL_OK` if the flash is already unlocked, STM32 devices can run the same code without issues.

* Add H8I8O and H8C09 configurations to knx-demo

Addressing #181

These configurations both serve as examples for the use of these boards and other custom boards that don't use the standard pinout.

* Add STM32 unlock target

This copies the brute force unlock approach by @pavkriz into a custom target. With this commit, it is possible to automatically unlock e.g. a H8I8O board without leaving the PlatformIO IDE.

See #181
2022-06-08 21:13:34 +02:00
croghostrider
bf70e162f8
fix constant comparison (#162)
* fix constant comparison

* .
2021-12-29 17:20:46 +01:00
Sonnengruesser
87edd3dfe0
Fix callback sequence (#153)
Save-/restore callbacks need to be defined before knx.readMemory() to ensure the restore callback is called.
2021-12-13 11:17:36 +01:00
croghostrider
6254fc9b67
fix bulid (#143)
fix bulid


fix bulid


fix bulid
2021-06-14 08:10:48 +02:00
croghostrider
2450c1c458
fix ESP32 IP KNX Demo (#139) 2021-06-02 17:55:07 +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
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
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
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
2aecc213ff Rename DataSecurity enums; conflict with Wifimanager 2020-11-18 17:46:47 +01:00
thelsing
e244e0c9dd
disable esp8266 build again 2020-11-16 21:40:06 +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
80b61d2f10
Update platformio-ci.ini
Check if build of wifimanager with tagged version fails.
2020-11-16 20: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
Dominik Westner
5451235368
Nikwest (#100)
* fixed tipo: RepititionAllowed

* fixed typo: frameRecieved

* fixed typo: individualAddressDuplication

* fixed typo: induvidualAddress

* fixded Typo: InduvidualAddress

Co-authored-by: Dominik Westner <nikwest@github.com>
2020-11-09 20:20:21 +01:00
Thomas Kunze
d153825f2e fix knxPython build 2020-10-28 21:44:01 +01:00
Thomas Kunze
06e2c11d96 clean up visual studio files and add root cmake 2020-10-28 21:35:24 +01:00
Thomas Kunze
f677897337 Merge commit 'f34e604d3b4bee5339ec4e9c9f36619b17f52e32' as 'examples/knxPython/pybind11' 2020-10-28 21:09:58 +01:00
Thomas Kunze
54e3f6cb12 remove pybind11 to readd as subtree 2020-10-28 21:09:35 +01:00
Nicolas Robadey
241e04330d
Datapoints ending in .0 are invalid (#91)
Change the datapoints types to 1.1, 1.2 or 1.3 to match the requirements (no dpt *.0) in dpt.cpp
2020-09-29 12:46:09 +02:00
nanosonde
aabc61dc3b
Add UART support for Linux platform to use TP1 KNX transceivers (#88)
* Add inital serial port support for Linux platform

* Add missing print implementation for uint64_t and enable mask 07B0 for Linux platform using TPUART

* Create executable per mask

* Add one executable per mask for coupler
2020-09-11 13:32:29 +02:00
nanosonde
77a796a39c
Add coupler support (#79)
* save work.

* save work

* save work

* save work

* save work

* Remember which interface received the cemi frame

* save work

* save work

* save work

* Use default value from PID_ROUTING_COUNT

* Add simple alternative to std::function without smart pointers or move semantics

* Remove include

* Add more comments about cleanup

* save work

* Remove forgotten code.

* Move crc16Ccitt to bits.c as it also used for PID_MCB

* save work

* move comment

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* derive from TableObject instead of InterfaceObject

* save work

* save work

* Fix wrong pointer arithmetic in TableObject

* Filter table setting/clearing

* move comment

* save work

* save work

* save work

* handle SBC on closed media

* save work

* move coupler example to different dir

* Restore device example for linux

* save work

* Remove MEDIUM_TYPE and use MASK_VERSION

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* Replace MEDIUM_TYPE by MASK_VERSION

* Remove adafruit/travis-ci tests

* Disable travis ci cache for platformio

* Fix missing changes

* Fix cemi server and add missing MASK_VERSION definitions

* Enable platformio caching on travis ci again

* Handle device address update for routing decision

* source address is set in network layer and not in data link layer

* Add remaining APCI types that are used with system broadcast

* Add debug print for routing

* Remove simple_functional

* Fix CMakLists.txt

* Use MASK_VERSION to conditionally compile code.

* Remove fixed version reuqirement from platform esp8266

* Add demo-coupler for MCUs

* Remove simple_functional.h from demo knx-linux

* Enable CI for coupler demos

* Correct path for knx-linux-coupler

* Fix knx_facade.h

* Refactor NetworkLayer to use getInterface() for devices and getPrimaryInterface(), getSecondaryInterface() for couplers

* Add platformio configs for other currently possible mask/platform combinations

* Add class diagrams and remove obsolete includes

* Add some minimal docs
2020-09-06 21:41:34 +02:00
nanosonde
96884f768e
Add support for KNX data secure (#66)
* initial comic

* save work

* Handle SystemBroadcast and Broadcast for TP and IP

* Rework

* Fix comment

* save work

* save work

* save work

* save work

* save work

* Restore old broadcast structure

* Readd systembroadcast methods

* Make sure that services from SystemBroadcast are also available from Broadcast on closed media

* save work

* Save work

* save work

* Save work

* save work

* save work

* save work

* save work

* save work

* Change maximum number of elements for the key tables, etc.

* save work

* First working seqno sync with ETS

* save work

* save work

* save work

* save work

* save work

* save work

* Remove magic value and add comment

* save work

* Extend restart and masterreset for factory reset

* save work

* First working secure broadcast mode with IA programming

* Add FunctionPropertyExt* AL services

* Fix FunctionPropertyExt*. Working T_DATA_CONNECTED with FunctionPropertyExt*.

* Add PropertyValueExt* AL services. Handle master reset in AL service RESTART.

* Fix FunctionPropertyExtStateRead, fix restart. MILESTONE: Working physical programming of IA and toolkey with confirmed restart. Reading deviceinfos working.

* Handle PDT_CONTROL in FunctionPropertyExt*

* Fix FunctionPropertyExt* and FunctionProperty for PDT_CONTROL

* Change comment.

* save work

* save work

* Add group object security handling

* Move map to own file

* use simple_map

* Include simple_map.h in CmakeFile

* Move code from header to source file

* Remove obsolete code

* MILESTONE: working programming of secure device with IA and tables

* cleanup

* bugfix

* flashSize must be big enough. Security IF object contains a lot more data.

* Merge master into feat_datasecure

* Revert "Merge master into feat_datasecure"

This reverts commit 0c8358692a.

* Revert "Revert "Merge master into feat_datasecure""

This reverts commit aa59253785.

* Bugfixes

* cleanup

* cleanup

* Add printing of uint64_t

* Don't compile secapplayer if data secure not enabled

* pin platform for ESP8266 to specific version

* SecIfObject: save/restore required for persisting STATE. Bugfix: use correct PID for group key table

* Cleanup comment and debug output

* Further cleanup.

* Refactor master reset

* Remove unused IP data link layer test code

* Only reset TOOL kkey to FDSK on factory reset

* Modify .gitignore and remove vscode config file

* Correct comment

* Handle SBC flag (systembroadcast) in SCF field. Couplers between open and closed media need this.

* Remove code that slipped in.
2020-07-06 19:16:54 +02:00
Thomas Kunze
f450d87d05 refactor RfMediumObject to use properties 2020-06-24 23:03:12 +02:00
nanosonde
cadc6c6124
Refactor broadcast/systembroadcast (#62)
* Add missing source files

* Fix comment

* Refactor Broadcast/SystemBroadcast

* Add empty confirm methods

* Remove unclean solution to suppress warning about unsed var

* Restore old structure

* Fix issues

* Add more missing source files

* Make sure that services from SystemBroadcast are also available from Broadcast on closed media

* Make sure that sent broadcast/systembroadcast frames are always marked as broadcast frames on closed media
2020-06-09 21:06:13 +02:00
nanosonde
31319a690b
Fix travis build (#56)
* Disable knx-usb example

* Update python to 3.8

* Enable knx-usb example

* Update to Arduino 1.8.11

* Pin to version 1.8.11

* Use python 3.7

* Use python 3.8 and fix path

* Fix paths and remove obsolete stuff

* Add lib Wire to deps.

* Use Adafruit TinyUSB lib version 0.7.1
2020-05-07 19:35:10 +02:00
Thomas Kunze
1465cb558c split USE_USB from USE_CEMI_SERVER 2019-12-28 09:54:02 +01:00
Thomas Kunze
e2fd20ab9a implement knx-ip searchresponse 2019-12-28 00:29:17 +01:00
Thomas Kunze
6ae000482f - add some knx-ip classes
- return no data if Property has no elements
- implement get{ipAddress, netmask, defaultGw, macAddress) for linux platform
2019-12-27 02:06:10 +01:00
Thomas Kunze
d3d95f1185 add object for routing indication packet 2019-12-22 17:31:33 +01:00
thelsing
337e5bd3a5
Update CMakeLists.txt 2019-12-18 22:58:45 +01:00
thelsing
68ab5ed2e0
Update CMakeLists.txt 2019-12-18 22:51:32 +01:00
nanosonde
1f5056325b Improve CI (#49)
* Add platformio config for knx-demo example for SAMD, ESP8266 and ESP32
2019-12-17 17:32:50 +01:00
nanosonde
1d01317845 Travis knx usb (#48)
* Update .travis.yml

* Update platformio.ini

* Update .travis.yml

* Fix compilation

* Change platformio config

* Try to fix travis build

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* save work

* Add new pio config for CI

* save work

* save work

* save work

* save work

* Try to fix CI run for example knx-linux

* Fix compilation

* Try to fix ESP8266 compilation

* Do not enable cEMI server per default. Is only enabled during platformio build externally
2019-12-16 19:52:10 +01:00
Thomas Kunze
515d18fdbf fix property save 2019-12-12 22:47:54 +01:00