2.0.0 • Published 2 years ago

@metekcity/esn00-packet v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ETEKCITY ESN00 Packets

Parses & serializes packets to and from the format that ESN00 sends and understands.

Implemented Packet Types:

  • SET_UNIT (0xc0) - c5736b4, - #2
  • SET_TARE (0xc1) - #2
  • SET_AUTO_OFF (0xc4) - 805a076, #2
  • MEASUREMENT (0xd0) - bfcf5df
  • UNIT_STATE (0xd1) - #5
  • TARE_STATE (0xd3) - bfcf5df, #3
  • AUTO_OFF_STATE (0xd5) - #2
  • ERROR_STATE (0xe0) - bfcf5df, #3
  • ITEM_STATE (0xe4) - bfcf5df, #3

Unresearched packets

  • SET_NUTRITION (0xc2)
  • ?PING (0xc3)
  • ??? (0xd2)
  • ?PONG (0xd4)
  • ??? (0xe1)
  • ??? (0xe2)
  • ??? (0xe3)

Protocol

All packets have this structure

npm.io

Data Packet: Weight Measurement (0xE0)

Device will be constantly spamming packet with this data

npm.io

FieldDescriptionNote
Sign0x00 (positive) / 0x01 (negative)
Weight16 bit int (big-endian)In grams value is multiplied by 10 (not sure about other units)
Unit0x00(g),0x02(ml),0x04(ml milk),0x03(floz),0x05(floz milk),0x06(oz),0x01(lboz)Does not seem like bitmask just enum
Stable0x00 (measuring) / 0x01 (settled)0x00 means weight is not yet settled

Packet Details

StatusTypeSource(s)PayloadGeneric?Notes
SET_UNITCOMMANDunituint8Parselizer
SET_TARECOMMANDshouldResetbooleanParselizer
SET_AUTO_OFFCOMMANDtimeoutuint8Parselizer
MEASUREMENTNOTIFYsign, value, unituint8Parselizer
TARE_STATENOTIFYisOnbooleanParselizer (inverted)
AUTO_OFF_STATENOTIFYtimeoutuint16Parselizerthe value is the same as for command with the exception of extra 0 byte
ERROR_STATENOTIFYisOnbooleanParselizer (inverted)
ITEM_STATENOTIFYisOnbooleanParselizer (inverted)
UNIT_STATENOTIFYunituint8Parselizer
🛑SET_NUTRITIONCOMMAND(complex object)need more samples to understad how data is encoded

Legend

MarkerCategoryDescription
StatusWaiting (todo)
🛑StatusBlocked
StatusDone
COMMANDSource(s)Command send to the Device
NOTIFYSource(s)Notification received from the Device
2.0.0

2 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago