leosperry / ha-kafka-net Goto Github PK
View Code? Open in Web Editor NEWIntegration that uses Home Assistant Kafka integration for creating home automations in .NET and C#
License: Other
Integration that uses Home Assistant Kafka integration for creating home automations in .NET and C#
License: Other
Expectation is that properties should pass to HA.
Potentially, a new model could be used here.
There are a few missing methods that must be implemented.
Workaround: Use IAutomationFactory instead of IAutomationBuilder.
We need an object for tracking trace data. It should include:
V5 features will need a way to look up an automation by key
Acceptance Criteria
Create a new view in the UI for rendering information about a specific automation
Data to list
To be added in a later story
At restart, the Old and New values of a state change can be the same if the event being handled is the same as last cached.
In the case of DurableAutoOff, this means that TurnedOn()
will return false because it is trying to check old versus new, and at this point in time, the actual Old
is gone. Both states could be saying "on". So, the code is not saying that it turned or changed from off to on.
Options:
Old
. Instead only check if it is currently on.Fix coming today.
After a power outage, if HA comes back online before the kafka instance, HA will not load the integration.
Unfortunately, HA does not expose state of inetgrations via API.
We might be able to check the logs, but they are not clear. Example HA log:
2024-02-06 07:54:05.161 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/apache_kafka/__init__.py", line 152, in write
await self._producer.send_and_wait(self._topic, payload)
File "/usr/local/lib/python3.11/site-packages/aiokafka/producer/producer.py", line 461, in send_and_wait
future = await self.send(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiokafka/producer/producer.py", line 444, in send
key_bytes, value_bytes = self._serialize(topic, key, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiokafka/producer/producer.py", line 349, in _serialize
self._producer_magic)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AIOKafkaProducer' object has no attribute '_producer_magic'
Expected Behavior:
If we can confirm kafka integration is down or no events are streaming to kafka for configurable amount of time, restart home assistant which can be done with a service call.
This should be a non-breaking change where the name defaults to the type name
We need a way to capture log data and add it to trace data
Currently, the UI uses a GUID that is randomly generated and changes every time the application loads. This is not usable for persisting any kind of state.
Acceptance Criteria:
On the automation page, list out the trace data
Should Display
Currently there is a single react component which handles a nested data structure.
It would be nice to have smaller react components.
This may be a way to hide non-editable files from consumers of the nuget package
Work-around: use LightOffOnNoMotion() instead.
When a state is converted to any HaEntityState<DateTime?, T>, the State is converting correctly.
Workaround:
Parse the date before converting from string.
Hook into the automation pipeline and create trace data
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.