Coder Social home page Coder Social logo

home's People

Contributors

anton-johansson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

droplet-js

home's Issues

Upgrade services

... and use Helm to install them if possible.

Also upgrade Kubernetes to the latest version.

Use bearer token for EventGhost scripts

Related to #48

Currently using ?api_password when working with the API. First call after HA hass been restarted seems to fail, so I'm hoping that using a bearer token will fix it.

Remove api_password

With the upgraded Home Assistant, we have a real authentication system. We should remove the old and deprecated api_password.

However, some configurations must be fixed, for example the EventGhost configuration.

Home Assistant logs do not include stracktraces

I need a multiline parser here, and a unit test to cover that.

Example:

2018-11-04 22:00:00 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/speedtest.py", line 166, in update
    speed.get_servers(servers)
  File "/usr/local/lib/python3.6/site-packages/speedtest.py", line 1288, in get_servers
    raise NoMatchedServers()
speedtest.NoMatchedServers

Each line here was logged separately, and only the first one actually got a severity etc.

Introduce MetalLB

Instead of binding our NGINX instances with hostPort, we can use MetalLB to assign a dynamic IP address to each of them.

Replace nginx with Traefik

Won't have to worry about renewing Lets Encrypt certificates if I do, or have "complex" nginx configuration. :)

Add graphs in HA

... since Grafana is now removed.

  • Electricity usage
  • Server stats
  • Network stats

Dishwasher, prevent misreadings

image

This triggered the dishwasher started routine.

This shouldn't really happen though, so I'm not sure I should do anything about it...
I could add a "for: minutes: 1", but I don't think it's worth it.

Gather logs

Maybe add an ELK Elastic stack and route logs from all containers there? We can show Home Assistant logs, nginx logs, deCONZ logs, Grafana logs, influxdb-logs, etc.

Z-Wave network died

The network just died. I keep getting logs like this:

2018-05-08 23:09:06 WARNING (Dummy-2) [openzwave] Z-Wave Notification DriverFailed : {'notificationType': 'DriverFailed', 'homeId': 0, 'nodeId': 255}

Speedtest logs errors

2018-11-04 22:00:00 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/sensor/speedtest.py", line 166, in update
    speed.get_servers(servers)
  File "/usr/local/lib/python3.6/site-packages/speedtest.py", line 1288, in get_servers
    raise NoMatchedServers()
speedtest.NoMatchedServers

Error in Philips TV component

2018-05-01 14:08:25 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 180, in _step
    result = coro.send(None)
  File "/usr/src/app/homeassistant/helpers/entity.py", line 222, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/usr/src/app/homeassistant/components/media_player/__init__.py", line 875, in state_attributes
    in ATTR_TO_PROPERTY if getattr(self, attr) is not None
  File "/usr/src/app/homeassistant/components/media_player/__init__.py", line 875, in <dictcomp>
    in ATTR_TO_PROPERTY if getattr(self, attr) is not None
  File "/config/custom_components/media_player/philips_tv_2016.py", line 105, in volume_level
    return self._volume / self._max_volume
TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'

Strange empty responses causing strange logs

From the Traefik container:

2018/10/27 19:13:14 transport.go:1792: Unsolicited response received on idle HTTP channel starting with "\r\n"; err=<nil>

However, it's not Traefik that's generating the logs, it seems to be some code in Golang, which Traefik is written in.

golang/go#19895

Should probably try to find out which backend is causing these empty responses...

EventGhost incorrect states

Sometimes, EventGhost is reporting computer activity.

We're checking the Task.Activated.LockApp and Task.Deactivated.LockApp. These does not seem reliable. It seems like they're firing for no reason sometimes. These are basically LockApp.exe appearing and disappearing from the task list, so I assume the OS does something here.

http://www.eventghost.net/mediawiki/index.php/Built-In_Events
Could we check for System.SessionLock and System.SessionUnlock instead?

DNS server

Set up an additional DNS server that handles .local hostnames. We can use CoreDNS for that too.

Sonos randomly plays noise

The Sonos PLAYBAR randomly starts playing noise. This has happened twice now, last time being last night, at around 4 AM. Thankfully, the volume wasn't high.

Of what I could see in the app, it said that the TV was playing, so I assume this noise isn't actually a fault in the PLAYBAR, but rather something coming from the optical audio cable.

Checking the logs, this is what I found during that time, that was out of the ordinary:

