Skip to content
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

TX22 (wind,rain,temp,hum)... #1

Open
njordan77 opened this issue Aug 19, 2018 · 3 comments
Open

TX22 (wind,rain,temp,hum)... #1

njordan77 opened this issue Aug 19, 2018 · 3 comments

Comments

@njordan77
Copy link

njordan77 commented Aug 19, 2018

Hi, thanks for your effort and development done...

Is there a chance that you are also trying to support TX22....its already implemented in the LaCrosse-LaCrosseITPlusReader code (fhem).

Packets look like this....

`
#include "TX22IT.h"

/*
TX22-IT 8842 kbps 868.3 MHz

Message Format:
SSSS.DDDD DDAE.LQQQ TTTT.VVVV VVVV.VVVV ... CCCC.CCCC
Data - organized in nibbles - are structured as follows (example with blanks added for clarity):
a 5a 5 0 628 1 033 2 000 3 e00 4 000 bd

data always starts with "a"
from next 1.5 nibbles (here 5a) the 6 msb are identifier of transmitter,
bit 1 indicates acquisition/synchronizing phase
bit 0 will be 1 in case of error
next bit is the low battery flag
next three bits (here 5) is count of quartets transmitted
up to 5 quartets of data follow
each quartet starts with a type indicator (here 0,1,2,3,4)
0: temperature: 3 nibbles bcd coded tenth of °C plus 400 (here 628-400 = 22.8°C)
1: humidity: 3 nibbles bcd coded (here 33 %rH)
2: rain: 3 nibbles, counter of contact closures
3: wind: first nibble direction of wind vane (multiply by 22.5 to obtain degrees, here 0xe*22.5 = 315 degrees)
next two nibbles wind speed in m/s
4: gust: speed in m/s
next two bytes (here bd) are crc.
During acquisition/synchronizing phase (abt. 5 hours) all 5 quartets are sent, see example above. Thereafter
data strings contain only a few ( 1 up to 3) quartets, so data strings are not always of equal length.

                |--- acquisition/synchronizing phase
                ||-- Error
    "A"  -Addr.-|| Nbr.Q
    SSSS.DDDD DDAE.LQQQ  T          H          R          W          G           CRC

TX22IT [A 1 D 3 1 0 7 2 2 0 1 B 3 C F E C4 ] CRC:OK S:A ID:7 NewBatt:0 Error:1 Temp:--- Hum:72 Rain:27.00 Wind:25.40m/s from:270.00 Gust:--- CRC:C4
TX22IT [A 1 D 2 2 0 1 B 3 D F E 3A ] CRC:OK S:A ID:7 NewBatt:0 Error:1 Temp:--- Hum:--- Rain:27.00 Wind:25.40m/s from:292.50 Gust:--- CRC:3A
TX22IT [A 1 D 2 2 0 1 B 3 E F E 17 ] CRC:OK S:A ID:7 NewBatt:0 Error:1 Temp:--- Hum:--- Rain:27.00 Wind:25.40m/s from:315.00 Gust:--- CRC:17
TX22IT [A 1 C 3 1 0 7 3 2 0 1 B 4 0 0 0 8A ] CRC:OK S:A ID:7 NewBatt:0 Error:0 Temp:--- Hum:73 Rain:27.00 Wind:--- from:--- Gust:0.00 m/s CRC:8A
TX22IT [A 1 C 1 2 0 1 B E ] CRC:OK S:A ID:7 NewBatt:0 Error:0 Temp:--- Hum:--- Rain:27.00 Wind:--- from:--- Gust:--- CRC:E
TX22IT [A 1 C 2 0 5 5 3 2 0 1 B 19 ] CRC:OK S:A ID:7 NewBatt:0 Error:0 Temp:15.30 Hum:--- Rain:27.00 Wind:--- from:--- Gust:--- CRC:19

*/
`

@magcode
Copy link
Owner

magcode commented Aug 20, 2018

Hello
yes. There is a chance. However I don't own this hardware. Without real data it's rather difficult to develop a proper support.
I can check if there is some JAVA based TX22 code out there already which I could reuse.

@njordan77
Copy link
Author

Hi, i at least know the message scheme + have already terminal RAW data coming in....
hope this would help a little...

https://github.com/mhop/fhem-mirror/blob/master/fhem/FHEM/36_LaCrosse.pm

# Weather station - Format:
#        0   1   2   3   4   5   6   7   8   9   10  11  12  13  14  15
#   -------------------------------------------------------------------
#  OK WS 14  1   4   208 53  0   0   7   8   0   29  0   31  1   4   1      I D=0E  23.2°C  52%rH  0mm  Dir.: 180.0°  Wind:2.9m/s  Gust:3.1m/s  new Batt. 1025 hPa
#  OK WS ID  XXX TTT TTT HHH RRR RRR DDD DDD SSS SSS GGG GGG FFF PPP PPP
#  |  |  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |--    Pressure LSB
#  |  |  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |------    Pressure MSB
#  |  |  |   |   |   |   |   |   |   |   |   |   |   |   |   |----------    Flags *
#  |  |  |   |   |   |   |   |   |   |   |   |   |   |   |--------------    WindGust * 10 LSB (0.0 ... 50.0 m/s)           FF/FF = none
#  |  |  |   |   |   |   |   |   |   |   |   |   |   |------------------    WindGust * 10 MSB
#  |  |  |   |   |   |   |   |   |   |   |   |   |----------------------    WindSpeed  * 10 LSB(0.0 ... 50.0 m/s)          FF/FF = none
#  |  |  |   |   |   |   |   |   |   |   |   |--------------------------    WindSpeed  * 10 MSB
#  |  |  |   |   |   |   |   |   |   |   |------------------------------    WindDirection * 10 LSB (0.0 ... 365.0 Degrees) FF/FF = none
#  |  |  |   |   |   |   |   |   |   |----------------------------------    WindDirection * 10 MSB
#  |  |  |   |   |   |   |   |   |--------------------------------------    Rain * 0.5mm LSB (0 ... 9999 mm)               FF/FF = none
#  |  |  |   |   |   |   |   |------------------------------------------    Rain * 0.5mm MSB
#  |  |  |   |   |   |   |----------------------------------------------    Humidity (1 ... 99 %rH)                        FF = none
#  |  |  |   |   |   |--------------------------------------------------    Temp * 10 + 1000 LSB (-40 ... +60 °C)          FF/FF = none
#  |  |  |   |   |------------------------------------------------------    Temp * 10 + 1000 MSB
#  |  |  |   |----------------------------------------------------------    Sensor type (1=TX22, 2=NodeSensor)
#  |  |  |--------------------------------------------------------------    Sensor ID (0 ... 63)
#  |  |-----------------------------------------------------------------    fix "WS"
#  |--------------------------------------------------------------------    fix "OK"
#
#   * Flags: 128  64  32  16  8   4   2   1
#                                 |   |   |
#                                 |   |   |-- New battery
#                                 |   |------ ERROR
#                                 |---------- Low battery

What I receive is for example this:

/dev/ttyUSB1: OK WS 42 1 4 238 58 0 0 10

@magcode
Copy link
Owner

magcode commented Aug 20, 2018

OK. I see. Development with some sample values and without the actual hardware would be possible I think.
However I'm working on many other projects atm where I need to integrate equipment I own. So this TX22 has - unfortunately - very low priority for me.

Feel free to open a PR and contribute to this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants