-
Notifications
You must be signed in to change notification settings - Fork 19
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
Airjet_V01 Support #41
Comments
Did you ever get this worked out? I have the same model and would like to get it connected. |
@dloveall I have the same problem/model here... |
I tried modifying model.py with this:
and the api.py file with this:
but it throws an error:
@cdpuk We'll need your help on this... |
I'm getting further... not sure how to handle full error log:
So, in brute for manner, I hard coded system_err1 and TemperatureUnit.FAHRENHEIT, but it looks like each of these attributes need to be mapped if we're going to get anywhere:
I've come to that conclusion after getting this error once I hard coded those 2 other values. each attribute that isnt mapped will throw an error:
The problem is I don't see any obvious mappings for these in the list of key-value pairs. |
@cdpuk It would be helpful if there was a way to see the value of each changed attribute-value pair as I change something on the remote app. Is there a way to expose that??? otherwise is a guessing game and there are too many variables to consider. I added this to the api.py section so each time I load and unload the integration I can view the log:
when I turn the heater on I'll try and figure out what the other controls change via this process. |
@jazzmonger nice work -- I got this to work on my end. I made a few updates (unit, heat, filter). Haven't tested the bubbles yet, will do so this weekend and update. I get error messages (400 bad request) when changing anything in HA - is this working for someone else? These are my changes to api.py line 199: (on top of your changes to model.py)
|
Yes, I also get bad request when trying to update anything from HA, except on/off does work, so there's hope... |
There is now v1.4.0-alpha1 published as a beta release via HACS. This groups together a bunch of tasks around device support, and should add support for any Airjet_V01 or Hydrojet devices. The data to get this working has been scraped together from a number of different sources and combined with a bit of guesswork. I'd very much appreciate some testing against real devices to confirm what's working, in particular:
Debug logging has also been extended to print out those attribute collections for known devices (previous this only happened for unrecognised devices). If anything doesn't work as expected, capturing these messages before and after device state changes will be essential. |
Ok, I updated to your alpha code.
The switch labeled "Power" turns the spa control on & off successfully and I can change the temp now, so that's a win. |
Found something obviously wrong for the filter control, so give v1.4.0-alpha2 a go to see if that improves things. Debug logs should be possible via Settings > Devices & Services > Bestway, then "Enable Debug Logging" for a bit, and then "Disable Debug Logging" should trigger a log download. |
I just tried 1.4.0-alpha2. Everything except bubbles and spa lock are working. On/off, temp control's and mode (heat) are all working for me. |
I've just published v1.4.0-alpha3. This hopefully fixes the bubbles control. It looks like a lock switch wasn't being provided for you in alpha2? Worth another look in alpha3 as I've tweaked a few things. |
I can confirm bubbles works with alpha3! Nice!! |
Great. Was there any progress on the lock switch with the alpha3 release? |
So, on alpha3:
|
Next up: v1.4.0-alpha4 The lock switch has been removed, as it seems it never worked and isn't widely used. The heater switch should now update the filter status (as reported by @jazzmonger). @isaacfinnegan can the disabled bubbles switch be deleted? Something probably got renamed by me and it's caused a duplicate. |
Would it be possible to have "Spa Bubbles" switch between the 2 levels of bubbles? Right now it's an on-off button for the lower level of bubbles (at least that's how it's showing up in the Bestway app). |
That's the first I've heard about multiple levels of bubbles on these devices. If you're able to capture the debug logs while changing the settings via the Bestway app, it should be possible to identify the correct values. Be sure to wait a minute between each setting so that the integration picks up the new value. Can anyone else confirm they also have multiple levels? |
Yes, the new wifi enabled Airjet_V01 has 2 bubbles settings, a high and low (and off). I tried to get debug logs and changed from the different levels:
|
I've been testing this out a bit. Looks like the "wave" property in the returned status json is showing the the bubble level as a percentage. 0 is off, 51 is low, and 100 is high. Full log attached.
I also noticed a "Data update failed" exception in the log as well. It may be nothing:
|
Ok, this is odd. I can turn the controls on/off from HA and they arent reflected in Bestway app. But if I use Bestway app to turn heater/filter on/off, nothing is updated in HA. whats also odd is if I change temp in Bestway, HA temp chnges, so comms are sort of working. filter follows heater now which is correct. |
The bubbles thing is a bit odd.
I'm going to have to pick one of these unless someone can work out why the 50/51 values differ. I suspect that As for the behaviour described by @jazzmonger, it's not really clear what's going on there. Due to the way the API works, changes from the device or Bestway app can take a little while to appear in HA. When changing things in HA, other places normally update instantly. |
I checked again this morning to make sure, and I'm getting the same result (51 for low). I've got a couple of ideas though.
|
v1.4.0-alpha5 is now available for testing this. It's using a value of 50 to represent "MEDIUM" bubbles. If there are any glitches, it'd be useful to know:
|
What happens when setting the MEDIUM level from HA? Does it achieve MEDIUM on the device and Bestway app?Yes. Both the device and the Bestway app show MEDIUM when set to MEDIUM in HA.
What happens when setting the MEDIUM level from the device? Does HA show this correctly? Bear in mind it could take a minute to update. What do the debug logs show? It should produce a warning if an unknown value is seen.HA showed OFF when settings the level to MEDIUM from the device. The logs reported an unexpected value:
What happens when setting the MEDIUM level from the app? As above, but I'm curious whether the device and app set different values. Perhaps one is setting 50 and the other sets 51?Just like above. HA showed OFF when settings the level to MEDIUM from the Bestway app.
Full log: home-assistant.log |
Thanks. Looks about as expected since your device is using 51 as the magic number. I've made some further changes to allow wither 50 or 51 to map to MEDIUM in HA. I'm going to wrap this up in a final 1.4.0 release, and treat any further issues separately. |
It appears that I have a different version of the AirJet, identified as "Airjet_V01". The status values are different, but it appears that I have most(all?) of the values defined in BestwaySpaDeviceStatus. Is there a preferred method of adding support? I can try to add a new BestwayDeviceType.AIRJET_V01_SPA and do a pull request. Or I can provide a proposed mapping of values to function names (turn on feature, observe change, turn off feature, repeat)? Another method, somewhere in between?
Thank you for writing this integration! It appears well setup to abstract to an additional type.
The log message is: Status for unknown device type 'Airjet_V01' returned: {"E19": 0, "E18": 0, "E32": 0, "E31": 0, "E30": 0, "E11": 0, "E10": 0, "E13": 0, "E12": 0, "E15": 0, "E14": 0, "E17": 0, "E16": 0, "word5": 792, "word4": 0, "word7": 34, "word6": 0, "word1": 0, "word0": 0, "E29": 0, "word2": 792, "option6": 10244, "ver": 1174, "E22": 0, "jet": 0, "E23": 0, "power": 1, "Tnow": 93, "option7": 10260, "option4": 0, "option5": 27182, "option2": 0, "option3": 30, "option0": 59940, "option1": 59940, "E24": 0, "E25": 0, "E26": 0, "E27": 0, "E20": 0, "E21": 0, "E08": 0, "E09": 0, "E06": 0, "E07": 0, "E04": 0, "E05": 0, "E02": 0, "E03": 0, "E01": 0, "bit7": 1, "heat": 3, "Tunit": 0, "wave": 0, "word3": 0, "Tset": 104, "filter": 2, "E28": 0, "bit6": 1, "bit5": 0, "bit4": 0, "bit3": 0, "bit2": 1}
My guess on some of the mappings (untested & not methodical, just looking at the names to start) is:
spa_power: power
temp_now: Tnow
temp_set: Tset
temp_set_unit: Tunit
heat_power: heat
heat_temp_reach:
filter_power: filter
wave_power: wave
locked:
errors:
earth_fault:
The text was updated successfully, but these errors were encountered: