Mysensors integration into HA using ethernet gateway and power meter sensor

Hello,

after reading lots of posts here and at the mysensors page i am a bit confused…

My setup is:

  1. HA installation using the hassbian installation as described in https://home-assistant.io/docs/installation/hassbian/installation/

  2. Existing pulse power meter sensor using mysensors as described in https://www.mysensors.org/build/pulse_power
    This is currently connected to a RPi with installed domoticz.

As i now switched over to the great HA i wopuld like to connect the power meter sensor to HA using an ethernet gateway using the components described in https://www.mysensors.org/build/ethernet_gateway

My question:
Does anyone have a complete code to flash on the gateway that makes it work for HA?
On the mysensors poage, this seems incomplete and also in the components page (https://home-assistant.io/components/mysensors/) it tells me to present it to HA.
Thats what is confusing me a bit…

Thanks very much in advance for your help.
/ Ralf

Why don’t you just use your Pi as the gateway?

@gpbenton:

because:

  1. i want to use this Pi for s.th. else,
  2. want to minimize the number i need to take care of and
  3. i have all components available.

/ Ralf

Actually, I was suggesting you install the MySensors gateway on your HA pi to minimize the number of devices. Its the way I would do it if the I/O pins on my Pi weren’t already taken up by something else :roll_eyes:

I actually use an MQTT gateway on a Wemos D1, so can’t really help with the Ethernet gateway, but it shouldn’t need anything special for HA.

Depending on your radio, the only sketch you need is on the MySensors github: https://github.com/mysensors/MySensors/blob/master/examples/GatewayW5100/GatewayW5100.ino

All you do is setup an IP address or use DHCP, then point HA to the gateway’s IP and port.
The example code at https://home-assistant.io/components/mysensors/ is for a sensor node not the gateway.

@gpbenton: Good idea. But on my specific setup, the HA Raspberry pi is in my living room and the power meter is in the basement. No chance to get the signal via mysensors rf up. Thats why i choosed the ethernet gateway.

@firstof thanks for your reply, will try this as soon as possible and give feedback.

RFM96 radio using either 433Mhz or the 915Mhz bands would reach your basement unless it’s a faraday cage lol

Hello,

after pausing with this, tried again today.
Uploaded sketches from both LAN gateway and power meter sensor to the modules.
Gateway i can see in HA, but no sensor still.
Is there any modification of the sensor code needed? If yes, someone can post the complete code here please?

Thanks in advance
Regards, Ralf

Does the sensor node connect to the gateway?

What type of gateway are you using? (MQTT, Ethernet)

Hi.
I think you should read this.

@xydix: thanks for the link.
I did have the sensor working on my former Domoticz instance without any problems. So i would not say it is a hardware problem.

But i will check if i get it working nevertheless.
Only have few time on this currently…

/ Ralf