-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add KNX Protocol support #2402
Add KNX Protocol support #2402
Conversation
v5.12.0j - Add Sunrise/set timer option
Update Master
Sync with Tasmota Repo
update master
Sync with Tasmota
update from tasmota
Hi, I'm testing on Platform.io and have the same output. I found on http://docs.platformio.org/en/stable/librarymanager/ldf.html#ldf-mode that PIO don't check for preprocessor conditional syntax. I tried the This platform.io bug is explained on platformio/platformio-core#801 (comment) Will continue looking for a workaround... |
Found a solution!!!!! on sonoff_post.h just change to:
Now compiles 👍 This don't use extra KB. The normal tasmota without any line that includes <esp-knx-ip.h> and the one with this change are equal in size. |
Platform.io Build Problem Fixed
Tested on Arduino and Platform.io. Now, in both systems it compiles and works, and in both options:
and
|
Well done 👍 and thnx for the kudo too ;-) You earned it just as much. Just tested it and it seems to compile fine. Will now continue with sensor integration. |
Released. Pls add your info to the wiki and close this one so if you have any updates to the released version it makes things easier to find. |
Heya, i get this issue with platformIO now:
With disabled KNX: EDIT2: |
Hi, Yes, both libraries now requires version 2.4.0 of the esp8266 board libraries. Will not compile under 2.3.0 as explained on the libraries readme files: It is needed to update the esp8266 board libraries as explained here |
Made the PR #2487 to update Tasmota ReadMe with this requirement for compiling. |
Added KNX on the wiki |
2.4.0)
coming 2.4.1)
I would suggest to get 2.3.0 still working without KNX. I just commented out some lines in the lib to get it compiled, but this is a dirty fix :X |
Hi, I'm downgrading the esp-knx-ip library to use 2.3.0 so KNX will run on 2.3.0 I will make the PR soon The fix will be just: Delete ESPAsyncUDP library No other change will be needed. And everything under ESP8266 v2.3.0 |
no way around to check if knx is commented in and only load the lib than? would w8 for theos feedback maybe he got an idea. |
PR #2492 to:
Compiled and Tested under 2.3.0 with and without |
Released just now. |
@ascillato |
Hi, Thanks 👍 For achiving this KNX support, I have a lot of help from several persons including also you (@sisamiwe) and Nico (@envy) (https://github.com/envy/esp-knx-ip). Some features of the KNX Library were modified by Nico so as to be used like in here. Now, with this driver, there is just a basic KNX IP support. With this KNX driver you can control relays and send buttons press, communicating device to device. It works, but there are some other needed features to be integrated and to be improved on both, Tasmota KNX Driver and ESP-KNX-IP Library that we are working on. After that, I will take a look at ESPEasy but will take me some time as I have to learn how that software work first. Again, Thanks a lot and stay tunned for coming updates! |
5.12.0m * Reinit timers to accomodate random window (arendst#2447) * Add random window to timers (arendst#2447) * Add optional KNX IP Protocol Support (arendst#2402)
5.12.0m * Reinit timers to accomodate random window (arendst#2447) * Add random window to timers (arendst#2447) * Add optional KNX IP Protocol Support (arendst#2402)
Sonoff-Tasmota KNX
Sonoff-Tasmota_KNX is a modification for Sonoff-Tasmota to add a basic functionality of the KNX IP Protocol.
KNX Explanation
The KNX IP Protocol is an international open standard for smart homes and smart buildings automation. It is a decentralized system. Each device can talk directly to each other without the need of a central controller or server. Any panel or server is just for telesupervision and for sending requests. KNX IP Protocol uses a UDP multicast on 224.0.23.12 : 3671, so there is no need for a KNX Router unless you want to communicate to KNX Devices that are not in the WIFI Network (Twisted Pair, RF, Powerline).
Each device has a physical address (like a fixed IP) as 1 . 1 . 0 and that address is used for configuration purposes.
Each device can be configured with group addresses as 2 / 2 / 1 and that address can be used for sending/receiving commands. So, for example, if 2 devices that are configured with the 2 / 2 / 1 for turning on/off their outputs, and other device send Turn ON command to 2 / 2 / 1, both devices will turn on their outputs.
Integration
Several home automation systems have KNX support. For example, Home Assistant has a XKNX Python Library to connect to KNX devices using a KNX Router. If you don't have a KNX Router, you can use a Software KNX Router like KNXd on the same Raspberry Pi than Home Assistant. KNXd is used by Home Assistant for reading this UDP Multicast, although KNXd has other cool features that need extra hardware like connect to KNX devices by Twister Pair, Power Line or RF.
If you use the ETS (KNX Configurator Software) you can add any Sonoff Tasmota KNX as a dummy device.
Requirements
A copy of both libraries is available at:
Usage Examples
There are multiple possible configurations. Here are explained just a few as example. The options for selecting relays, buttons, sensors, etc. are only available if were configured on Configure Module Menu.
To configure KNX, enter on the Configuration Menu of Sonoff-Tasmota and select Configure KNX.
1) Setting Several Sonoff to be controlled as one by a Home Automation System:
We can set one of the group address to be the same in all the devices so as to turn them on or off at the same time.
In this case, so as to inform the status of all the relays to the Automation System, just one of the devices have to be configured as the responder. If you use the same Group Address for sending and receiving, you have to take into account not to make loops.
DEVICE 1
DEVICE 2
2) Setting 2 Sonoff to be linked as stair lights:
We can set one device to send the status of its output and another to read that and follow. And the second device can send the status of its button and the first device will toggle. With this configuration we can avoid to make a loop.
DEVICE 1
DEVICE 2
3) Setting a button as initiator of a scene:
Just setting one device to send the push of a button, and the rest just use that value to turn them on. In this case, there is no toggle. Every time the button is pushed, the turn on command is sent.
DEVICE 1
DEVICE 2
4) Setting a Temperature sensor:
We can configure to send the value of temperature or humidity every teleperiod. This teleperiod can be configured. See Sonoff Tasmota wiki. It is recommended also to set the reply temperature address.
Development Road Map
For Sonoff-Tasmota_KNX:
Modifications to Sonoff-Tasmota
#define USE_KNX
on /sonoff/user_config.hUp to now, enabling KNX uses +23k of code and +3k3 of memory.
There is NO CONFLICT with MQTT, Home Assistant, Web, etc. Tests show fast response of all features running at same time.
Contributors