-
Notifications
You must be signed in to change notification settings - Fork 7
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
Control functions have stopped responding to input #19
Comments
Came here to open an issue for the very same thing - identical experience, and log entry. Definitely happened in the past week or so. |
+1 with the same issue |
+1 same issue with the same error log |
+1 same issue encountered here |
For additional context I have tried deleting and re-adding the HA air con entity and also confirmed that the air con system is still able to be controlled remotely through the Seeley Magiqtouch app. |
Oh that really sucks. I noticed my control widget wasn't working the other day and just assumed I probably needed to restart something... It looks like the magiqtouch app protocol must have actually changed a bit. It's probably going to be quite a while before I can get to fixing this, I've only recently joined the "2 under 2" club and don't have much time for projects |
Just sniffed the MagIQTouch app, and in addition to the host Could it potentially just be an updated API URL? Not sure why it'd still be hitting the previous one though. The error message in this post makes it sound like it just can't hit the tgjgb3bcf3 endpoint. |
Nice one @jmot205 . I've decompiled a copy of old and newest app, hopefully that'll give me a more direct answer as to what's going on... though I'm coding from phone with Acode app and SSH to my Linux box, so it's just little bits here and there :-) |
Actually it's bad news on the decompile. Previously the app code was written with dotnet & xamarin which is easy to decompile. The brand new one has been rewritten from scratch, with that new url reported now locked inside a C / binary library which is much harder to inspect. Oh, the new url is actually a websocket.
|
Ah, this integration is also still using |
That's a frustrating outcome of them seemingly putting so much effort into re-writing their app - that it throws a spanner into the decompile process. Nice find on that printout - that's a lot of info. Here's hoping that a drag-and-drop update of the ApiUrl is all it needs to come back to life. |
Thanks for looking into this. I came here to report the issue but you guys are obviously all over it already :) Hopefully not too difficult to get it back up and running. |
@andrewleech I am in awe. I could barely write a Python hello world one-liner when our kid was newborn, let alone decompile an app and sniff its traffic with a MITM proxy. Look - I'm an infrastructure guy, and totally a Python hack. Clearly you've done a lot of the heavy lifting already, and you seem like a guy that enjoys doing this stuff but, if I can help at all, please yell out mate. |
I was so enjoying just reading the story so even if we are not going to be lucky enough to get back control, not going to be disappointed. Thanks mate for your time and efforts. |
@DeltaTangoLima Cheers yeah to be clear, this is my second son and he's healthy and doing well... so it's all coming a bit easier than with our first :-) I find this kind of hacking around mentally invigorating, similar to exercise being physically energising. I also need something to keep me awake at times when holding bubs in the middle of the night, don't want to fall asleep and drop him! @AlexPotterOnGit actually it's looking quite definite I'll be able to get it working! I've already replaced a couple of calls to the old / shut down API url. The new API url is definitely a websocket, I got communication with that started last night and have received "current state" over it just like the app does. The app uses this websocket for both
The format of the json data structures used for these is different to the old one though, so the dataclass structures here will need updating to suit. I'm pretty sure my first round of fixes will break zone control because I don't have zones which in the new format seems to show as empty lists.... people with zones will have lists filled with "something new", we'll have to wait until someone with zones runs the new code (once it's written) to see what the format is. |
Oh wow, just found another use for chatgpt! Neat, Gemini can do it too, question:
Response:
PS. This is the current state json that's reported over websocket |
Yep - done this a lot myself. genAI isn't going to kill development, for those devs that learn how to harness it properly. I use it to bootstrap about 80% of a new project, which means I can spend my time refining and tweaking the end product. Very useful! |
Considering the "strings" trail you found, I'm going to guess that they built the app with AWS Amplify, and more specifically the amplify_flutter library. https://pub.dev/publishers/aws-amplify.com/packages Authentication could pose a bit of a challenge, I suspect. Edit: indeed, looks like they use Amazon Cognito, after some more strings-ing. |
Heh, yeah the auth was a massive pain to get working when I started this integration a year or two ago, it took me ages to get the AWS cognitive auth library & dependences all going. Thankfully, that all still works. I think one of the pool identifiers has changed, I copied that from the amplify json/string block. I can login still just fine and use the API and websocket endpoints, the json used in the dataclass comment above was pulled by my code. |
Pull your own PR already :) |
It's taken a lot of re-writing, testing, then restructuring to try to get even basic communication working reliability over websocket and new API but the original support for evap cooling seems to be working well again for me now #21 I've just cleaned up and merged that to the main hacs branch so anyone should be able to upgrade to it if you have pre-release versions enabled in hacs. This may work for heating but it's a guess so far. This will not work for zones as my setup doesn't have any so the json doesn't include any details for this. I'll need to get json data dumped from someone's ha logs (with verbose logging enabled on this integration) to make any progress there. |
Legend! Thanks for all that work - sorry to hear it was such a big chunk of effort. Hopefully they refrain from any more "useful" app re-writes in future... I've updated to v3.0 and had no entities auto-detected so found I need to login to my account again. Unfortunately that doesn't work - I get a "failed to connect" error in the GUI, and the error log shows that it didn't resolve:
|
First of all - thank you for the efforts. And wanted to confirm I have the same issue: Setup failed for custom integration 'magiqtouch': Unable to import component: No module named 'mandate' |
v3.0 is not the new work, that's the old version. The new stuff just merged would need pre-release enabled I think to get installed. Maybe the new stuff should be given a version number; it'd be good to know it works for someone else before I "formally" release it as such... though that really doesn't actually matter. |
Hi @andrewleech - I just updated again today to 8b00eb3 and the above problem is now resolved. My climate entity has returned! Whether intentional or not, many thanks and thank you for your continued effort on this integration. It's really appreciated. |
Great, yeah I pushed a fix to the most recent issue last night but wanted to test one thing before posting about it here. @TheOriginalMrWolf i think your latest exception should be fixed with this too. |
@andrewleech, looks like you have cracked it! Just did a quick test and can now control both zones independently, set zones temps, turn zones on and off, turn master off (turns all zones off). Can also now set the unit to Fan mode and adjust fan speed. It is now working FAR better than the Seeley app. Only one problem that I can see now is that the log file has gone crazy. Not sure if this is an issue but I have attached the logs from my testing so you can see if there are any issues. :) First one was me adjusting temperatures etc. The second one is me just starting the logs for a few seconds and stopping the logs so no changes. Let me know if you want me to do some more testing. |
@andrewleech looks like some good progress with the zones! I did some testing last night and found that the room zones are working as you would expect. They do however show up as either "off" or "auto", I would have thought they would show "off" or "heat"?? The thermostat control for all zones including the Common Zone all work as expected. While the individual room zones are working the "Common Zone" is not functioning as it was previously. You can turn the heater on but this is not reflected in the state of the Common Zone entity as it says its off (when in reality its on), the "Preset" shows "None" and the "Fan Mode" shows 1. Using the Common Zone entity you cannot turn off the heater at all (the state is already off). You can turn on and off individual zones but if you have only one zone running and turn it off it will also turn off Common Zone. It should leave the Common Zone on. If you have more than one zone running and turn it off it turns just that zone off. I've grabbed some further logs which hopefully may help. home-assistant_2024-04-26T03-56-36.597Z.log Definately feels like you're getting close! Let me know if you need anything alse. |
Thanks @AschwinGehlen and @DuL90 that's some helpful details. Curious that your common/master entity behaviours is different, I'll look at why that might be. Shame about the reported mode being auto, my intention is for the button to be "auto" because there's no way to have a button just be "on". I thought it would have been working to report "on (heating)" etcetera as the current state though. Maybe I should just add heat and cool mode buttons (as supported by the system) and use either of them as "zone on". Could even let any entity change the overall system mode, not sure if that would be more or less confusing. |
@andrewleech, having auto and off option works perfectly for my setup but I don’t have a hvac unit. I would have thought having auto is how the system would normally run, that way the heater would cool or heat automatically. Maybe we need Heat, Fan, hvac and off options? Good thing with the way it is setup at the moment is I can now have the heater “on” but the zones are off. This means the heater will still report the current room temperature. If I turn the master off (heater fully off) then the heater no longer report the room temperature. I think the Seeley app also works like this. There are two warnings in the logs that keep coming up: Logger: magiqtouch And Logger: magiqtouch Let me know if you need more logs. |
New update pushed... I've removed the auto button on zone controls (I think) :-) @AschwinGehlen one of those recurring messages is because the "verbose" configuration setting is enabled. The other was a development diagnostic message I still had in the code. I've now gone through and removed all the *extra" diag log messages I hopefully won't need anymore. |
@andrewleech awesome! I’ll download it tomorrow morning and have a play. Getting a bit late for me, need my beauty sleep. 🤣 |
Well done @andrewleech - you've done it - I can at last actually properly interact with my system... thank you!! Only a couple of minor things that I've spotted so far -
State (which shows the current fan speed of 3) at this point is:
To be honest, these are only minor/trivial issues so I could well live with it as it is, however if you are possibly looking for things to do then these items would be great for you to look at! 😁 |
@andrewleech did some testing this morning and everything is working perfectly with my system. No popup errors anymore when changing the temperature settings etc. Fan mode works, turning the zones off and on works perfectly. Here are the latest logs, as you can see there are still a few errors that keep popping up in the logs but FAR less than what we had before. For testing I enabled Debug Logging then reloaded the integration, then changed settings in the master entity followed by changing the zone settings. |
@andrewleech Thanks for the update. I did a little testing last night and again this morning and found a few issues and odd behaviour. The entity for the Common Zone mostly works like previously described but it still does not turn off the heater. It also does not turn off the Cooler or the Fan if running in those modes. If you select Heat (or Cool or Fan) from the Common Zone entity the system will come on but the entity changes status to off after a few seconds (even thought the system is on). If other room zones are on the heater will completely turn off when the last room zone is switched off, the Common Zone should remain on but doesn't. I noticed the first internal temperature sensor is unavailable but all the other integration entities are available, including other temperature entities. The individual room zones are now only showing "Off" or "Heat", whereas the Common Zone shows these as well as "Cool" and "Fan Only". This is perfect but it seems a different experience to the last point @AshieSlashy made above. I noticed this week (and also occurs with this release) is if I put the system in "Program" mode (to run the timers) the individual room zone entities become unavailble along with the corresponding temperature entities. The Common Zone remains functional and now the first temperature entity comes back to life. Apart from the temperature entities this isn't really a problem, I just found this a little odd. There seems to be a number of errors in the logs which I've attached: home-assistant_2024-05-04T23-39-53.390Z.log While grabbing the logs I also put it in "Program" mode in case that shows you anything interesting. Hope that all makes sense. |
Thanks for the detailed feedback everyone, that really helps There's certainly still some gremlins; it actually doesn't quite work properly for me either. There's a common thread of settings going through, but then the UI reverting to old / previous setting. I've seen things like that with setting/changing fan mode myself lately. I've never used Program mode myself, so don't know how it interacts with the remote interface at all. I do see an unexpected error reported in the logs that's possibly related, not sure how to fix it though. The issues with temperature sensors is interesting too - the names of them should be easy to fix, not sure what would be causing missing entities though. |
@andrewleech funny thing is that it seems to be working perfectly on my system. So much so that it is FAR better than the Seeley app. Responds faster and actually connects to the system. 😁 |
@andrewleech The behaviour when in Program mode really isn't a problem as far as I'm concerned, I only mentioned it in case it was of some help. I'm using Program mode for the first time this year to manage timers for the heater but given there are only 4 time slots its not particularly helpful. Ideally I'll go back to using HA to schedule the heater so it really doesn't matter to me how the integration handles that mode (including the temp entities). Thanks again for all your efforts! |
@andrewleech Just thought I post to say I've had great success for the past few weeks on the latest version. I use HA exclusively now to control my heating and it's working very reliably. The only minor thing I've found is occasionally, the native HA thermostat dashboard card doesn't reflect state changes, or more accurately, takes a long time to update. For example, I have an automation which turns the thermostat off at night via service call and sometimes, the UI doesn't reflect the change despite the wall controller successfully being in the off position. After several minutes, it will eventually update but on at least one occasion, it did not and I had to switch the UI to "off" manually to get it back in sync. Not a big deal but thought I'd mention it in case anyone else may be experiencing the same thing. Thanks again for all your hard work! |
I've just fired this up again. Upgraded to 6bfa853. |
@cat2devnull does the mode change send correctly if you try again/a few times? I also experienced the same as what you describe, but I was at least able to get the mode to change after a second attempt. |
@epetousis So you seem to be right. I can turn it on after a few attempts. Not sure on the reliability but it's low. The problem still remains that the HA interface always shows as off, even if the aircon is actually on. So although I can turn it on after a few attempts, I cannot then turn if off because HA thinks it's off. |
@cat2devnull it looks like the zone handling is getting confused by your system, I'll have to find some time to try manually feeding the state data from your logs through the code to see what's going wrong. |
@andrewleech Thanks for taking the time to look... |
... and yes I can confirm that sometimes / often this HA module is failing to show settings that are changed from the control panel directly. I just had this myself, when I turned on my unit manually but HA still shows it off. For context though I've only got evap air-conditioner and it's winter here, so it's very rare for me to have an opportunity to turn my unit on to test / work on any of this stuff. Hence development has become quite slow! |
Is there anything I could do to help @andrewleech ? |
Not sure. I got my patched copy of the official all running to get some more logs of its data, though it's not completely clear yet from that either. I thought the websocket was being used to keep a connection to the server open so that manual changes made at the control panel could be pushed directly to remote clients like this. But the app looks like it opens new websockets regularly and just get a few quick messages though - maybe it's only really of benefit when a change is made and you're waiting for it to propagate to the unit. I might have to update the code to essentially poll for remote charges once a minute or something by starting new websockets each time. |
@andrewleech the latest version is still working fine on my setup. Occasionally I make a change to the temperature and a few seconds later it reverts back to its previous state but the office app on the phone does the same. As far as I am concerned it works better than the app so well done on all your work on this. Can you upload the known working version bb8f4da as a non hacs version and upload it as version 4.1 or version 5? HACS constantly states that there is a version update to version 4 but v4 doesn’t work. 😁 Also let me know if you need more logs from my setup or even if you want me to arrange access to my setup for you to look at. |
Hi @andrewleech - running in heating mode & trying to turn on one of the zones (spare room) fails. Log attached. Also, would be great if the names of the temp sensors could be picked up as well please (they are all just getting named to “MagiQtouch Internal Temperature”. |
Hi @andrewleech - I hope you’re doing well. I have noticed with the app on iOS that there is often considerable lag between making a setting change and seeing that change stably reflected in the app. For instance, I can turn a zone off in the app and, if I wait a few seconds, I see that zone turn on again. Then, after another (often quite long) wait I finally see that zone turn off again and then stay there. Gut feeling is that this is the result of ws connections being dropped and reestablished - almost as if the app is polling the server, but using ws connections instead of https. Even if not that, it certainly doesn’t feel like a stable and performant long-held ws implementation… I’m thinking of implementing an mitmproxy in my network to investigate further (as well as try to check out the control panel’s comms). Have you tried mitmproxy for this before, or know of anyone who has? Cheers! |
Hi @TheOriginalMrWolf yeah the current build here certainly has issues with the websocket which have rather confused me. At one point it had seemed quite stable.... I have a hunch they might have changed something on the server end :-/ I have used mitmproxy, that's been my primary method of determining how the oem app works to get all of this going. It was tricky to get working though, requiring patching the app itself to accept the mitmproxy cert to be able to inspect all the https traffic. This was possible on the android app (took a few goes with different tools though) but I doubt it can easily be done with an ios app. Regarding the ws usage, I'm currently trying to maintain a single ws connection which is reused for everything, with it auto-reconnecting any time it closes. I can't quite tell how it's being used for background updates of commands that are set manually on the wall panel, not sure if it's starting new ws regularly to receive them, or keeping one open in the background. I've made some changes to my module locally to try using the ws for shorter periods of time, starting new ones for each update, but haven't really had much chance to test and fix it (evap cooler in the middle of winter). edit: maybe it is possible to get going on ios, I'm pretty sure this is what I used to get it working with the oem app: https://github.com/ptswarm/reFlutter |
Thanks @andrewleech. It's been a while since I last used mitmproxy, so not sure what's changed, but in the past I was able to use mitmproxy to capture websocket traffic and then (along with the TLS keys) use Wireshark to decode the traffic (though I did have more control over both the environment and client). I only have iDevices so based on your feedback I'm not too optimistic about what I can do with the app then. Will see if I have any luck with the control panel. I have gas heater and inverter cooling so happy to do some testing for you if you'd like. |
Hi,
last week i have noticed the integration has stopped responding to input the magiqtouch display wont update to the value i set in Home assistant, however if i set it on magiqtouch controll it will update on Home assistant
see below information from the log
This error originated from a custom integration.
Logger: magiqtouch
Source: custom_components/magiqtouch/magiqtouch.py:274
Integration: Seeley MagIQtouch (documentation, issues)
First occurred: 8:40:15 PM (3 occurrences)
Last logged: 8:51:34 PM
Failed to set value properly:
The text was updated successfully, but these errors were encountered: