Comments (13)
Hmm, that's unfortunate. Especially considering HA is going all-in with Hass.io with release of HassOS. I'm not using Hass.io yet (I have a manual installation) but I'm planning on moving soon so I'll need it as well.
I'm keen on getting this into HA core, so hopefully that's the solution. I need to investigate the contribution requirements and how specs are written for other components and then make a PR. First though, I want to explore some more options that may change the structure - I'd rather settle on the structure before I raise a PR.
3 may be an option if you could modify the Hass.io environment after you've installed it?
pytuya
is also pure python, so they may very well be open to adding it to the core list of requirements. Tuya smart devices are pretty prevalent and I'm sure they'll find other uses for it in the future.
from homeassistant-goldair-climate.
I am exploring if I can change the hass.io environment. Will keep this updated as I am no expert in HA, unix, or python - so you may be able to point out where I am making simple mistakes...
Progress!
Following this thread I tried the following.
Downloaded pytuya (7.0) on my desktop and uploaded to /config/custom_components/pytuya/__init__.py
and then in /config/custom_components/climate/goldair_heater.py
changed line 213 from import pytuya
to import custom_components.pytuya as pytuya
Then when I clear my log and reboot I see a climate component for my configured heater :-)
Log says Failed to update device state.
and the heater is unavailable, but after a short (<1min) time it pops up as configured.
However I cannot control the heater - anything I try results in Failed to update device state.
. I'm using a GPPH610 heater and hope I'm just making a "silly" mistake somewhere.
Getting pytuya to the core list of requirements sounds a great option because it took a bunch of reading and trial and error in order to get to the above (and I'm still not working!).
from homeassistant-goldair-climate.
Hiya! I was considering playing around with the method you've tried, but wasn't confident enough with Python imports to really know what to do.
On a similar note, looks like someone has had success with pip on a Docker installation here, maybe it will work for you as well?
With regards to device compatibility, I test this on the GPPH630 and GPPH730; the only difference between the GPPH630 and your GPPH610 should be the wattage, so you should be fine once we figure out how to get the integration running.
from homeassistant-goldair-climate.
I don't think I can do a Pip install on Hass.io :-(
Have you seen that the very recent Home Assistant release (0.74) has support for Tuya? Although this looks very different i.e. a logon to a cloud service - which isn't what I am after.
With my above setup I was getting status of heater but not able to control. I have just seen you released a new version and I have tried that (including the configuration changes, and removing my old manual pytuya file), but now get a different error, which I am unsure how to troubleshoot further.
Unexpected status() payload=b'json obj data unvalid'
However it does look like pytuya is now included in hass.io deps/lib/python3.6/site-packages/pytuya/__init__.py (ERROR)
(although I'm not sure what version).
Additionally a couple of bits I can't work out:
- I do get the status of the heater reported and it appears to be correct.
- When I restart home assistant it turns my heaters off (still testing this theory) which suggests my id/key are correct and a control element works somewhere!
I will keep experimenting but any advice appreciated.
from homeassistant-goldair-climate.
Yeah, I saw that a generic Tuya component was in the latest release. However like you say, it's for cloud switches and lights, whereas the Goldair heaters are not cloud-enabled and need a different library.
Interesting that you found pytuya
in hass.io - can you point me to the GitHub repository?
The most puzzling thing is that you're getting the status but you're unable to make any changes. That almost sounds like a credentials issue than a connection issue, because I've read that you can get the heater's status without the key but can't update it.
Like you say it does get turned off when you start HA, which is interesting. Is that an automation you've written? Because mine stay on when I restart HA, and only turn off when I specifically tell them to.
from homeassistant-goldair-climate.
If you like I could take a look at your device id and local key to see if they look correct - if you're on Twitter you could tweet me @nikrolls
and I'll follow you so you can DM me.
from homeassistant-goldair-climate.
I haven't found any reference to pytuya
in hass.io except before (0.73.x) I got an error (re pytuya
) when trying to load your code, unless I manually added it to the custom_components as outlined above.
With 0.74 I have totally replaced the custom_components folder, with no manually added pytuya
, and it doesn't give me errors and the reference shown above (deps/lib/python3.6/site-packages/pytuya/__init__.py
) looks like it is within the main system, not a hack done by me.
I agree my issue sounds like a credential issue and I think it must have been something at my end. I have two heaters and I have just unplugged one and checked all the settings for the other, and it now seems to work! I could turn the heater on and off using your code, so that is great progress. I will try with the other heater later.
I have no automations written and was having an issue with the heaters turning off - which I could only put down to me playing with HA and this code.
I will do some further testing but things are looking good.
As a improvement can you tweak the error message below? I think this is because I have one heater that is unplugged, so it can't get the state. It would be useful to have the device name in the title of the error message, and then it would be obvious which device is causing the issue!
Failed to refresh device state.
xx:xx custom_components/goldair_heater.py (ERROR)
from homeassistant-goldair-climate.
Ah, I see - the reference to deps/lib/python3.6/site-packages/pytuya/__init__.py
may be where it's looking for the file, not necessarily where it is. I'm not very familiar with this part of Python though, being new to it myself.
Glad you got one working! Great idea about the logging. That's left over from the first version where the name was only on the HA side, and the logging was done in a device-specific class. Now I have the name in the device-specific class as well (so it can be shared across platforms) and I could absolutely add that and some extra information to the logging. I'll do that shortly!
from homeassistant-goldair-climate.
Sounds good re the logging.
I'm no Python expert, but I removed the files I previously added, so I understood it to be a "standard" Hass.io installation before I added your code. For me the only real way to check would be to delve into hass.io (which I am not sure where to look) or to start from a new, stock hass.io install.
Next step for me will be to see if I can get it to play nicely with the homekit part of HA so I can control it from iOS Home app.
from homeassistant-goldair-climate.
Just a quick update. Turns out I did have the wrong credentials for one of my heaters, which was likely the source of an error posted earlier.
I'm still running Hassio and have just upgraded to 0.75.1
and both my heaters are working great with your code (I'm just using the control, haven't tried display or child lock features).
Look forward to you submitting as an official part of Home Assistant :)
from homeassistant-goldair-climate.
Great to hear! I'll update this issue with my progress as I make it.
from homeassistant-goldair-climate.
If you need any more testing or help of a non-coding variety just let us know @nikrolls happy to help if I can.
from homeassistant-goldair-climate.
Closing this as there has been no activity and many updates since. Installation via HACS works on Hass.io without any issues. If there is still an issue, please open a new ticket. Thanks!
from homeassistant-goldair-climate.
Related Issues (20)
- Workaround for HACS symlink issue HOT 2
- Goldair component errros HOT 12
- Missing Crypto requirement in manifest HOT 5
- Device frequently unavailable HOT 4
- Add support for the ElectriQ CD20PRO-LE-V2 Dehumidifier HOT 5
- Unable to use is_preset_mode in Automation HOT 1
- GoldAir Wifi Fan not being detected as a fan HOT 9
- Slow response using Home Assistant with Goldair Heater HOT 3
- No 'version' key in the manifest file - As of Home Assistant 2021.6, this integration will no longer be loaded
- Problem initialising the dehumidifieir - ValueError: None is not in list HOT 1
- Currently missing on HACS HOT 1
- Not available in HACS Integrations list HOT 1
- HomeAssistant warning about component on startup
- Water full HOT 1
- If you can't install certificates for packet capture in Android 11 then this is the fix.
- GPPF200 - LED display off HOT 1
- Easier access to device id & key HOT 7
- Goldair heater unavailable if not unreachable during hass startup
- Update of climate/lock is taking over 10 seconds is flooding log
- Temperature is not a number: standby
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-goldair-climate.