Open DAE51D opened 3 months ago
I added this line to configuration.yaml
camera: !include cameras.yaml
then created cameras.yaml
- platform: generic
name: "Kasa Mounted"
still_image_url: "http://homeassistant.local:43330/thumbnails/kasa_mounted.jpg"
stream_source: "rtmp://homeassistant.local:43331/live/kasa_mounted"
verify_ssl: false
- platform: generic
name: "Kasa Spot"
still_image_url: "http://homeassistant.local:43330/thumbnails/kasa_spot.jpg"
stream_source: "rtmp://homeassistant.local:43331/live/kasa_spot"
verify_ssl: false
- platform: generic
name: "Kasa Pan Tilt"
still_image_url: "http://homeassistant.local:43330/thumbnails/kasa_pantilt.jpg"
stream_source: "rtmp://homeassistant.local:43331/live/kasa_pantilt"
verify_ssl: false
- platform: generic
name: "Kasa Spot 2K"
still_image_url: "http://homeassistant.local:43330/thumbnails/kasa_spot2k.jpg"
stream_source: "rtmp://homeassistant.local:43331/live/kasa_spot2k"
verify_ssl: false
Now I get this error when HA starts up...
But if i remove that line (moving
name
up of course) I get other errors
That is exactly what your documentation says to do?!
I see this in the log too...
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Nginx
Nginx Started
Starting controller
Starting KasaStreamer
info: KasaStreamer.HAListener[0]
Initial toggle state: Enabled
info: KasaStreamer.Camera[0]
[kasa_pantilt] Starting camera
info: System.Net.Http.HttpClient.KasaHttpClient.LogicalHandler[100]
Start processing HTTP request GET https://192.168.1.76:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: System.Net.Http.HttpClient.KasaHttpClient.ClientHandler[100]
Sending HTTP request GET https://192.168.1.76:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: KasaStreamer.Camera[0]
[kasa_mounted] Starting camera
info: System.Net.Http.HttpClient.KasaHttpClient.LogicalHandler[100]
Start processing HTTP request GET https://192.168.1.149:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: System.Net.Http.HttpClient.KasaHttpClient.ClientHandler[100]
Sending HTTP request GET https://192.168.1.149:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: KasaStreamer.Camera[0]
[kasa_spot] Starting camera
info: System.Net.Http.HttpClient.KasaHttpClient.LogicalHandler[100]
Start processing HTTP request GET https://192.168.1.142:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: System.Net.Http.HttpClient.KasaHttpClient.ClientHandler[100]
Sending HTTP request GET https://192.168.1.142:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: KasaStreamer.Camera[0]
[kasa_spot2k] Starting camera
info: System.Net.Http.HttpClient.KasaHttpClient.LogicalHandler[100]
Start processing HTTP request GET https://192.168.1.245:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: System.Net.Http.HttpClient.KasaHttpClient.ClientHandler[100]
Sending HTTP request GET https://192.168.1.245:19443/https/stream/mixed?video=h264&audio=g711&resolution=hd
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /app
info: KasaStreamer.Ffmpeg[0]
[kasa_pantilt] Ffmpeg started
info: KasaStreamer.Ffmpeg[0]
[kasa_spot2k] Ffmpeg started
info: KasaStreamer.Ffmpeg[0]
[kasa_mounted] Ffmpeg started
info: KasaStreamer.Ffmpeg[0]
[kasa_spot] Ffmpeg started
If I try to go to an endpoint like http://homeassistant.local:43330/thumbnails/kasa_spot.jpg I get a 404 not found error (for all 4 cameras which I can see working in the TPLink android app)
Then log pukes this stack trace...
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken)
at KasaStreamer.KasaStreamReader.StartSplittingStream(CancellationToken cancellationToken) in /KasaStreamer/KasaStreamer/KasaStreamReader.cs:line 117
fail: KasaStreamer.KasaStreamReader[0]
[kasa_spot2k] An error occurred while reading camera stream.
System.IO.IOException: Unable to write data to the transport connection: Broken pipe.
---> System.Net.Sockets.SocketException (32): Broken pipe
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException(SocketError error, Boolean forAsyncThrow)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.SendAsyncForNetworkStream(Socket socket, CancellationToken cancellationToken)
at System.Net.Sockets.Socket.SendAsyncForNetworkStream(ReadOnlyMemory`1 buffer, SocketFlags socketFlags, CancellationToken cancellationToken)
at System.Net.Sockets.NetworkStream.WriteAsync(ReadOnlyMemory`1 buffer, CancellationToken cancellationToken)
at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at System.IO.Stream.CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at KasaStreamer.KasaStreamReader.StartSplittingStream(CancellationToken cancellationToken) in /KasaStreamer/KasaStreamer/KasaStreamReader.cs:line 136
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at Microsoft.AspNetCore.WebUtilities.MultipartReader.ReadNextSectionAsync(CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions.DrainAsync(Stream stream, ArrayPool`1 bytePool, Nullable`1 limit, CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at Microsoft.AspNetCore.WebUtilities.MultipartReaderStream.ReadAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at Microsoft.AspNetCore.WebUtilities.BufferedReadStream.EnsureBufferedAsync(Int32 minCount, CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Net.Http.HttpConnection.ChunkedEncodingReadStream.ReadAsyncCore(Memory`1 buffer, CancellationToken cancellationToken)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder.SetResult()
at System.Net.Http.HttpConnection.FillAsync(Boolean async)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](TIOAdapter adapter, Memory`1 buffer)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
at System.Threading.Tasks.Task`1.TrySetResult(TResult result)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.SetExistingTaskResult(Task`1 task, TResult result)
at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder.SetResult()
at System.Net.Security.SslStream.FillBufferAsync[TIOAdapter](TIOAdapter adapter, Int32 numBytesRequired)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.InvokeContinuation(Action`1 continuation, Object state, Boolean forceAsync, Boolean requiresExecutionContextFlow)
at System.Net.Sockets.SocketAsyncContext.OperationQueue`1.ProcessSyncEventOrGetAsyncEvent(SocketAsyncContext context, Boolean skipAsyncEvents, Boolean processAsyncEvents)
at System.Net.Sockets.SocketAsyncContext.HandleEvents(SocketEvents events)
at System.Net.Sockets.SocketAsyncEngine.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
--- End of stack trace from previous location ---
--- End of inner exception stack trace ---
at System.IO.Stream.CopyToAsyncInternal(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
at KasaStreamer.KasaStreamReader.StartSplittingStream(CancellationToken cancellationToken) in /KasaStreamer/KasaStreamer/KasaStreamReader.cs:line 138
I would make sure you have the tp-link integration added, as well as the Kasa Camera addon added via the add on store you can find it by adding this repo's url to the Add Ons Store -> Settings (three dots in right top corner) -> Repositories and copy paste the url. Refresh browser home assistant site, then hopefully this should get your cameras recognized source: https://www.youtube.com/watch?v=Qi76-rQIw_A
Thanks for replying, however I do have the Kasa Add on (also my config for it is shown above). I have the cameras set to static IP on my router (also shown above). I have the TP-Link added as I have several of the wall switches already. AND I'm using the camera illustrated in the video.
For starters then, am I adding the cameras
to the proper place as per my post above? Or is there somewhere else I'm supposed to do that?
I'm new-ish to Home Assistant. Every device I have so far has been auto-discovered and setup.
I got this plugin installed via HACS and set the user/pass and camera array. Nothing is "auto-discovered" (expected it seems)
So then where does this go? https://github.com/joshgetter/hassio-addons/blob/master/kasa-camera/README.md#adding-camera-to-home-assistant
What file? I haven't needed to edit a
.yaml
file for a device and i don't see any obvious ones except maybeconfiguration.yaml
where I put that block (adjusting of course) but don't see anykasa_
entities (as I named them in the plugin page)Please update the
README.md
file to be more explicit and spell out exactly what to do for those just starting out.