Willkommen im Loxone Community Forum. Um alle Funktionen nutzen und sehen zu können, registriere dich bitte zuerst. Dies gilt auch für das herunterladen von Dateien.
I'm struggling with polling some data from my Schneider Smartlink system. I currently poll voltage and current data in float32 datatype. But the total energy is int64 datatype.
I try to set up 4x int16 registers and combine the results via a formula, but none of the registers are getting data. This solution is working just fine with openhab2 system, but not on the loxone :S
Anyone have an idea of a solution?
Thanks for the formula. I'm sure you've tried multiple combinations, but the attached is what worked for mine (albeit just the first 32bits). This also converts Wh to kWh to avoid using a formula block (using Correction 1000 to 1).
Have you tried address 3256 and 3258 just to check where the modbus offset might be? Also un-check 'Byte order' and try with a check against 'Combine 2 registers'.
you seem to be the Modbus Specialist of this forum. I´ve read many entries of you, all very useful. Thanks a lot for your support to anyone.
I now have a similar question like the one above, but it seems that since year 2018 some Modbus settings in Loxone have changed.
I need to read a sensor value of my Alfen Wallbox (EV-charger) .
Start Adress: 374
End Adresss: 377
Number of 16 Bit Registers: 4
Read or Write: R
Data Type: Float 64
step size & units: 1 Wh
64 Float data type is not available in Loxone.
You suggest to devide it into 4x16 bit.
Which Data type in Loxone do i need to use.? 16 Bit unsigned integer???
Can you maybe educate me and tell me the meaning behind the numbers (284174976710656.... ) you are calculating in your formula.
Maybe there is in the meantime an easier way available to solve my problem?
Thanks for the kind words. To briefly explain the meaning behind the numbers -
I1, I2, I3 and I4 represent the components of a single value spread across 4 modbus registers. In this case it is the Lifetime Energy Production of a new inverter and the value is still small. It's only filling up the last two registers (the smallest end of the value).
The maximum value of a 16bit binary number is 65535 (Binary 1111111111111111). Similar to how we count in decimal (ie. 999 to 1000), when we get to the maximum binary value, all the bits go to zero and the 17th bit goes to 1. The input I4 is the first 16 bits and represents the 'least significant' end of the value.
65536 = 10000000000000000 (16 zero's)
So the next 16 bits (I3) represent how many times we've counted through 65535. And on it goes through the bigger end of the value for the rest of the 16bit registers.
65536 multplied by 65536 = 4,294,967,296 (which is the number we're multplying I2 by).
4,294,967,296 multiplied by 65536 = 281,474,976,710,656 (which is the number we're multplying I1 by).
What I've written above is probably the most basic way binary can be used to represent a value. Your Float 64 data type is a different way to interpret the 64 bits, significantly different to the above.
You need to use 16bit unsigned integer as a starting point. That will produce 4 decimals values in Loxone that will then need to be decomposed back to their basic bits.
This thread below starting at Post #13 is a starting point. You should consider that what you have is 64bits (divided into 4 x 16bits) that need to be re-arranged in this order -
Hallo Leute,
ich bekomme über einen HTTP-Eingang folgenden Quellcode geliefert.
{"cid":-1,"data":{"value":"0001FC000008FF000002FF000157FF000022FF03"},"code":200}
Hierbei handelt es sich um einen Sensor, welchen ich über einen IO-Link Master ( IFM AL1350 ) auslese.
Es
Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.
Hi Tico, I had trouble with my Alfen Wallbox and an Alfen support guy replaced the Connection Board today. Will be able to test everything in 1-2 days. Will get back to you asap.
Thanks a lot for your support so far!
sorry for replying late.
I was only now able to test your setting.
a) Register Setting = 373 (your request) generated value = nan-nan; you might have mixed "373 with 374", See post No 6
b) Register Setting = 374 (Register based on Wallbox documentation) generated value = 3460759,000
all direct value reading, without formula behind.. Setting = 64 double instead of in Loxone not existing "Float 64".
Is there a way to further work with the "64 bit double" to get correct kWh value?
Zuletzt geändert von MaxMoritz; 27.07.2024, 15:49.
Hello MaxMoritz. I’m away from the computer for the next week. In the interim, do you know the expected kWh value that should be returned? That will help correlate what is presented by Loxone versus what needs to be modified.
Can you also try different variations on the properties of the analog sensor. ie. -
1. 16-bit register and Order of Registers checked, then the corresponding value returned,
2. 16-bit register, Order of Registers and Byte Order all checked, then the corresponding value returned.
3. 16-bit register and Byte Order checked, then the corresponding value returned.
4. Nothing checked, then the corresponding value returned.
In all cases, also provide the expected kWh value that should be returned if you know it.
based on your comment, I have now tried different configs and I think we are getting closer to the solution.
see results in attached *.pdf below
The correct setting is most probably the one at the end, I need to divide the value by 1000 later using the divider function in Loxone.
Thanks again for your help. It was great!
May I contact you for 2 more topics about Modbus via Loxone?
Hello Tico ,
If I may ask you for an advice again. here is the first one of my 2 additional problems mentioned in post #10.
I have created the following sensors according to the register settings defined by the wallbox provider Alfen. Strangely, I get the values of the individual phases displayed for one sensor, but not the total.
With another sensor, it is exactly the opposite. I don't see the phase values, but I do see the total.
What does the result mean: nan-> nan? How do I get real values instead of this nan -> nan
Dear Tico
thanks for replying and explaining „nan“ meaning.
yes, problem still exists, wasn’t able so far to receive correct values.
i, ve checked again the data type in the original modus register listing.
All 4 values (Single phases 1-3 and the corresponding sum do have same data-type), so I do not have an explanation why I am getting „nan“ return.
see orinigal settings
I can't see anything obviously wrong with your settings. A possible reason for the NaN value is that the device is being overwhelmed with the rate of requests at those particular registers.
I suggest setting every sensor in Loxone relevant to the Alfen charger to a consistent polling interval. Perhaps start with 30 seconds polling cycle and see whether that makes a difference.
Ich spreche kein Deutsch. Gib Google Translate die Schuld, wenn ich unverständlich bin.
Wir verarbeiten personenbezogene Daten über Nutzer unserer Website mithilfe von Cookies und anderen Technologien, um unsere Dienste bereitzustellen, Werbung zu personalisieren und Websiteaktivitäten zu analysieren. Wir können bestimmte Informationen über unsere Nutzer mit unseren Werbe- und Analysepartnern teilen. Weitere Einzelheiten finden Sie in unserer Datenschutzrichtlinie.
Wenn Sie unten auf "Einverstanden" klicken, stimmen Sie unserer Datenschutzrichtlinie und unseren Datenverarbeitungs- und Cookie-Praktiken wie dort beschrieben zu. Sie erkennen außerdem an, dass dieses Forum möglicherweise außerhalb Ihres Landes gehostet wird und Sie der Erhebung, Speicherung und Verarbeitung Ihrer Daten in dem Land, in dem dieses Forum gehostet wird, zustimmen.
Kommentar