Comments (17)
My idea was to handle the conversions by the different datapoint-types. So the average user doesn't have to deal with the lower level bits and bytes.
This way, the main program can expect 26,3
when reading outsideTemperature
instead of 0x0107
.
from vitowifi.
Then I seem to have a new one. My "JAZ" reading, now being read as
VitoWifi.addDatapoint("JAZHeizen", "boiler", 0x1681, MODE);
needs to be divided by 10.
Reading now is 49, it should be 4.9
from vitowifi.
So it is a temperature, 1 byte, unsigned, factor 10?
from vitowifi.
No temperature. Efficiency factor. Not sure about the number of bytes.
from vitowifi.
aha, COP (coefficient of performance). Will implement this evening if time allows.
from vitowifi.
Please check with COP-datapoint branch.
from vitowifi.
Will do. Give me some days. Thanks.
from vitowifi.
The data point is working. The transformation is OK, but there is an issue with the nack. When it hits its first nack, all subsequent reads fail. I think I debugged this already. Let me look...
In the meantime , here is the log.
boottt..
Seri⸮
Connecting to MNET
.....
WiFi connected
IP address:
192.168.1.38
Setup finished...
Attempting MQTT connection...connected
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
READ 41050001010d0216
ack
RCV 41070101010d02e60100
ack
DP boilertemp succes
boiler - boilertemp: 48.6
READ 410500010101020a
ack
RCV 41070101010102a300b0
ack
DP outsidetemp succes
boiler - outsidetemp: 16.3
READ 41050001010a0213
ack
RCV 41070101010a02b603cf
ack
DP vorlauftemperatur succes
boiler - vorlauftemperatur: 95.0
READ 410500010113021c
ack
RCV 41070101011302b603d8
ack
DP Speichertemperatur succes
boiler - Speichertemperatur: 95.0
READ 4105000120000228
ack
RCV 41070101200002dc0007
ack
DP RaumtemperaturSoll succes
boiler - RaumtemperaturSoll: 22.0
READ 4105000120010229
ack
RCV 41070101200102b400e0
ack
DP RedRaumtemperaturSoll succes
boiler - RedRaumtemperaturSoll: 18.0
READ 410500012022024a
ack
RCV 41070101202202d2001f
ack
DP PartyRaumtemperaturSoll succes
boiler - PartyRaumtemperaturSoll: 21.0
READ 410500012006022e
ack
RCV 41070101200602000031
ack
DP HeizkennlinieNiveau succes
boiler - HeizkennlinieNiveau: 0.0
READ 410500012007022f
ack
RCV 41070101200702050037
ack
DP HeizkennlinieSteigung succes
boiler - HeizkennlinieSteigung: 0.5
READ 410500011680019d
ack
RCV 410601011680012fce
ack
DP JAZgesamt succes
boiler - JAZgesamt: 4.7
READ 410500011681019e
ack
RCV 4106010116810130d0
ack
DP JAZHeizen succes
boiler - JAZHeizen: 4.8
READ 410500011682019f
ack
RCV 410601011682012acb
ack
DP JAZWW succes
boiler - JAZWW: 4.2
READ 41050001169001ad
ack
RCV 4106010116900100af
ack
DP COPHeizen succes
boiler - COPHeizen: 0.0
READ 41050001169101ae
ack
RCV 4106010116910100b0
ack
DP COPWW succes
boiler - COPWW: 0.0
READ 410500010500020d
ack
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
nack, timeout
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
READ boilertemp
READ outsidetemp
READ vorlauftemperatur
READ Speichertemperatur
READ RaumtemperaturSoll
READ RedRaumtemperaturSoll
READ PartyRaumtemperaturSoll
READ HeizkennlinieNiveau
READ HeizkennlinieSteigung
READ JAZgesamt
READ JAZHeizen
READ JAZWW
READ COPHeizen
READ COPWW
READ EinschaltungenVerdichter
from vitowifi.
thanks for testing. Let's continue the NACK discussion in #29
from vitowifi.
Closing after #34
Feel free to reopen.
from vitowifi.
So sorry to bother again, but I found some more divide-me-by-10 values.
Its the energy consumption. The weekly values are stored in COUNTS DPs , the annual vaules in COUNTL. CONTS I can replace with the new COP datatype but COUNTL still needs a matching /10 counterpart.
Maybe the the /10 DPs should be called COUNTSby10 or so because they are no COP in this case...
from vitowifi.
Let's think about a generic naming scheme:
Len_Factor_ReturnType like in the code itself?
So you could have a type
2_Div10_F
--> 2 bytes, division by 10 returning a float
1_Div10_F
--> 1 byte, division by 10 returning a float
4_NoConv_UL
--> 4 bytes, no factor returning an unsigned long (uint32_t)
...
Another option would be to just expand the list and add aliases where possible (TEMPS == MODE, COP == E_WEEK or something)
Do you have other idea's?
from vitowifi.
I would propose to add a scaling parameter or a pointer to conversion function to the datapoint.
As for the naming... if it would stick to C convention it would be more self explainatory. An example:
COUNTS -> uint16_DP
COUNTL -> uint32_DP
TEMP -> float_DP
STAT -> uint8_DP or even bool_DP
HOURS ->uint16_DP with factor 1/3600
COP -> uint_16_DP with factor 0.1
in the code that would look like this:
VitoWifi.addDatapoint("RaumtemperaturSoll ","boiler", 0x2000, float_DP, 1);
VitoWifi.addDatapoint("COPWW", "boiler", 0x1691, uint16_DP, 0.1);
Think of the factor as belonging to the address. Just like the data type does.
from vitowifi.
I had them combined because (for example) you cannot return an int after dividing --> always float. Furthermore, it simplifies the logic.
But your proposal is doable. Also, in your proposal it is far more clear to the user what type is returned.
I would invert the factor though: 0.1 is 10. Otherwise you'd had to write 0.000278 if you mean 3600
from vitowifi.
I was a bit busy lately, but back in business! I also did some thinking while I was working on another project.
Expect some updates in the very near future.
from vitowifi.
The v1.0.0-alpha release (v1 branch) supports custom datapoints.
When there's a need to add conversion factors it should be possible without hacking into the code.
Closing this issue. Feel free to reopen should there be a need to.
from vitowifi.
Will try asap. Thanks.
from vitowifi.
Related Issues (20)
- Return type of _readDatapoint and _writeDatapoint HOT 1
- Compilation error at Datapoint.hpp HOT 1
- EOL for message "queue full" HOT 1
- "Betriebsart" as example delivers always "0" HOT 4
- DPCoP and group HOT 1
- 8 Byte read extension with uint64_t brings inconsistent results HOT 30
- VitoWiFi.readDatapoint() only on MQTT request HOT 5
- Serialmonitor "chksum 0x2d" HOT 4
- Blocking after 6 hours HOT 3
- Errors on high MQTT request rate HOT 9
- Keine Verbindung mit ESP32 über USB-Host möglich HOT 3
- Wemos D1 mini / Serial-Pins HOT 7
- Example for DPRaw HOT 2
- Can you explain a bit more how to install the library in Arduino IDE 2.0? HOT 4
- Queue full without any connection
- VitoWiFi 2.0 Debug funcionality HOT 7
- Solved: Vitocal300 WO1B does not start with VitoWifi attached HOT 4
- Vitoconnect passthrough HOT 12
- Up-to-date library version on PlatformIO HOT 3
- Cannot compile HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitowifi.