GEM's stop responding when using DNS or sending to HASS

Ask questions about the GEM here.
Post Reply
ptr727
Posts: 20
Joined: Tue Jul 10, 2012 12:26 am

GEM's stop responding when using DNS or sending to HASS

Post by ptr727 » Sun Oct 06, 2019 5:39 pm

Hi, my GEM's stop responding, I think it has to do with the combination of data format or DNS in network config or sending data to Home Assistant.

I have 4 GEM's, early models, installed when I built the house in 2012, but did not touch them for many years (too much trouble to get (too short) CT leads routed to GEM cabinets.
About a year or two ago I tried to get one working, had a hell of a time to get it to connect and update firmware, including password reset flash and button dance, gave it up.

I am now installing Home Assistant (HASS), and I want to send data from GEM to HASS which seems to be reasonable well supported.

I followed the instructions to prep for GEM:
https://www.home-assistant.io/integrati ... ye_monitor

I have two GEM's configured, with lots of trial and error I updated the firmware on both to COM:4.36 and ENG:1.49, and I replaced batteries.

I set Ethernet Only (Ethernet Module 4.1) to:
Local Port : 80
Remote Port : 8000 (HASS GEM listening port)
Server IP: 192.168.1.26 (HASS listening IP)
Ethernet Mode: Mixed

Packet send format is 4, BIN48-NET-Time, and interval is 10s.
Data Post is all empty.

In this configuration I can Get GEM Info and I can view Live Data.

When I enable DNS, and I set Server to hass.home.insanegenius.net (which resolves to 192.168.1.26), things go wrong, and I can no longer call Get GEM info, and the web pages no longer load.

Even when the configuration is set to IP and not DNS, when I enable HASS, and the GEM can start posting data to HASS, the GEM again becomes unresponsive.

A few minutes after HASS starts listening to GEM traffic, GEM becomes unresponsive.

To get the GEM to become responsive again, I need to disable HASS, such that it is no longer listening for GEM traffic, and the network configuration needs to be IP not DNS, then I can again get GEM info.

Can I upgrade the GEM ethernet/COM module to something faster / more reliable / more feature rich, maybe an ESP32 device or a Pi?

This is just so frustrating, any ideas how to solve this?
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ben » Mon Oct 07, 2019 9:29 am

ptr727 wrote:Hi, my GEM's stop responding, I think it has to do with the combination of data format or DNS in network config or sending data to Home Assistant.

I have 4 GEM's, early models, installed when I built the house in 2012, but did not touch them for many years (too much trouble to get (too short) CT leads routed to GEM cabinets.
About a year or two ago I tried to get one working, had a hell of a time to get it to connect and update firmware, including password reset flash and button dance, gave it up.

I am now installing Home Assistant (HASS), and I want to send data from GEM to HASS which seems to be reasonable well supported.

I followed the instructions to prep for GEM:
https://www.home-assistant.io/integrati ... ye_monitor

I have two GEM's configured, with lots of trial and error I updated the firmware on both to COM:4.36 and ENG:1.49, and I replaced batteries.

I set Ethernet Only (Ethernet Module 4.1) to:
Local Port : 80
Remote Port : 8000 (HASS GEM listening port)
Server IP: 192.168.1.26 (HASS listening IP)
Ethernet Mode: Mixed

Packet send format is 4, BIN48-NET-Time, and interval is 10s.
Data Post is all empty.

In this configuration I can Get GEM Info and I can view Live Data.

When I enable DNS, and I set Server to hass.home.insanegenius.net (which resolves to 192.168.1.26), things go wrong, and I can no longer call Get GEM info, and the web pages no longer load.

Even when the configuration is set to IP and not DNS, when I enable HASS, and the GEM can start posting data to HASS, the GEM again becomes unresponsive.

A few minutes after HASS starts listening to GEM traffic, GEM becomes unresponsive.

To get the GEM to become responsive again, I need to disable HASS, such that it is no longer listening for GEM traffic, and the network configuration needs to be IP not DNS, then I can again get GEM info.

Can I upgrade the GEM ethernet/COM module to something faster / more reliable / more feature rich, maybe an ESP32 device or a Pi?

This is just so frustrating, any ideas how to solve this?
What's your idle time set to on the Ethernet module?

Mixed mode makes a connection with each packet then disconnects after X seconds (defined by Idle Time). If Idle Time is greater then your Packet Send Interval, it'll never kill that connection and lock you out.

The GEM has 2 RS232 COM ports, Tx/Rx/GND are exposed for each COM port on the green header next to your Ethernet module. You can hook anything you want up to those ports as long as it supports RS232.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ptr727
Posts: 20
Joined: Tue Jul 10, 2012 12:26 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ptr727 » Mon Oct 07, 2019 10:24 am

Hi Ben

Comm settings are:
Normal: 10 / 1800 / 8
Firmware: 10 / 1800 / 30

Btw, I tried changing them, they appear to always revert back to the same values.

What are they supposed to be?
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ben » Mon Oct 07, 2019 10:29 am

ptr727 wrote:Hi Ben

Comm settings are:
Normal: 10 / 1800 / 8
Firmware: 10 / 1800 / 30

Btw, I tried changing them, they appear to always revert back to the same values.

