Connect GEM to Home Assistant
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Connect GEM to Home Assistant
Hi all,
I just setup my first GEM and I'm trying to connect it to HA.
I have the Wifi/Ethernet module. The Home Assistant Greeneye configuration runs at 192.168.10.5 on port 8000.
On the GEM setup page I changed the Network to 192.168.10.5 and port 8000, that's the only setting I changed.
I can connect to it with the GEM Network Utility and I see live data, but Home Assistant doesn't report anything, all channels and voltage sensors remain as no data
I triple checked the serial number, oddly the number reported in the interface is different than written on the box itself, but I'm assuming the UI one is the correct one.
Is there a step I'm missing?
I just setup my first GEM and I'm trying to connect it to HA.
I have the Wifi/Ethernet module. The Home Assistant Greeneye configuration runs at 192.168.10.5 on port 8000.
On the GEM setup page I changed the Network to 192.168.10.5 and port 8000, that's the only setting I changed.
I can connect to it with the GEM Network Utility and I see live data, but Home Assistant doesn't report anything, all channels and voltage sensors remain as no data
I triple checked the serial number, oddly the number reported in the interface is different than written on the box itself, but I'm assuming the UI one is the correct one.
Is there a step I'm missing?
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: Connect GEM to Home Assistant
What packet format do you have set on the GEM?rogerfar wrote: ↑Tue Jan 18, 2022 10:50 pmHi all,
I just setup my first GEM and I'm trying to connect it to HA.
I have the Wifi/Ethernet module. The Home Assistant Greeneye configuration runs at 192.168.10.5 on port 8000.
On the GEM setup page I changed the Network to 192.168.10.5 and port 8000, that's the only setting I changed.
I can connect to it with the GEM Network Utility and I see live data, but Home Assistant doesn't report anything, all channels and voltage sensors remain as no data
I triple checked the serial number, oddly the number reported in the interface is different than written on the box itself, but I'm assuming the UI one is the correct one.
Is there a step I'm missing?
Can you post your HA configuration file?
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Re: Connect GEM to Home Assistant
I tried both Bin32 NET and Bin48 NET.
This is my configuration.yaml:
All 3 sensors show up in HA, but no data gets entered for it.
This is my configuration.yaml:
Code: Select all
greeneye_monitor:
port: 8000
monitors:
- serial_number: "01120990"
channels:
- number: 1
name: ge_panel_plug_1
- number: 2
name: ge_panel_plug_2
voltage:
- number: 1
name: ge_voltage
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: Connect GEM to Home Assistant
Are you running HA on Windows or Linux? You can try this suggestion I had for another user:rogerfar wrote: ↑Thu Jan 20, 2022 5:05 pmI tried both Bin32 NET and Bin48 NET.
This is my configuration.yaml:All 3 sensors show up in HA, but no data gets entered for it.Code: Select all
greeneye_monitor: port: 8000 monitors: - serial_number: "01120990" channels: - number: 1 name: ge_panel_plug_1 - number: 2 name: ge_panel_plug_2 voltage: - number: 1 name: ge_voltage
Code: Select all
python btmon.py --print --debug --device-type=gem --ip --ip-mode=server --ip-port 8000
If BTMon.py can read the input then we know it's something on the HA end.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Re: Connect GEM to Home Assistant
I ran btmon with python3, it does get packets, but they don't get decoded:
I tried sending BIN48-NET, BIN48-NET-Time, Bin32-NET, same result.
Code: Select all
2022/01/21 11:56:13 btmon: 4.0.0
2022/01/21 11:56:13 python: 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]
2022/01/21 11:56:13 platform: win32
2022/01/21 11:56:13 device type: gem
2022/01/21 11:56:13 device list: ['']
2022/01/21 11:56:13 packet format: gem48ptbin
2022/01/21 11:56:13 schema: counters
2022/01/21 11:56:13 buffer size: 120
2022/01/21 11:56:13 SOCKET: bind host:
2022/01/21 11:56:13 SOCKET: bind port: 8000
2022/01/21 11:56:13 packet format is GEM48PTBinaryPacket
2022/01/21 11:56:13 using collector SocketServerCollector
2022/01/21 11:56:13 using 1 processors:
2022/01/21 11:56:13 PrintProcessor
2022/01/21 11:56:13 setup SocketServerCollector
2022/01/21 11:56:13 SOCKET: binding to :8000
2022/01/21 11:56:13 setup PrintProcessor
2022/01/21 11:56:13 SOCKET: waiting for connection
2022/01/21 11:56:14 waiting for data from device
2022/01/21 11:56:14 reading 1 of 1 packets
2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80'
2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80
2022/01/21 11:56:14 reading 1 of 1 packets
2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80'
2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80
2022/01/21 11:56:14 reading 1 of 1 packets
2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80'
2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80
2022/01/21 11:56:14 reading 1 of 1 packets
2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80'
2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80
2022/01/21 11:56:14 reading 1 of 1 packets
.....
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: Connect GEM to Home Assistant
I suspect you have Real-Time turned off under Packet Send. It'll send a keep alive every so often when that's turned off.rogerfar wrote: ↑Fri Jan 21, 2022 2:00 pmI ran btmon with python3, it does get packets, but they don't get decoded:
I tried sending BIN48-NET, BIN48-NET-Time, Bin32-NET, same result.Code: Select all
2022/01/21 11:56:13 btmon: 4.0.0 2022/01/21 11:56:13 python: 3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)] 2022/01/21 11:56:13 platform: win32 2022/01/21 11:56:13 device type: gem 2022/01/21 11:56:13 device list: [''] 2022/01/21 11:56:13 packet format: gem48ptbin 2022/01/21 11:56:13 schema: counters 2022/01/21 11:56:13 buffer size: 120 2022/01/21 11:56:13 SOCKET: bind host: 2022/01/21 11:56:13 SOCKET: bind port: 8000 2022/01/21 11:56:13 packet format is GEM48PTBinaryPacket 2022/01/21 11:56:13 using collector SocketServerCollector 2022/01/21 11:56:13 using 1 processors: 2022/01/21 11:56:13 PrintProcessor 2022/01/21 11:56:13 setup SocketServerCollector 2022/01/21 11:56:13 SOCKET: binding to :8000 2022/01/21 11:56:13 setup PrintProcessor 2022/01/21 11:56:13 SOCKET: waiting for connection 2022/01/21 11:56:14 waiting for data from device 2022/01/21 11:56:14 reading 1 of 1 packets 2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80' 2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80 2022/01/21 11:56:14 reading 1 of 1 packets 2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80' 2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80 2022/01/21 11:56:14 reading 1 of 1 packets 2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80' 2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80 2022/01/21 11:56:14 reading 1 of 1 packets 2022/01/21 11:56:14 SOCKET: read 1 of 1 bytes from socket: b'80' 2022/01/21 11:56:14 read failed: expected START_HEADER0 0xfe, got 0x80 2022/01/21 11:56:14 reading 1 of 1 packets .....
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Re: Connect GEM to Home Assistant
You mean here?
I do see packets coming in every 5 seconds, and when entering setup mode it stops.
I do see packets coming in every 5 seconds, and when entering setup mode it stops.
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Re: Connect GEM to Home Assistant
I'm a bit at a loss here, I have tried various tools now, and now I'm intercepting the raw packets that come from the GEM.
It's definitely sending every 5 seconds, that's obvious, but no matter what packet format I set it as, it always sends 256 x 0x80, nothing else.
This is a capture from Wireshark:
It's definitely sending every 5 seconds, that's obvious, but no matter what packet format I set it as, it always sends 256 x 0x80, nothing else.
This is a capture from Wireshark:
-
- Posts: 11
- Joined: Tue Jan 18, 2022 10:45 pm
Re: Connect GEM to Home Assistant
Managed to make it work, turns out that if you leave COM2 as "Disabled" it does NOT do what the manual states, it basically prevents all communication.
I set COM2 to BIN32 and COM1 to JSON and was able to receive the JSON. I now switched both to BIN32 and Home Assistant is now parsing the data.
I set COM2 to BIN32 and COM1 to JSON and was able to receive the JSON. I now switched both to BIN32 and Home Assistant is now parsing the data.
-
- Site Admin
- Posts: 4262
- Joined: Fri Jun 04, 2010 9:39 am
Re: Connect GEM to Home Assistant
Is your COM1 or COM2 Flow Control on? They should both be set to "Off". That will cause it to hang as Flow Control is left floating.rogerfar wrote: ↑Sat Jan 22, 2022 1:26 pmManaged to make it work, turns out that if you leave COM2 as "Disabled" it does NOT do what the manual states, it basically prevents all communication.
I set COM2 to BIN32 and COM1 to JSON and was able to receive the JSON. I now switched both to BIN32 and Home Assistant is now parsing the data.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Brultech Research Inc.
E: ben(at)brultech.com