Closed VMartovsky closed 1 month ago
Hi,
Have you named the pumps in the Jebao app? If you goto "Setting" for the pump in the Jebao app, set a friendly "Device Name" for each pump and then remove and re-add the integration from HA it should pick up the actual names.
I've also added a f0d844ab0d4947ac9527a286160bc705.json for the SLW that should work for you as looks slightly different to the MLW structure.
Thank you! I set my name in the jebao application, re-added the integration, it became beautiful. But there are some problems, I attached a screenshot.
And there is a feeling that the button, "Feed Switch" does not work. The "switch" button works.
Odd - just to check, is that using the JSON file from here: https://github.com/chrisc123/jebao_aqua-homeassistant/blob/main/custom_components/jebao_aqua/models/f0d844ab0d4947ac9527a286160bc705.json rather than a reamed version of the MLW JSON?
I started debugging, interesting things in the logs:
2024-09-12 07:28:27.537 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to scandir with args (PosixPath('/config/custom_components/jebao_aqua/models'),) inside the event loop by custom integration 'jebao_aqua' at custom_components/jebao_aqua/__init__.py, line 27: for model_file in models_path.glob('*.json'): (offender: /usr/local/lib/python3.12/pathlib.py, line 1063: return os.scandir(self)), please report it to the author of the 'jebao_aqua' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#scandir
2024-09-12 07:28:27.548 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args (PosixPath('/config/custom_components/jebao_aqua/models/02039876751049deb404d1d89221ec4b.json'), 'r') inside the event loop by custom integration 'jebao_aqua' at custom_components/jebao_aqua/__init__.py, line 28: with open(model_file, 'r') as file: (offender: /config/custom_components/jebao_aqua/__init__.py, line 28: with open(model_file, 'r') as file:), please report it to the author of the 'jebao_aqua' custom integration For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
2024-09-12 07:28:37.615 WARNING (MainThread) [homeassistant.helpers.frame] Detected code that calls async_forward_entry_setup for integration jebao_aqua with title: Jebao Aquarium Pumps and entry_id: 01J7GV359M8F0AQQ9YC676S0PX, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.
I deleted all files from the model folder. And uploaded one. https://github.com/chrisc123/jebao_aqua-homeassistant/blob/main/custom_components/jebao_aqua/models/f0d844ab0d4947ac9527a286160bc705.json Restarted HA and re-added the integration. Nothing changed.
I don't see where exactly it selects the required JSON file. I'm attaching the log, maybe you'll see it. error_log-3-1.log
I see the difference in the sections with a drop-down list: Mode and Linkage.
Source file:
File for SLW:
The first 4 characters of the string are displayed in the mode drop-down list:
"desc": "0: Classic Wave, 1: Sine Wave, 2: Random Wave, 3: Constant Flow"
List mode now : "0" " :" " " "С"
I posted the screenshot earlier.
Controls are partially not working. Error found in logs:
2024-09-16 11:30:42.123 DEBUG (MainThread) [custom_components.jebao_aqua] Attempting to get local device data - IP: 192.168.0.39, Device ID: mpFOdAuvYG0EK9FEHyVeWo
2024-09-16 11:30:42.131 DEBUG (MainThread) [custom_components.jebao_aqua] Sending local command: 0006, Payload:
2024-09-16 11:30:42.131 DEBUG (MainThread) [custom_components.jebao_aqua] Command sent successfully
2024-09-16 11:30:42.138 DEBUG (MainThread) [custom_components.jebao_aqua] Sending local command: 0008, Payload: 000a4f435657575358444a46
2024-09-16 11:30:42.138 DEBUG (MainThread) [custom_components.jebao_aqua] Command sent successfully
2024-09-16 11:30:42.144 DEBUG (MainThread) [custom_components.jebao_aqua] Sending local command: 0093, Payload: 0000000202
2024-09-16 11:30:42.147 DEBUG (MainThread) [custom_components.jebao_aqua] Command sent successfully
2024-09-16 11:30:42.152 DEBUG (MainThread) [custom_components.jebao_aqua] Response after sending command 0x93: 0000000391030000940000000203064921423b214200143b0712056400000712143b03214200eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee00
2024-09-16 11:30:42.152 DEBUG (MainThread) [custom_components.jebao_aqua] Successfully parsed local device data: {'SwitchON': True, 'PulseTide': False, 'FeedSwitch': False, 'TimerON': True, 'Mode': 'Random Wave', 'Linkage': 'Independent', 'Flow': 33, 'Frequency': 66, 'FeedTime': 59, 'Fault_Overcurrent': False, 'Fault_Overvoltage': False, 'Fault_OverTemp': False, 'Fault_Undervoltage': False, 'Fault_Lockedrotor': False, 'Fault_no_liveload': False, 'Fault_UART': False}
2024-09-16 11:30:42.159 DEBUG (MainThread) [custom_components.jebao_aqua] Coordinator ran _async_update_data and updated device data: {'did': 'mpFOdAuvYG0EK9FEHyVeWo', 'attr': {'SwitchON': True, 'PulseTide': False, 'FeedSwitch': False, 'TimerON': True, 'Mode': 'Random Wave', 'Linkage': 'Independent', 'Flow': 33, 'Frequency': 66, 'FeedTime': 59, 'Fault_Overcurrent': False, 'Fault_Overvoltage': False, 'Fault_OverTemp': False, 'Fault_Undervoltage': False, 'Fault_Lockedrotor': False, 'Fault_no_liveload': False, 'Fault_UART': False}}
2024-09-16 11:30:42.159 DEBUG (MainThread) [custom_components.jebao_aqua] Finished fetching jebao_aqua data in 0.037 seconds (success: True)
2024-09-16 11:30:42.469 DEBUG (MainThread) [custom_components.jebao_aqua] Sending control command to Gizwits API - URL: https://usapi.gizwits.com/app/control/mpFOdAuvYG0EK9FEHyVeWo, Data: {'attrs': {'Linkage': 'Master'}}, Headers: {'X-Gizwits-User-token': 'e52d261625304f70a1e257614132d969', 'X-Gizwits-Application-Id': 'c3703c4888ec4736a3a0d9425c321604', 'Content-Type': 'application/json', 'Accept': 'application/json'}
2024-09-16 11:30:43.458 DEBUG (MainThread) [custom_components.jebao_aqua] Response from Gizwits API to Control Command - Device Data: {"message":"An invalid response was received from the upstream server"}
2024-09-16 11:30:43.459 ERROR (MainThread) [custom_components.jebao_aqua] Failed to send control command to Gizwits API: 502
Whoops yes forgot that it's necessary to keep the commands sent to Gizwits API in original Chinese rather than send them English! If you try the new JSON file now: https://github.com/chrisc123/jebao_aqua-homeassistant/blob/main/custom_components/jebao_aqua/models/f0d844ab0d4947ac9527a286160bc705.json hopefully should work better for you?
Excellent! Thank you very much! Displayed correctly! I'll get to the aquarium and check the pump controls! Thanks again!
It might also be useful to be able to switch between these settings.
The choice between manual, linkage and program. Because, while the pump is in program, I can't control it, only turn on and off.
Checked, slw pump control works! Pump should be in manual mode. The topic can be closed.
I have Jebao SLW wave pump. The device could not be found. I launched debugging, found product_key - f0d844ab0d4947ac9527a286160bc705. Use file 1d8c63eaccac4205b92c84d77d5a08fb.json, renamed, changed line "product_key". Uploaded to HA. The device was detected. IP was detected automatically. Problem when opening device, each line starts with device ID. Attached is picture.
f0d844ab0d4947ac9527a286160bc705.json
I haven't checked how the pump works yet. I'm far from it.