SMerrony / aghast

AGHAST is A Go Home Automation SysTem closely coupled with MQTT.
MIT License
6 stars 0 forks source link

Not needing to first add a new device to the tuya app ? #7

Closed gerardwebb closed 3 years ago

gerardwebb commented 3 years ago

really nice project in that its very simple and easy to use.

I was wondering if there is any thoughts on supporting not needing to add new devices to the tuya app. the reason being that tuya hack is well known and turned many devices into bots on a botnet in the past, and i just prefer to not expose stuff in the house to needing third parties..

SMerrony commented 3 years ago

Thanks.

I agree with your feelings about linking domestic things to third parties. I am now using the recently-added Zigbee2mqtt Integration to interface directly with my Lidl/Tuya/Zigbee sockets. The only remaining use I have for the Tuya Integration is for their WiFi-only stuff (one bulb in my case!), I don't know how you would go about bypassing the third-party apps for that kind of thing. Do you know of any solutions that don't involve a soldering iron?

I should add that I'm rethinking AGHAST after having actually used it for a while - when I get time there will be an AGHAST2 which will be very similar externally but quite different internally.

gerardwebb commented 3 years ago

hey

did you still have to use the Tuya app to commission the devices into your house initially though ?

AGHAST2. Can you give me a brief summary ?

I am looking to rewrite the GUi using GIOUI. https://gioui.org/, and so have the GUI 100% in golang for web, Desktop and Mobile. If your interested let me know and we can collaborate.

SMerrony commented 3 years ago

Hi again!

I had to use the Tuya app initially just for the WiFi lamp. All the ZigBee stuff is now working nicely via zigbee2mqtt and AGHAST with no need for third-party apps even when setting them up (even if they are Tuya).

AGHAST2 is becoming just the next version of AGHAST - I have started on it. You can see the progress and some updated docs on the Move-to-MQTT-Events branch where I am doing the work. I am discarding all the internal events stuff and simply using MQTT instead.

As you know, there is currently no GUI in AGHAST - I am continuing the focus on providing everything via MQTT in the most accessible manner possible without tying things to any particular front-end. If you fancy developing a GUI with GIOUI then I would certainly not discourage you :-) (I am finding Node-Red certainly has its limitations, and am a bit concerned for its future after the recent less-than-stellar v.2 release.) If you would be happy to only communicate with the AGHAST server via MQTT, then I would be happy to collaborate!

gerardwebb commented 3 years ago

Hey @SMerrony

about the gio gui, i have some questions.

Web version will need to use http, but Mobile and Desktop version can use MQTT. Is there a HTTP API to MQTT ?

Plugins based approach might be best so that new dashboard widgets can be added without recompiling. This can be done by describing each Widget with a Markup that is provided by the backend, and that the GIO GUI renders. Here is an example of he lib i can use for it: https://github.com/ajstarks/giocanvas. See screenshot, etc

Languages. DO you want to support multiple languages ? GIO can do this also.

SMerrony commented 3 years ago

Hi,

I think I should have been more clear - I don't want to put a GUI in the AGHAST code, but I would cooperate with a separate GUI-only dashboard project.

See http://www.steves-internet-guide.com/mqtt-websockets/ for MQTT in the browser.

To be honest, I doubt that Go is really the best choice for a new MQTT dashboard - I've tried various GUI toolkits and they all leave a lot to be desired at the moment.

gerardwebb commented 3 years ago

Hi,

I think I should have been more clear - I don't want to put a GUI in the AGHAST code, but I would cooperate with a separate GUI-only dashboard project.

makes sense... Will do in my repo and let you know..

See http://www.steves-internet-guide.com/mqtt-websockets/ for MQTT in the browser.

will check it out.

To be honest, I doubt that Go is really the best choice for a new MQTT dashboard - I've tried various GUI toolkits and they all leave a lot to be desired at the moment.

I know exactly what you mean. I tried Vue, Flutter, fyne and probably a few others.

Some links if your curious:

Latest blog updates https://lists.sr.ht/~eliasnaur/gio/%3CCAFcc3FQF-z258qsHJko1WLhtK3P1Vp_5uAjHibfyMY60ULW1vw%40mail.gmail.com%3E

BTW, Any main.go can be run with just "go run ." on desktop. Nothing needed on your OS. so just clone and run.

chat app example: https://git.sr.ht/~gioverse/chat https://github.com/gioverse/chat

gerardwebb commented 3 years ago

looks like https://github.com/eclipse/paho.mqtt.golang already includes websockets support for browsers ?

is so then makes it easy to use gio with it for the Browser WASM compile target.