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
Ebusd integration #16899
Ebusd integration #16899
Conversation
Integration between ebusd (https://github.com/john30/ebusd), daemon for communication with eBUS heating systems, and homeassistant using sensor component.
update requirements_all
Solve: "Class 'EbusdData' inherits from object, can be safely removed from bases"
hund string length fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests will need added for the component as well.
CONF_MONITORED_VARIABLES changed to CONF_MONITORED_CONDITIONS
coveragerc updated
Could not find a related documentation PR, therefore added the label |
Pull request submitted to add documentation to home-assistant.io https://github.com/home-assistant/home-assistant.io/pull/6412 |
Hi, i tried to add your component as a custom component and the configuration seems ok so far (at least the check says so). I followed your description, but i do not see any values in the dashboard. How do i add them? |
Is your ebus daemon running and are you sure that you're fetching variables which are supported by your hardware? |
Yes, my ebus daemon is running and i can read the desired value. Unfortunately it was not in the config, so I added the following line:
|
And the config looks like that: Weather predictionsensor:
#ebusd
|
CONF_MONITORED_VARIABLES restored, raise PlatformNotReady exception and guard clause added on update()
Added HWTemperature to configurable variables
I have added HWTemperature to monitored_conditions. |
revert to CONF_MONITORED_CONDITIONS
I have now change the code in order to have in const.py sensor types splitted by circuit and I also create the type 4 for value;status return values |
Access to a protected member fix
Is it everthing fine with my component? When it will be merged on master? |
Can you please explain how the different values are updated? At the moment i have approx. 20 values I read from my heatpump, but it seems that the values are read in serial and not in parallel. Is this correct? My wish is, that I can read values in parallel with different query cycles. For example, i will read the outside-temperature every 2 minutes, but the circulation pump every 5s to check if it is running. Is this anyhow possible? |
No, this is not possible cause if you already open a socket connection if you open another one in parallel it will receive an error cause socket cannot manage more than one connection open at time. |
But what is exactly the MINIMUM_TIME_BETWEEN_UPDATE parameter? Is this the time which is waited between Sensor_A_Value and Sensor_B_Value or is this the time between Sensor_A_Value and Sensor_A_Value2? And if it is the time between to different sensor values, are they read in serial or random? |
That is the time between the refresh for the same sensor. |
Ok, but then i would expect that i will see all sensor-values after this time if i restart the system. But for some values it takes up to 5 minutes until I see the first value... |
It may depend on how often your boiler broadcasts the value. AFAIK with eBus protocol devices (boilers, etc) periodically broadcast variables on their own. Maybe it's possible to query the device (im not sure about this) specifically for a particular variable, but during normal usage the boiler just periodically broadcasts values and eBusd picks them up. |
I think that it’s more a home-assistant problem. The value I’m observing is not a brodcasted, it’s a queried one. Even if I query the value with ebusctl the value is not updated in homeassistant..
… Am 16.10.2018 um 16:38 schrieb Michal ***@***.***>:
Ok, but then i would expect that i will see all sensor-values after this time if i restart the system. But for some values it takes up to 5 minutes until I see the first value...
It may depend on how often your boiler broadcasts the value. AFAIK with eBus protocol devices (boilers, etc) periodically broadcast variables on their own. Maybe it's possible to query the device (im not sure about this) specifically for a particular variable, but during normal usage the boiler just periodically broadcasts values and eBusd picks them up.
Can you ssh to your eBusd server and try running ebusctl read to check if the value has been broadcasted by the boiler?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
So I think is not an home-assistant issue too cause ebusctl open a socket connection as my component do |
It's really hard to tell without further investigation. This sensor doesnt speak with the device directly, but through an external daemon/server.
Correct me if im wrong - but its only possible to "query" a value by running ebusctl read command manually, otherwise you're just relying on values broadcasted by the device. |
Ok, but what happens if two components try to connect at the same time? Is one blocked? And if yes, how often does it try to reconnect?
… Am 16.10.2018 um 16:59 schrieb CrazYoshi ***@***.***>:
I think that it’s more a home-assistant problem. The value I’m observing is not a brodcasted, it’s a queried one. Even if I query the value with ebusctl the value is not updated in homeassistant..
…
Am 16.10.2018 um 16:38 schrieb Michal ***@***.***>: Ok, but then i would expect that i will see all sensor-values after this time if i restart the system. But for some values it takes up to 5 minutes until I see the first value... It may depend on how often your boiler broadcasts the value. AFAIK with eBus protocol devices (boilers, etc) periodically broadcast variables on their own. Maybe it's possible to query the device (im not sure about this) specifically for a particular variable, but during normal usage the boiler just periodically broadcasts values and eBusd picks them up. Can you ssh to your eBusd server and try running ebusctl read to check if the value has been broadcasted by the boiler? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
So I think is not an home-assistant issue too cause ebusctl open a socket connection as my component do
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I think home-assistant components runs async. Anyway this is not the place to discuss about it, so please only update if you have suggestion or issues with this component. |
I set the MINIMUM_TIME... to 5 seconds and for example for the CompPressLow i get the following timestamps in the log:
As you can see, the time between the queries is very random. Sorry for discussing this topic here, but whereelse can we do it? |
You cannot have different timing for each monitored_variables and it is not possible to trigger them all every 5 seconds. I think there is no way to achieve what you want using a single component. |
_LOGGER.error() | ||
|
||
|
||
class Ebusd(Entity): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we adding a sensor entity to a ebus component platform? Shouldn't this be a sensor component platform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that the author tried to pull this as a sensor before, but @balloob has rejected that PR asking CrazYoshi to rewrite this as a component.
Also there's a huge potential for this component to grow in the future, right now it's mostly reading sensor values, but in the future it may also get binary sensors, switches, or even thermostat functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes exactly, if you scroll up you can see the change requested by him. That's the reason why I start a new component. Ebus is a generic container where also other component using the same standard can be put inside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even though you have a component, you can still have the sensor be defined in sensor/ebusd.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what should I do to this component again? I didn't get
Can you give me some suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Component manages connection and hosts services, sensor platform of ebusd will show some info as a sensor entity.
No, as there are parameters which can also be written...
… Am 20.10.2018 um 14:36 schrieb Martin Hjelmare ***@***.***>:
@MartinHjelmare commented on this pull request.
In homeassistant/components/ebus/ebusd.py:
> + name = call.data.get('name')
+ value = call.data.get('value')
+ command = WRITE_COMMAND.format(self._circuit, name, value)
+
+ try:
+ _LOGGER.debug("Opening socket to ebusd %s: %s", name, command)
+ command_result = ebusdpy.send_command(self._address, command)
+ if 'done' not in command_result:
+ _LOGGER.warning('Write command failed: %s', name)
+ except socket.timeout:
+ _LOGGER.error("socket timeout error")
+ except socket.error:
+ _LOGGER.error()
+
+
+class Ebusd(Entity):
Why are we adding a sensor entity to a ebus component platform? Shouldn't this be a sensor component platform?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If no existing actuator components, switch, light, etc, fit the writable parameters we should probably just implement those as services in the ebus component. Move read parameters to a sensor component platform. |
I don't really agree with this aproach. I have created the ebus component cause I cannot have a service inside a sensor component. Split information read fron ebus and command always on the same device does not make really sense in my opinion. |
add automatic state
elif self._type == 1: | ||
self._state = timer_format(self.data.value[self._name]) | ||
elif self._type == 2: | ||
if self.data.value[self._name] == 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also add the recognition of such a value as 'on' or self.data.value[self._name] == 'on'
, , because frequent are just such answers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is the STATE_ON for that. In this way it will use also translation
Hi @CrazYoshi would it be possible to move from MIN_TIME_INTERVALL to SCAN_INTERVAL, so we would be able to define different ebusd platforms with different SCAN_INTERVALS. I tried to implement this, but didn't get it work... |
This PR seems to have gone stale. Closing it. |
Description:
Integration between ebusd (https://github.com/john30/ebusd), daemon for communication with eBUS heating systems, and homeassistant using sensor component.
Example entry for
configuration.yaml
: