Closed peterphilipp closed 6 months ago
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, it would be great if someone could look into that issue...
Hi I looked at the code and I can confirm that all energy related measures are sent as 4-bytes float (Voltage, Current, Power, PowerFactor, as well as Energy Yesterday, Daily, Total)
I see also in your screen shot that when float datapoint type is selected, you get the correct values which is expected given the above comment.
What I don't get is where you get that from : "Wh" are supposed to be sent with the datatype 13.010" Can you please point to the proper specifications ?
Ok, so this document seems to confirm what you are saying: https://support.knx.org/hc/en-us/articles/15392604906514-Interworking-Datapoint-types
@arendst it looks like that in order to be compliant with the standard, answer for Energy yesterday, Daily, Total should be changed from knx.answer_4byte_float()
to knx.answer_4byte_int()
with appropriate scaling to provide in Wh instead of kWh in order no to loose resolution
What do you think ? I can do the PR but I have no way of testing
Thx for diving in. Yes, no problem with a PR.
... if needed I can perform some tests this weekend.
Hi @peterphilipp @Noschvie I'll prépare a test version tonight or thursday
Does anyone knows about simple (and free) KNX debug tool that would display KNXnet/IP datagram ? Something like MQTT explorer but for KNX ? Doesn't need to be GUI, command line is fine too May be Wireshark has a KNX décoder ?
I know nothing here, except that Google can lead to interesting results, like searching for wireshark knx. The page about Wireshark Display Filter Reference mentions filters knx and kip, depending on before/after 3.0.0.
Does anyone knows about simple (and free) KNX debug tool that would display KNXnet/IP datagram ? Something like MQTT explorer but for KNX ? Doesn't need to be GUI, command line is fine too May be Wireshark has a KNX décoder ?
Hi, I use this nodered node to debug my KNX Bus: https://flows.nodered.org/node/node-red-contrib-knx-ultimate
Hi, thank you for your effort! Please tell me if I can help with the tests...
Hi @peterphilipp Could you please provide me with a screen shot of your KNX configuration page ? Just to be sure as I'm not a KNX user Thanks
First quick test For now my PC is unable to get anything on the multicast group wether using Wireshark or nodered... May be a wifi configuration problem regarding multicast
If you can try in the meantime, here is a zip witha tasmota-knx.bin.gz inside tasmota-knx(test1).zip I'll try again tomorrow evening
Hi, here are my nodered KNX configuration node settings:
I could not the version, the upgrade by file upload failed with this error message:
@peterphilipp you have to upload the minimal version before. barbudor requested the Tasmota KNX configuration page.
Using these settings for tests:
Ah, sorry, this is the Tasmota Configuration Panel:
The Upload still does not work even after downgrading to the minimal version. I am still getting the same error message.
$00000023 => 35 Wh
I setup 2 plugs, the first one connected to an TP Link Archer router, and the 2nd one to an Xiaomi router. Boht used as simple AP, not routers. I can't receive the one connected to the TP-Link but I can receive the one connected to the Xiami router I haven't been able to find a setting related to IGMP in neither of those but it seems to be natively supported in the Xiaomi router
I haven't been able to get the NodeRED KNX Ultimate to work because my NodeRED is in a docker and apparently multicast to/from docker is not simple
I'm looking forward the results of your tests
@barbudor want to test your changes with an ESP32c3 (Athom Plug V3). How did you change the code casting float to uint32?
knx.answer_4byte_float(msg.received_on, Energy->yesterday_sum);
Thanks!
See the changes in the draft PR here https://github.com/arendst/Tasmota/pull/21074/files
I just made a refactoring around KNX enhancement
Hi, I did some tests, and it looks great:
From my point of view, the test is a success. That is a great help for a further homeassistant integration! Thanks...
Waiting for @Noschvie tests on C3 to move the PR from draft to read-for-review
@barbudor suggest to use round() for "1000.0 * " like this
round(1000.0 * Energy->yesterday_sum)
using round will provide the same value as over MQTT.
16:42:46.968 MQT: tele/tasmota_F982B0/SENSOR = {"Time":"2024-03-31T16:42:46","ENERGY":{"TotalStartTime":"2024-03-09T11:00:02","Total":0.152,"Yesterday":0.060,"Today":0.092,"Period":0,"Power":0,"ApparentPower":0,"ReactivePower":0,"Factor":0.00,"Voltage":237,"Current":0.000}}
the value for "Voltage" should be the same as for MQTT, maybe rounded in both cases?
Thanks for the PR!
In your example, MQTT voltage is rounded because you have chosen VoltRes 0
, so round()
is not a good solution for user who chose a different VoltRes
For Energy, it's controlled by EnergyRes
but based on kWh, not Wh
Let me think if I can find something smart there without increasing the code base
For MQTT this is done in ext_vsnprintf_P()
while building the JSON string
Note that applying rounding on floats may not provide the same result neither
So for Energy, hte highest value is EnergyRes 3
which give the Wh resolution
I can do round()
but if anyone use EnergyRes 0, 1 or 2, then value won't match
Still it make sense
For Volt/Amp/Watt/Temp/Hum, there no easy way so I'll leave as it for now
... understand and ok for me, thanks again!
Since this commit, the whole KNX configuration is lost after reboot when configuring a DHT11 sensor as KNX Source.
I.E : Configure 2 GA
13:06:06.021 HTP: Configure KNX
13:06:06.023 KNX: Enabled: 1, Communication Enhancement: 0
13:06:06.024 KNX: Physical Address: 0.2.178
13:06:06.026 KNX: GA: 2
13:06:06.027 KNX: GA #1: KNX TX 1 to 0/6/110
13:06:06.029 KNX: GA #2: KNX TX 2 to 0/6/111
13:06:06.030 KNX: CB: 0
13:06:06.031 HTP: Configuration
Configuration is still present after reboot
Adding 2 GA for Temperature and Humidity sensors
13:10:29.454 HTP: Configure KNX
13:10:29.456 KNX: Enabled: 1, Communication Enhancement: 0
13:10:29.458 KNX: Physical Address: 0.2.178
13:10:29.460 KNX: GA: 4
13:10:29.461 KNX: GA #1: KNX TX 1 to 0/6/110
13:10:29.462 KNX: GA #2: KNX TX 2 to 0/6/111
13:10:29.464 KNX: GA #3: Temperature to 0/6/106
13:10:29.466 KNX: GA #4: Humidity to 0/6/107
13:10:29.467 KNX: CB: 0
13:10:29.468 HTP: Configuration
This configuration works as expected until reboot .
13:12:17.924 KNX: Temperature sent to 0/6/106
13:12:17.930 KNX: Humidity sent to 0/6/107
13:12:17.938 RSL: SENSOR = {"Time":"2024-04-10T13:12:17","DHT11":{"Temperature":1.2,"Humidity":3.0,"DewPoint":-38.0},"TempUnit":"C"}
After reboot, All KNX configuration is lost except the physical address
13:15:21.965 HTP: Configure KNX
13:15:21.968 KNX: Enabled: 1, Communication Enhancement: 0
13:15:21.970 KNX: Physical Address: 0.2.178
13:15:21.972 KNX: GA: 0
13:15:21.973 KNX: CB: 0
13:15:21.975 HTP: Configuration
I've done the same test with the previous code from the master
branch (v13.4.0) and the configuration is persistant.
Hello @pbrinette Could you please kindly open a new Issue ? Please provide logs at reboot with at least loglevel 3 or 4 I'm not sure I have a DHT11 to test, I will see what I can do
PROBLEM DESCRIPTION
Hello,
I am trying to send "Energy Total" to the KNX Bus with my NOUS A1T plug.
Looking at the KNX specs "Wh" are supposed to be sent with the datatype 13.010 (which is 4 x 8-bit 2's complement -> https://support.knx.org/hc/en-us/articles/115001133744-Datapoint-Type).
But sending that measure to a group address with that data type produces completely wrong numbers on the KNX BUS. Only when I change the group address to 32-bit float data type like 14.056 for "W" the numbers are correct, but are not shown with the correct unit for example in Home-Assistant.
Is this a bug or by design? How can I change the data type that is sent to the bus in Tasmota. I cannot find anything in the documentation. Thanks for your help, great project!
Peter
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Status 0
:TO REPRODUCE
Steps to reproduce the behavior: Looking at the KNX specs "Wh" are supposed to be sent with the datatype 13.010 (which is 4 x 8-bit 2's complement -> https://support.knx.org/hc/en-us/articles/115001133744-Datapoint-Type).
Sending Wh that measure to a group address 13.010 with that data type produces completely wrong numbers on the KNX BUS. Only when I change the group address to 32-bit float data type like 14.056 for "W" the numbers are correct, but are not shown with the correct unit for example in Home-Assistant.
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen. Show correct Numbers on the KNX Bus for Wh with the datatype 13.010.
SCREENSHOTS
If applicable, add screenshots to help explain your problem. Screenshot for Data Type 14.056 in ETS
Screenshot for Data Type 13.010 in ETS
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)