What are they supposed to be?
Given you send every 10 seconds, 8 should be fine (normal). Click the normal radio button and click Save Settings.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ptr727
Posts: 20
Joined: Tue Jul 10, 2012 12:26 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ptr727 » Mon Oct 07, 2019 10:40 am

Ok, so given they were set to 8s, and I still have problems, where do I look next?

I tried changing the timeout to 5s, save, close config utility, open, search, value is back at 8s.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ben » Mon Oct 07, 2019 11:51 am

ptr727 wrote:Ok, so given they were set to 8s, and I still have problems, where do I look next?

I tried changing the timeout to 5s, save, close config utility, open, search, value is back at 8s.
Are you clicking normal after you re-scan? Those are just two options that the module can be set to (clicking normal will replace the idle time with 8s).

If not, it could be the DNS setting. I recall having an issue where the module would have issues if it was unable to translate the DNS.
When I enable DNS, and I set Server to hass.home.insanegenius.net (which resolves to 192.168.1.26), things go wrong, and I can no longer call Get GEM info, and the web pages no longer load.
How is the DNS being assigned (are you running a local DNS server)? I'll have to play around a bit but I don't think the Ethernet module can support something like zeroconf.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ptr727
Posts: 20
Joined: Tue Jul 10, 2012 12:26 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ptr727 » Mon Oct 07, 2019 12:24 pm

Ah, so there is only one idle time setting, the UI makes it look like there are two settings, and as I switch it overwrites the values, it does not read them, confusing.

The DNS is a local DNS entry in my router, the config utility correctly picks it up.
1) Does the config send the FQDN to the ethernet module, or does it send the IP address?

Even when removing the DNS options and setting the IP, the units still become unresponsive to web or utility requests, but do send data, with some packet corruption.

It seems that as soon as I save a network setting and I then try to get info it works, as if the updating of settings wakes the ethernet module up to respond.

2) From pictures in forum posts I see there are version 5.x ethernet modules, I have version 4.1, will it help if I get a newer ethernet module?
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ben » Mon Oct 07, 2019 3:13 pm

ptr727 wrote:Ah, so there is only one idle time setting, the UI makes it look like there are two settings, and as I switch it overwrites the values, it does not read them, confusing.
Yeah, I passed on the suggestion to add some headers or similar to make it more obvious that they're default settings and not options.
ptr727 wrote:The DNS is a local DNS entry in my router, the config utility correctly picks it up.
1) Does the config send the FQDN to the ethernet module, or does it send the IP address?

Even when removing the DNS options and setting the IP, the units still become unresponsive to web or utility requests, but do send data, with some packet corruption.

It seems that as soon as I save a network setting and I then try to get info it works, as if the updating of settings wakes the ethernet module up to respond.
The Ethernet module uses whatever server is listed as "DNS Server IP" to go from domain name to server.

Can you try an aggressive idle time with just the IP Address set (something like 3 seconds) to see if that improves it at all? It does sound like that's what's locking you out (if packets are going thru with just the IP). Responses from the server may keep that connection open also.
ptr727 wrote:2) From pictures in forum posts I see there are version 5.x ethernet modules, I have version 4.1, will it help if I get a newer ethernet module?
Using the OEM config tool, you should be able to upgrade the module to 5.13.

https://www.wiznet.io/wp-content/upload ... Config.zip
https://www.wiznet.io/wp-content/upload ... r_0513.zip
Ben
Brultech Research Inc.
E: ben(at)brultech.com
ptr727
Posts: 20
Joined: Tue Jul 10, 2012 12:26 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ptr727 » Mon Oct 07, 2019 10:37 pm

I updated the firmware of the WIZ110SR's to 5.13.

I noticed that the WIZ config utility says that the data packing size max value is 255 bytes, while you configure it to 1800.

The programming manual says:

Code: Select all

Length (2 Bytes)
Input serial data packing length. When the input serial data length reaches to
the value, it will be sent out. Please, note that only the low 1 byte is used and
the maximum length is 0x00FF. 0 means the packing condition is disabled.
I changed the packetsize size to 255, and the idle time to 3s.

The get GEM info and live data connects on first try.
The web interface opens immediately.
And the device still reports to HASS.

I have not tested setting DNS back yet, I will let this run for a while and see if things keep working.
ben
Site Admin
Posts: 4262
Joined: Fri Jun 04, 2010 9:39 am

Re: GEM's stop responding when using DNS or sending to HASS

Post by ben » Tue Oct 08, 2019 9:57 am

ptr727 wrote:I updated the firmware of the WIZ110SR's to 5.13.

I noticed that the WIZ config utility says that the data packing size max value is 255 bytes, while you configure it to 1800.

The programming manual says:

Code: Select all

Length (2 Bytes)
Input serial data packing length. When the input serial data length reaches to
the value, it will be sent out. Please, note that only the low 1 byte is used and
the maximum length is 0x00FF. 0 means the packing condition is disabled.
I changed the packetsize size to 255, and the idle time to 3s.

The get GEM info and live data connects on first try.
The web interface opens immediately.
And the device still reports to HASS.

I have not tested setting DNS back yet, I will let this run for a while and see if things keep working.
I let Paul know so he can edit the program so its set to 255.
Ben
Brultech Research Inc.
E: ben(at)brultech.com
Post Reply