I’ve installed via HACS.
EMU-2 is connected with meter and plugged into USB port on Raspberry Pi 4.
HA finds the new device.
When I go to “configure” it shows the following 4 choices:
1 - /dev/ttyUSB0 - Sonoff Zigbee 3.0 USB Dongle Plus - iTead
2 - /dev/ttyACM0 - RFA-Z105-2 HW2.7.3 EMU-2 - Rainforest Automation Inc.
3 - /dev/ttyAMA0 - ttyAMA0
4 - Enter Manually
But every time I select the Rainforest Device (2), it causes Home Assistant to restart and then fails with “Unknown Error”
I thought perhaps it could be a low power concern, so I plugged in a Powered USB Hub so that it wouldn’t be robbing from the Pi Power Supply… no change… still restarts HA. I’ve ordered a “Power and Data” USB cable (since I read somewhere that the cable that comes with the EMU-2 is a charge only cable… which I find hard to believe based on seeing the device description in the menu above) but I haven’t been able to try that out yet.
I’m new to Home Assistant, and the Raspberry Pi, but everything else I have seems to be working well.
Is there something I’m missing in configuring the EMU-2 Device?
Could potentially still be a power issue, but with your Pi. What kind of power supply do you have for it?
Also, do you have batteries in your EMU2? I think I still have batteries in mine, but maybe try with and without (even though you’re powering from USB to connect to Home Assistant).
It looks like you’re using the new integration, but there is an old one in HACS, I think just called “rainforest.” You could try that one too just to see if it works. It requires you to install in HACS, then add a sensor: entry to activate it. Problem is that this one lost its ability to show extra data as attributes in recent releases of Home Assistant. I just installed the version you are using last week and it works fine. I’m on a NUC running under Proxmox though, no USB hub.
I have the official Raspberry Pi Power Supply, nothing aftermarket or underpowered. Heard stories.
I do currently have batteries in the EMU-2, I’ll have to give it a try without them when I get home.
I did also use a different power cord (Power and Data), but got no better results.
I also just found perhaps another EMU-2 Integration: EMU-2 2 MQTT
Might mess with that a bit, although I’m not using MQTT anywhere… so there’s another can of worms.
Sorry I didn’t see this post earlier, but have you tried to read from the device directly from the terminal?
I use the terminal in Visual Studio Code extention a lot, and just run cat /dev/ttyACM0 - keeping in mind that path may change any time you restart your OS. That will output XML periodically, and if you see gibberish, then you may need to set the baud rate with the stty -F /dev/ttyACM0 115200 command.
When I was tinkering with this a lot, I created this python script to view it:
import json
import os
def get_device_path():
hw_info = os.popen('ha hw info --raw-json').read()
#_LOGGER.debug(hw_info)
hw_json = json.loads(hw_info)
#_LOGGER.debug(hw_json)
devices = hw_json['data']['devices']
#_LOGGER.debug(devices)
tty_iter = filter(lambda x: 'ttyACM' in x['name'], hw_json['data']['devices'])
for tty_dev in tty_iter:
#_LOGGER.debug(tty_dev)
if 'Rainforest' in tty_dev['by_id']:
#_LOGGER.debug(tty_dev['by_id'])
#_LOGGER.debug(tty_dev['dev_path'])
return tty_dev['dev_path']
# for dev in filter(lambda x: 'ttyACM' in x['name'], json.loads(os.popen('ha hw info --raw-json').read())['data']['devices']):
# if 'Rainforest' in dev['by_id']:
# return dev['dev_path']
dev_path = get_device_path()
os.popen(f'stty -F {dev_path} 115200')
print(dev_path)