Achronite / energenie-ener314rt

Node module for RaspberryPi energenie ener314-rt board, used by node-red-contrib-energenie-ener314rt
MIT License
4 stars 2 forks source link

Create MQTT Implementation #22

Closed Achronite closed 1 year ago

Achronite commented 1 year ago

Create a new stand-alone node.js app that wraps the functionality of this repo and uses MQTT as the interface method.

The primary aim would be to support Home Assistant, but other servers could utilize this as well.

GiantCheesepuff commented 1 year ago

Hey, I'm really interested in this addition. I'm very new to the whole home automation and Home Assistant stuff (and GitHub). We've got Energenie switches that i'd love to convert to locally controlled with HA integration :)

Glad to help and test if need be although not sure how much help i'd be with development.

Achronite commented 1 year ago

I don't know much about Home Assistant. @GiantCheesepuff Are you able to help with the topic design for MQTT? I was thinking along these lines:

UPDATED: 2/1/2023

device command topic state topic other topics...
ook-switch energenie/ook/zone/switchNum/command energenie/ook/zone/switchNum/state n/a
openThings-switch energenie/2/deviceNum/switch/command energenie/2/deviceNum/switch/state energenie/2/deviceNum/REAL_POWER/state
openThings-monitor n/a energenie/5/deviceNum/switch/state energenie/5/deviceNum/APPARENT_POWER/state
openThings-pir n/a energenie/12/deviceNum/motion/state n/a
Achronite commented 1 year ago

@GiantCheesepuff What devices do you own? Are they just dump switches (ENER002/equiv)?

Achronite commented 1 year ago

Alpha version now available at https://github.com/Achronite/mqtt-energenie-ener314rt

genestealer commented 1 year ago

Hey guys, just so you know, I have been working on MQTT integration for home assistant for a few weeks using the MQTT Auto Discovery. Happy to collaborate. Using the auto discovery, you don't have to set up anything in home assistant apart from enabling MQTT, It's the same design philosophy as Zigbee2MQTT.

genestealer commented 1 year ago

I have, eTRV's, plug-in sockets switches, dual and single light switches and dimmable light switches.

Achronite commented 1 year ago

Please let me know the details. I'm new to Home Assistant, but from what I've read, it is all about how you design the MQTT topic structure.

You can send me yours flows.json from node-red if that's easier.

genestealer commented 1 year ago

I am publishing it on GitHub, will post the link soon, just cleaning the code up.

Looks like this: image image image image image image

Also works for plugs and plugs+ image image

image image

genestealer commented 1 year ago

Work in progress version: https://github.com/genestealer/node-red-energenie-ener314rt-home-assistant-mqtt

Feedback very welcome! image

Achronite commented 1 year ago

Stable alpha version now available on github. https://github.com/Achronite/mqtt-energenie-ener314rt