Chorus2 redesign/port
#16
Alright sorry for the late update, its the last month of school so exams are coming up. I've been trying to get websockets to work in elm with little success. I tried following the instructions here: https://github.com/billstclair/elm-webso...tree/4.1.0 to use ports but I guess I'm still unfamiliar with where to put the port definitions. Unless @Razze or someone else can offer some advice, I think I'm going to try and find a working elm 0.18 websocket example and try adapting that to communicate with Kodi.
Reply
#17
Okay! Some success, I got this example running and communicating with Kodi: https://github.com/MattCheely/elm-port-examples. It uses Node as well as Elm which is kinda strange but I'm working on understanding it now and hopefully I can get a pure Elm solution running soon.
Reply
#18
(2020-04-09, 03:20)ionif Wrote: Okay! Some success, I got this example running and communicating with Kodi: https://github.com/MattCheely/elm-port-examples. It uses Node as well as Elm which is kinda strange but I'm working on understanding it now and hopefully I can get a pure Elm solution running soon.

That's expected, that's the whole point of ports Smile

This might be helpful:
https://github.com/elm-community/js-inte...n-examples

This might also be worth a read https://guide.elm-lang.org/interop/ports.html
Reply
#19
(2020-04-14, 01:05)Razze Wrote:
(2020-04-09, 03:20)ionif Wrote: Okay! Some success, I got this example running and communicating with Kodi: https://github.com/MattCheely/elm-port-examples. It uses Node as well as Elm which is kinda strange but I'm working on understanding it now and hopefully I can get a pure Elm solution running soon.

That's expected, that's the whole point of ports Smile

This might be helpful:
https://github.com/elm-community/js-inte...n-examples

This might also be worth a read https://guide.elm-lang.org/interop/ports.html 
Ah thanks, yeah I'm slowly understanding the ecosystem of elm; its a little strange to me. I read the documentation you linked and I'm going to get the examples you linked running on my laptop next. Adapting those should be next.
Reply
#20
you might want to reread/ check the docs, as it has been updated in the last days https://guide.elm-lang.org/interop/
Reply
#21
Ah okay thanks for the heads up! So sending some actions like play/pause are pretty straightforward and I have those rigged up to buttons. The harder actions are ones where you have to wait to get the response and then update some information, I'm still figuring out how to do this but I wanted to give an update.
Reply
#22
(2020-04-26, 03:10)ionif Wrote: Ah okay thanks for the heads up! So sending some actions like play/pause are pretty straightforward and I have those rigged up to buttons. The harder actions are ones where you have to wait to get the response and then update some information, I'm still figuring out how to do this but I wanted to give an update.

Thank you, much appreciated.
Reply

Logout Mark Read Team Forum Stats Members Help
Chorus2 redesign/port0