dennisschroeder / glome Goto Github PK
View Code? Open in Web Editor NEWA home automation lib that works with Home Assistant. Created in and for Gleam Lang.
License: MIT License
A home automation lib that works with Home Assistant. Created in and for Gleam Lang.
License: MIT License
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/test.yml
actions/checkout v2.0.0
gleam-lang/setup-erlang v1.1.3
gleam-lang/setup-gleam v1.0.2
thanks a lot for this great HA library.
I just discovered Gleam lang and am excited by it so far. I'm also a hobby developer of HA-related automation (I contributed a bit to gome-assistant and I am also writing my port of it using Zig lang). I selected your lib as the way to get familiar with Gleam lang. :)
In my fork, you can see 1st attempt to migrate this lib into the latest versions of both gleam and relevant modules:
As I'm really very new to gleam/erlang/otp, some of the changes have not been tested yet - kind of a naive/best guess attempt so far.
When trying to execute the following test:
pub fn gla_test() {
let config =
Configuration(
host: "SOME_IP",
port: 8123,
access_token: AccessToken( "SOME_TOKEN",
),
)
homeassistant.connect(config, handle_connection)
}
fn handle_connection(ha: HomeAssistant) -> HomeAssistant {
io.debug("Connecting to Home Assistant...")
ha
}
I get this error:
{undef,
[{gun,ws_send,
[{connection,#Ref<0.461272038.4283170832.260722>,<0.146.0>},
{text,
<<"{\"type\":\"auth\",\"access_token\":\"SOME_TOKEN">>}],
[]},
{nerf@websocket,ws_send,2,
[{file,
"/home/jiri/dev/ha/gla/glome/build/dev/erlang/nerf/_gleam_artefacts/[email protected]"},
{line,64}]},
{glome@core@authentication,authenticate,2,
[{file,
"/home/jiri/dev/ha/gla/glome/build/dev/erlang/glome/_gleam_artefacts/glome@[email protected]"},
{line,75}]},
{glome@homeassistant,'-connect/2-fun-1-',3,
[{file,
"/home/jiri/dev/ha/gla/glome/build/dev/erlang/glome/_gleam_artefacts/[email protected]"},
{line,216}]}]}
Any idea why gun cannot send the message to HA?
Thanks!
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.