Hi and thanks for creating this, it works great! Got it up and running in just a few minutes, and replaced my old ifttt setup with this instead.
I’m getting an error from home assistant regarding sensor.daikin not being defined, but I can use the component fine and the climate.daikin entity reports correct states for my heat pump.
A persistant error message is shown on the web interface:
Invalid config
The following components and platforms could not be set up:
sensor.daikin
Logs:
2017-11-24 10:18:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.sensor, platform=daikin, discovered=[{'name': 'Daikin indoor', 'state': 21.0}]>
2017-11-24 10:18:31 INFO (MainThread) [homeassistant.core] Bus:Handling <Event platform_discovered[L]: service=load_platform.sensor, platform=daikin, discovered=[{'name': 'Daikin outdoor', 'state': 5.5}]>
2017-11-24 10:18:31 ERROR (MainThread) [homeassistant.loader] Unable to find component sensor.daikin
2017-11-24 10:18:31 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform sensor.daikin: Platform not found.
Let me know if there’s something I can provide to help you debug this further.
PS: I don’t have any “sensor.daikin” setup myself.
If you picked up the latest version of the daikin component, then you also need homeassistant/components/discovery.py (because we now also have discovery) and homeassistant/components/sensor/daikin.py, so three files in total. The last file is used to read the inside and outside temperature and feed that into home assistant (credits to @fredrike for adding that).
Before we can launch a pull request, we will at least need a bit of documentation and possibly have to put the system specific code in a separate library (though I don’t really see the point of wrapping an API like this into a library).
Edit: I started with a working version of 0.58.1 and copied over discovery.py, climate/daikin.py and sensors/daikin.py from your git.
Here is my log. Is it communication with my adapter that is failing, or did I use a wrong version of Hass or something? When I look at https://github.com/Apollon77/daikin-controller it seems like BRP069A41 and BRP069A42 have a identical API
<2017-11-28 17:06:52 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/discovery.py”, line 109, in new_service_found
discovery_hash = json.dumps([service, info], sort_keys=True)
File “/usr/lib/python3.5/json/init.py”, line 237, in dumps
**kw).encode(obj)
File “/usr/lib/python3.5/json/encoder.py”, line 198, in encode
chunks = self.iterencode(o, _one_shot=True)
File “/usr/lib/python3.5/json/encoder.py”, line 256, in iterencode
return _iterencode(o, 0)
File “/usr/lib/python3.5/json/encoder.py”, line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: b’mydaikinappusername’ is not JSON serializable>
Good to hear it work. My co-author made the discovery part, I don’t understand how that works (yet). We plan to do a pull request for the main source. We still need a bit of documentation and I have to find out how I make that.
hi, the new update 0.59.1 broke the custom component;
I’ve this error into the log
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py”, line 247, in async_add_entity
yield from entity.async_update_ha_state()
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 231, in async_update_ha_state
attr)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py”, line 333, in _attr_setter
value = getattr(self, name)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/climate/init.py”, line 736, in supported_features
raise NotImplementedError()
NotImplementedError
I think that is related to the issue #10658 but I’ve not the skill to dig the solution
Thanks for the links, should not be difficult to add that. If anyone feels the urge, feel free to do so, I will likely not get to it before the weekend.
Fixed the NotImplementedError that appeared in 0.59.1. You should grab the new components/climate/daikin.py from the github fork above and replace your custom component.
There is already a pull request for the daikin skyfi version, I will make a comment on that pull request how to go forward with the two different systems.
Yeah, noticed that. Believe a quick comment about this needs to be added soon to that pull request (before it gets merged in), but I’m not really in a position to start the discussion on github for this. However, I’ll try to have a chat with some devs on Discord and get their view on how to proceed.
A big thanks for everyone’s input on this so far! Really looking forward to this being added as component to Home Assistant as it’s now summer here in Aus and my new Daikin split (with BRP072A42) is hopefully going in this weekend!
I’m also willing to help to make sure that we’ll make it work also for the Skyfi version, but I’ll need someone that actually has Skyfi since I don’t have it. Does anyone offers for testing on Skyfi ?
Maybe @robhuls could also help.
I updated to the dev build last night and it’s working very well after a quick test. No errors at all and all controls seem to work as expected. Thank you for all the work!
I’m using an Australian Daikin Zena 3.5kW unit with BRP072A42 adapter so can’t help with SkyFi sorry.