Giter Site home page Giter Site logo

harmony's Introduction

Howard Durdle

My background is information security in defence and finance, but I've worked at every level of the tech stack from bare metal systems and networking, through IT management, software development and C-level positions. Professionally I now work with SMEs to improve their security posture and enhance their IT and Software Development functions. As a hobbyist, I spend time with home automation and electronics - such as the ESP 8266 and related chips. Most of my GitHub stuff is work that integrates with systems like Home Assistant and Magic Mirror to do useful things like track where my cats are.

Twitter Follow Linkedin: hdurdle Website Mastodon

harmony's People

Contributors

hdurdle avatar lakritzator avatar slion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

harmony's Issues

System.Net.Sockets.SocketException: No such host is known

Thanks for sharing code. I am seeing this issue while running code,
when I provide my username, password and ip address.
the ip address used is local ip for harmony hub.
Please suggest what can fix that.

Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.InternalGetHostByAddress(IPAddress address, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at HarmonyConsole.Program.Main(String[] args) in C:\Data\harmony-master\HarmonyConsole\Program.cs:line 80

Error on Xmpp.Open(username, token); in HarmonyClient.cs any ideas on the problem

System.IndexOutOfRangeException was unhandled
Message=Index was outside the bounds of the array.
Source=Harmony
StackTrace:
at HarmonyHub.HarmonyClientConnection.HarmonyClientConnection_OnSocketError(Object sender, Exception ex) in C:\Documents and Settings\Chris\Desktop\Harmony\HarmonyHub\HarmonyClientConnection.cs:line 28
at agsXMPP.XmppClientConnection.SocketOnError(Object sender, Exception ex)
at agsXMPP.net.BaseSocket.FireOnError(Exception ex)
at agsXMPP.net.ClientSocket.Connect()
at agsXMPP.XmppConnection.SocketConnect()
at agsXMPP.XmppConnection.SocketConnect(String server, Int32 port)
at agsXMPP.XmppClientConnection.OpenSocket()
at agsXMPP.XmppClientConnection._Open()
at agsXMPP.XmppClientConnection.Open(String username, String password)
at HarmonyHub.HarmonyClient..ctor(String ipAddress, Int32 port, String token) in C:\Documents and Settings\Chris\Desktop\Harmony\HarmonyHub\HarmonyClient.cs:line 48
at HarmonyHub.HarmonyAuthenticationClient..ctor(String ipAddress, Int32 port) in C:\Documents and Settings\Chris\Desktop\Harmony\HarmonyHub\HarmonyAuthenticationClient.cs:line 14
at HarmonyConsole.Program.LoginToLogitech(String email, String password, String ipAddress, Int32 harmonyPort) in C:\Documents and Settings\Chris\Desktop\Harmony\HarmonyConsole\Program.cs:line 177
at HarmonyConsole.Program.Main(String[] args) in C:\Documents and Settings\Chris\Desktop\Harmony\HarmonyConsole\Program.cs:line 81
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Still supported?

Hi, is this still supported?

Trying to use the code, while using my account.
GetUserAuthToken(username,password) with my account gives me:
"The remote server returned an error: (400) Bad Request"

Thanks

Redondo

System.Net.Http.HttpRequestException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known

Hi All,

I am implementing my first docker project with ocelot api gateway and i am using asp.net core 2.2 to develop api's. so everything works fine on my local machine when using docker-compose command to run the container.
But when i push my images to docker hub and then pulling back those images from there my gateway api not responding and getting 500 internal server error in postman but when i hit another api servicea form postman i am getting 401 unauthorised status code.
I don't whats going wrong . Please help me

here is my ocelot config

{
"ReRoutes": [
{
"DownstreamPathTemplate": "/api/abc/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "nst.xxx.abcapi",
"Port": 80
}
],
"UpstreamPathTemplate": "/abc/{everything}",
"UpstreamHttpMethod": [],
"AuthenticationOptions": {
"AuthenticationProviderKey": "Test.Key",
"AllowedScopes": []
}
},
{
"DownstreamPathTemplate": "/api/xyz/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "nst.xxx.xyzapi",
"Port": 80
}
],
"UpstreamPathTemplate": "/xyz/{everything}",
"UpstreamHttpMethod": [],
"AuthenticationOptions": {
"AuthenticationProviderKey": "Test.Key",
"AllowedScopes": []
}
},
{
"DownstreamPathTemplate": "/api/auth/{everything}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "nst.xxx.tokenapi",
"Port": 80
}
],
"UpstreamPathTemplate": "/auth/{everything}",
"UpstreamHttpMethod": []
},
],
"GlobalConfiguration": {
"RequestIdKey": "OcRequestId",
"AdministrationPath": "/administration"
}
}

and when i inspect the docker container logs then here is the response ๐Ÿ‘Ž
Ocelot.Requester.Middleware.HttpRequesterMiddleware[0]
requestId: 0HLNRILO35FS1:00000004, previousRequestId: no previous request id, message: Error making http request, exception: System.Net.Http.HttpRequestException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask1.get_Result()
at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask) at System.Threading.Tasks.ValueTask1.get_Result()
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Ocelot.Requester.HttpClientHttpRequester.GetResponse(DownstreamContext context) warn: Ocelot.Responder.Middleware.ResponderMiddleware[0] requestId: 0HLNRILO35FS1:00000004, previousRequestId: no previous request id, message: Error Code: UnableToCompleteRequestError Message: Error making http request, exception: System.Net.Http.HttpRequestException: No such host is known ---> System.Net.Sockets.SocketException: No such host is known at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Threading.Tasks.ValueTask1.get_Result()
at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask1 creationTask)
at System.Threading.Tasks.ValueTask1.get_Result() at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)
at Ocelot.Requester.HttpClientHttpRequester.GetResponse(DownstreamContext context) errors found in ResponderMiddleware. Setting error response for request path:/auth/token, request method: POST

Thanks
Anil

HarmonyConsole usage

I can run -g and I get the token and Current Activity: PowerOff.
However when I try -l to get the list of devices I only get the help.
I must be missing something.
Do you have more usage examples?

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.