2018-05-17 04:05:30 WARNING (Thread-2) [pychromecast.socket_client] Heartbeat timeout, resetting connection
2018-05-17 04:05:30 INFO (MainThread) [homeassistant.core] Bus:Handling <Event system_log_event[L]: timestamp=1526522730.4745479, level=WARNING, message=Heartbeat timeout, resetting connection, exception=, source=/usr/local/lib/python3.6/site-packages/pychromecast/socket_client.py
2018-05-17 04:07:15 INFO (MainThread) [homeassistant.components.discovery] Unknown service discovered: home_assistant {'host': '172.18.0.2', 'port': 8123, 'hostname': 'Home._home-assistant._tcp.local.', 'properties': {'version': '0.64.0', 'base_url': '<HA URL>', 'requires_api_password': True}}

I'm not sure if this can happen, but maybe the HA component did something with the Chromecast that caused it to output something to the TV, that in turn outputs it to the PLAYBAR and causes it to change source (as it should). The question is why the Chromecast would output that kind of noise.

The Chromecast usually turns on the TV when it sends a signal, which hasn't happened at these times, which makes me wonder...

Google TTS broke down

2018-12-06 23:25:13 INFO (MainThread) [homeassistant.helpers.script] Script Sonos TTS script: Running script
2018-12-06 23:25:13 INFO (MainThread) [homeassistant.helpers.script] Script Sonos TTS script: Executing step call service
2018-12-06 23:25:13 INFO (MainThread) [homeassistant.helpers.script] Script Sonos TTS script: Executing step call service
2018-12-06 23:25:14 INFO (MainThread) [homeassistant.helpers.script] Script Sonos TTS script: Executing step call service
2018-12-06 23:25:14 INFO (MainThread) [homeassistant.helpers.script] Script Sonos TTS script: Executing step call service
2018-12-06 23:25:14 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall tts.google_say (c:b8aa52e68a084bbeba49445e06213a2e): entity_id=['media_player.living_room'], message=Hello!>
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/core.py", line 1177, in _event_to_service_call
    await service_handler.func(service_call)
  File "/usr/src/app/homeassistant/components/tts/__init__.py", line 137, in async_say_handle
    options=options
  File "/usr/src/app/homeassistant/components/tts/__init__.py", line 306, in async_get_url
    engine, key, message, use_cache, language, options)
  File "/usr/src/app/homeassistant/components/tts/__init__.py", line 318, in async_get_tts_audio
    message, language, options)
  File "/usr/src/app/homeassistant/components/tts/google.py", line 83, in async_get_tts_audio
    token.calculate_token, part)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/gtts_token/gtts_token.py", line 28, in calculate_token
    seed = self._get_token_key()
  File "/usr/local/lib/python3.6/site-packages/gtts_token/gtts_token.py", line 57, in _get_token_key
    tkk_expr = re.search(".*?(TKK=.*?;)W.*?", line).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Server metrics and alarms

Server CPU has been skyhigh for a long time without any metrics or warnings. This was due to Elasticsearch crashing due to heap dumping, and kept restarting, using a lot of CPU.

Upgrade cert-manager

It's too old and ACME has "blocked" it.

E1116 12:22:04.669857       1 controller.go:183] orders controller: Re-queuing item "XXX" due to error processing: error creating new order: acme: urn:ietf:params:acme:error:rateLimited: Your ACME client is too old. Please upgrade to a newer version.

Create a request log dashboard

And include it as a Home Assistant panel.

It should include:

  • Full URL
  • Method
  • Status code
  • Response time
  • Remote address
  • User agent

Add log pipelines

We're missing log pipelines for:

  • filebeat
  • kibana
  • grafana
  • prometheus
  • homebridge
  • traefik request logs
  • portainer
  • curator

Improve device tracker

Try the iCloud platform instead of letting the iOS application send updates (because this obviously works bad).

Also, try to find out why the iOS application updates works bad.

Another (maybe more stable) solution is using the NMAP scan, like many others do. Then I'd need to make sure my iPhone won't disconnect on idle, which a lot of people seem to have an issue with.

Add nginx

That is used in front of home assistant and deconz instances.

Notify system broke down

The notify.notify and notify.ios services seems unavailable. Seen these logs too:

2018-11-04 14:36:31 WARNING (MainThread) [homeassistant.core] Unable to find service notify/notify
2018-10-29 10:32:02 ERROR (SyncWorker_15) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information

Restructure log stack

Or delete all together? I don't really look at it anyway, I stick to kubectl logs...

nginx does not log host

Since we get all nginx access logs in the same "file", it would be nice to add the host to the logging format.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.