Welcome to my power monitor application for Atorch power meters! This app allows users to track and monitor their power usage in real-time, helping them to save energy and reduce their carbon footprint. With this app, users can view detailed statistics on their energy consumption. Whether you're looking to save money on your energy bills or simply want to be more energy-efficient, this app is the perfect tool for you.
Supported for Atorch UD18 UD24 DT24 and similar USB or S1-B mains power meters, that share the same BLE Serial protocol
| Version | Development | Language | Platform | Screenshots |
|---|---|---|---|---|
| 1.15 | In-Progress | JavaScript | Android: Droidscript, Framework7 |
Source is available on GitHub repository
| Command | Bytes |
| WH reset | FF 55 11 03 01 00 00 00 00 51 |
| AH reset | FF 55 11 03 02 00 00 00 00 52 |
| TIME reset | FF 55 11 03 03 00 00 00 00 53 |
| ALL reset | FF 55 11 03 05 00 00 00 00 5d |
| SETUP Button | FF 55 11 03 31 00 00 00 00 01 |
| ENTER Button | FF 55 11 03 32 00 00 00 00 02 |
| [+] Button | FF 55 11 03 33 00 00 00 00 03 |
| [-] Button | FF 55 11 03 34 00 00 00 00 0C |
| Command | Bytes |
| WH reset | FF 55 11 03 01 00 00 00 00 51 |
| Internal relay | FF 55 11 03 02 00 00 00 00 52 |
| TIME reset | FF 55 11 03 03 00 00 00 00 53 |
| Bit dec | UD18/24 | S1B |
|---|---|---|
| 1 | FF | |
| 2 | 55 | |
| 3 | msg type: 0x01- data, 0x11- command, 0x02- ACK | |
| 4 | device type: 0x03- usb | 0x01- mains |
| 5 | V | V |
| 6 | V | V |
| 7 | V, INT24 / 100 | V, INT24 / 10 |
| 8 | I | I |
| 9 | I | I |
| 10 | I, INT24 | I, INT24 / 10 |
| 11 | mAh | W |
| 12 | mAh | W |
| 13 | mAh, INT24 | W, INT24/10 |
| 14 | Wh | kWh |
| 15 | Wh | kWh |
| 16 | Wh | kWh |
| 17 | Wh INT32, /100 | kWh INT32, /100 |
| 18 | D- | Price |
| 19 | D-, INT16, /100 | Price |
| 20 | D+ | Price INT24, /100 |
| 21 | D+, INT16, /100 | Frequency |
| 22 | Frequency INT16, /10 | |
| 23 | Temperature ºC BYTE | Power Factor |
| 24 | Power Factor INT16, /1000 | |
| 25 | Hour BYTE | |
| 26 | Minute BYTE | Temperature ºC BYTE |
| 27 | Second BYTE | Hours |
| 28 | Hours INT16 | |
| 29 | Minutes BYTE | |
| 30 | Seconds BYTE | |
| 31 | ||
| 32 | ||
| 33 | ||
| 34 | ||
| 35 | ||
| 36 | CRC | |
Using AI capabilities as was able to identify CRC for USB meter (device type 0x03) It works for device that i own.
FUNCTION verifyUSB(message: STRING) -> BOOLEAN
# Convert hex string to byte array
bytes = HEX_TO_BYTES(message)
# Payload = bytes from index 2 to second-to-last
payload = bytes[2 : LENGTH(bytes) - 1]
# Accumulator: sum all payload bytes, keep only lowest 8 bits
acc = 0
FOR EACH byte IN payload:
acc = (acc + byte) AND 0xFF
# XOR accumulator with 0x44 to get expected checksum
expected = acc XOR 0x44
# Compare with last byte of message
RETURN expected EQUALS bytes[LENGTH(bytes) - 1]
END FUNCTION
or as one liner
checksum = (SUM(bytes[2:-1]) AND 0xFF) XOR 0x44
I'm working on Javascript based environment and this code works for me for USB based device
function verifyChecksumUsb(message) { const bytes = new Uint8Array(message.length / 2); for (let i = 0; i < message.length; i += 2) { bytes[i / 2] = parseInt(message.substr(i, 2), 16); } const payload = bytes.slice(2, -1); const sum = payload.reduce((acc, v) => (acc + v) & 0xFF, 0); const checksum = (sum ^ 0x44) & 0xFF; return checksum === bytes[bytes.length - 1]; } const msg = 'FF550103000383000080004EBA000027D7004B0147001F003312111E0000000000000072' console.log('Checksum for '+ msg +' is ' + verifyChecksumUsb(msg)) // Checksum for FF550103000383000080004EBA000027D7004B0147001F003312111E0000000000000072 is true
PowerMon version 1.10
Permissions note
Storage- to save configuration file on your device, save persistence of measurements.
Location- On older versions of Android (specifically Android 6.0 Marshmallow through Android 11), location services must be enabled to access Bluetooth Low Energy (BLE) devices because BLE scanning can be used to determine the physical location of the device. My app does not collect location, does not store it or process in any way. Its used just for connecting to BLE
.
CORS fixes
More error checking in case something goes wrong
Logging functionality