-
Notifications
You must be signed in to change notification settings - Fork 839
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
Janitor support needed to unclog another Toilet protocol 🪠 #1806
Comments
I'll drop everything & get right on it. Your Number Two problem is my Number One priority. |
I warn you in advance, this protocol looks more complicated than the last toilet we supported. In all seriousness, it appears to be either a repeating 39 bit message, or for the longer ones, two different 39 bit codes. |
* Add `sendToto()` and `decodeToto()` routines. - Note: They only support the short/simple messages at present. - Codes produced from this may change. This is NOT final in any way. * Update supported devices. * Add unit tests to cover new changes. This is primarily hobbled together to collect data to see if we can reduce the size of this protocol (in bits). It won't decode the different "second" code in the longer messages yet. For #1806
@jamsinclair It's time for you to do some "Testing on the Toilet". We need to do some analysis on the messages produced to see how we can cram the Things I am looking for:
Let me know how the code goes etc. The "long" codes appear quite funky. They appear to use different sized gaps and a different number of repeats of the sub-code. You may be able to hack support for the longer codes using the smaller codes too. e.g. // send a Full Flush.
irsend.sendToto(0x200800B0B0); // send a Full Flush. The code is sent twice.
delay(30 * 1000); // Wait 30 seconds
// Simulate sending a long message. e.g. Oscillate Bidet
irsend.sendToto(0x2008006060, kTotoBits, 2); // Send the First half (39 bits) is sent 3 times.
irsend.sendToto(0x2008001010, kTotoBits, 2); // Send the Second half (39 bits) is sent 3 times.
// Technically, there is no gap between the second & third send of the data in the second half of the protocol.
// The above doesn't emulate that part, but I'd guess it would work. Looking at the pictures in the manual (sorry, my skill at understanding Japanese is 0.0001%) it looks like there is some controls that have a range of possible values. i.e. spray pressure & position. We might be able to glean a bit ordering for the data from those values if they increase linearly. Anyway. Off ya go. Collect some data if it works. |
Thanks for the branch and insight @crankyoldgit! Rolling up my sleeves and getting into the dirty work 🔧
Hmm, something I seem to recall from previous toilet is there's two IR blasters in the remote (one on each end). Only one message was needed to reach the receiver on the bowl to activate it. I believe that may be a redundancy measure depending on where the remote and bowl end up located in the bathroom.
Unfortunately my Japanese isn't much better, despite living here 😅 , but yes there's some range values that'll would be good to decode if possible. |
Is there any message when you for example change pressure? Or how does any other message change after the pressure is changed? Maybe you can isolate one transmitter and reduce noise? |
That's possible. But we emulate what we see, for maximum compatibility.
Thanks for the insight. I look forward to the data and your analysis and replay attempts. I hope to hear next that you're flush with success. Hope it doesn't drive you round the bend. |
Hmmm, it seems my trusty ESP8266 dev kit is in a bad state. Unable to re-flash it. Depending on if I can fix it, I might be at mercy of worldwide freight until my replacement arrives Hope y'all didn't get pumped up on this porcelain wonder of a protocol. |
Aww man, that's crap! |
I've managed to battle with my board and got it to flash ⚡️🙌 (Seems like USB connector is a bit dodgy). Looks like the protocol should be quite simple with some fun extra caveats.
Yes, it seems like we can safely condense the codes down to 24 bits. The starting
No. They do differ, but out of all the commands only two were the long ones:
I've got a Google Sheet with all the commands and their bits. Two features, Water & Seat Temperatures do seem to pair their data together. Note the "Stateful Codes" section. It's clear that there's some pattern between the nibbles.
I can confirm the code you mentioned above, hacking the two repeating codes, does indeed work on the toilet
|
Thanks for that. It's very helpful. |
* Shrink messages down to 24 bits, by expecting a 15 bit prefix. (0x2008) * Experimental support for sending longer codes. - e.g. `sendToto(0x006060001010, kTotoLongBits); // Oscillate Bidet` * Refactor sending to include prefix. * Refactor decoding to expect a prefix. * Prep work for decoding Long messages (not ready yet) For #1806
I've just updated the branch to reflect that and some improvements. I also think the last byte of the data is an I still need to work out the bit ordering. I think we may need to reverse it for the numbers to increase linearly. Let me know how it goes. |
So I've updated the google sheet and added a panel with all the codes in LSB First order. Correct me if I'm misunderstanding, but we're looking for some kind of linear pattern in a nibble? If so, I think your assumption is correct and it's likely LSB First ordering.
*Looks like I have the nozel positions the wrong way around 😅
Seems like that's the case for all the codes I see, looks like we could update it to a 16 bits code. |
* Change bit order to LSB per #1806 (comment) * Finish adding support for long (48bit) codes. * Update unit tests accordingly. - Add tests for long (48 bit) codes. Fingers crossed, this should do it. Fixes #1806
@jamsinclair I've updated the branch and created PR #1811 You'll have to recapture all of your codes again, but, I think this should be final. Touch wood (or Toilet Paper). Let me know how it goes. |
Thanks for connecting all the pipes and unclogging the protocol into its current state. I've learnt a lot this second time around 👏 👏 👏 I can confirm that with your code in #1811:
I believe we can close the lid on this fine issue now? |
* Add `sendToto()` and `decodeToto()` routines. - Supports two (2) bit sizes, 24 (short) & 48 (long) bit codes. - Includes/assumes a standard bit prefix to ensure it fits into a `uint64_t`. - `Xor` integrity check. - LSBF order based on user analysis. * Update supported devices. * Add unit tests to cover new changes. _Legs crossed_, this should do it for the _Number Two_ toilet protocol supported by this library. _Roll_ on the next one. Fixes #1806
_v2.8.3 (20220915)_ **[Bug Fixes]** - Fix `#if` for DECODE_COOLIX48 (#1796) - Add missing `prev`s to `decodeToState()` (#1783) **[Features]** - Add `pause()` function to ESP32 when receiving. (#1871) - ARGO: Argo add `sendSensorTemp()` (#1858 #1859) - HAIER_AC160: Experimental detail support. (#1852 #1804) - BOSCH144: Add IRac class support (#1841) - Mitsubishi_AC: update left vane in `IRac` class (#1837) - Basic support for Daikin 312bit/39byte A/C protocol. (#1836 #1829) - Experimental basic support for Sanyo AC 152 bit protocol. (#1828 #1826) - GREE: Add model support for `YX1FSF`/Soleus Air Windown A/C (#1823 #1821) - Experimental basic support for Bosch 144bit protocol. (#1822 #1787) - Experimental basic support for TCL AC 96 bit protocol. (#1820 #1810) - Add basic support for clima-butler (52bit) RCS-SD43UWI (#1815 #1812) - TOTO: An experimental _(s)wipe_ at support for Toto Toilets. (#1811 #1806) - CARRIER_AC128: Experimental Basic support for Carrier AC 128bit protocol. (#1798 #1797) - HAIER_AC160: Add basic support for Haier 160bit protocol. (#1805 #1804) - DAIKIN: Add basic support for 200-bit Daikin protocol. (#1803 #1802) - FUJITSU: Improve handling of 10C Heat mode. (#1788 #1780) - FUJITSU: Improve handling of short (command only) messages. (#1784 #1780) **[Misc]** - Improve the `_IRREMOTEESP8266_VERSION_VAL` macro (#1875 #1870) - SONY: Update supported devices. (#1872) - SAMSUNG: Update supported devices (#1873) - NEC: Update supported devices (#1874) - Give IRmacros.h smaller scope to avoid impacting projects using IRremoteESP8266 (#1857 #1853 #1851) - Inhibit protocol names for not-included protocols (#1853 #1851) - Test out codeql static analysis (#1842) - Remove pylint disable=no-self-use (#1817) - Fujitsu General: update supported devices (#1813) - DAIKIN: Update supported devices (#1808 #1807) - Fujitsu: Update supported remote info. (#1801 #1794) - DAIKIN128: Update supported devices (#1754) - Voltas: Add link to manual for 122LZF A/C. (#1800 #1799 #1238) - Daikin128: Additional unit test. (#1795 #1754) - MIDEA: Update supported devices (#1791 #1790)
**_v2.8.3 (20220915)_** **[Bug Fixes]** - Fix `#if` for DECODE_COOLIX48 (#1796) - Add missing `prev`s to `decodeToState()` (#1783) **[Features]** - Add `pause()` function to ESP32 when receiving. (#1871) - ARGO: Argo add `sendSensorTemp()` (#1858 #1859) - HAIER_AC160: Experimental detail support. (#1852 #1804) - BOSCH144: Add IRac class support (#1841) - Mitsubishi_AC: update left vane in `IRac` class (#1837) - Basic support for Daikin 312bit/39byte A/C protocol. (#1836 #1829) - Experimental basic support for Sanyo AC 152 bit protocol. (#1828 #1826) - GREE: Add model support for `YX1FSF`/Soleus Air Windown A/C (#1823 #1821) - Experimental basic support for Bosch 144bit protocol. (#1822 #1787) - Experimental basic support for TCL AC 96 bit protocol. (#1820 #1810) - Add basic support for clima-butler (52bit) RCS-SD43UWI (#1815 #1812) - TOTO: An experimental _(s)wipe_ at support for Toto Toilets. (#1811 #1806) - CARRIER_AC128: Experimental Basic support for Carrier AC 128bit protocol. (#1798 #1797) - HAIER_AC160: Add basic support for Haier 160bit protocol. (#1805 #1804) - DAIKIN: Add basic support for 200-bit Daikin protocol. (#1803 #1802) - FUJITSU: Improve handling of 10C Heat mode. (#1788 #1780) - FUJITSU: Improve handling of short (command only) messages. (#1784 #1780) **[Misc]** - Improve the `_IRREMOTEESP8266_VERSION_VAL` macro (#1875 #1870) - SONY: Update supported devices. (#1872) - SAMSUNG: Update supported devices (#1873) - NEC: Update supported devices (#1874) - Give IRmacros.h smaller scope to avoid impacting projects using IRremoteESP8266 (#1857 #1853 #1851) - Inhibit protocol names for not-included protocols (#1853 #1851) - Test out codeql static analysis (#1842) - Remove pylint disable=no-self-use (#1817) - Fujitsu General: update supported devices (#1813) - DAIKIN: Update supported devices (#1808 #1807) - Fujitsu: Update supported remote info. (#1801 #1794) - DAIKIN128: Update supported devices (#1754) - Voltas: Add link to manual for 122LZF A/C. (#1800 #1799 #1238) - Daikin128: Additional unit test. (#1795 #1754) - MIDEA: Update supported devices (#1791 #1790)
FYI, the changes mentioned above have now been included in the new v2.8.3 release of the library. |
Hey there!
I'm back with a new Japanese Toilet Washlet protocol. This is a different brand and differs significantly from what was last seen in #706.
I've used the
auto_analyse_raw_data.py
script to try generate a basic send/recv class, however it seems like this protocol will need some massaging beyond my expertise to get a working class functioning.The remote seems to send two different states:
If you anyone is able to help point me in getting a functioning send/recv class I can try help debug and refine from there 🤓
Version/revision of the library used
v2.8.2
Output of raw data from IRrecvDumpV2.ino or V3 (if applicable)
Full Flush:
Light Flush:
Oscillate Bidet Function
...There are many more commands, I'll keep track of them once we can correctly decode the data being sent.
Product
Brand: Toto
Model: Washlet Toilet NJ
Manual File: https://www.d-resi.jp/dt/nishi-shinjuku/limited/imgs/pdf/book6.pdf
Circuit diagram and hardware used (if applicable)
Board: NodeMCU v1.0
Receiver: KY-022
Transmitter: KY-005
The text was updated successfully, but these errors were encountered: