MobileAlerts / TFA WeatherHub Integration

Home Assistant is running in a Docker container on 192.168.1.171, exposed via port 8123.

The gateway has IP 192.168.1.119, I’ve tried configuring its settings (Gateway, DNS and proxy) quite a few different ways, but it doesn’t seem to make a difference. Here’s my latest configuration:

I added some logging, and now I can get this in the log:

2023-01-01 20:02:51.691 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] MobileAlertsConfigFlowHandler mobile_alerts

2023-01-01 20:02:51.692 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] async_step_multiple_gateways ip_address 172.18.0.2

2023-01-01 20:02:53.700 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] Gateways discovered length 0

Any thoughts? :slight_smile:

Thanks a lot for the integration! Installation of the integration worked well and the MA gateway has been detected right away. However, HA showed no devices/entities for about half an hour and cloud sync was now working any more. I then used the MA iOS app to restart the MA gateway. This fixed both problems: the cloud sync worked again and all my MA devices are now available in HA :smile:

1 Like

Hi, is it possible to integrate Mobile Alerts Sensors with their ID?
I have no own Wealther station. But my Neighbour has one.

Did this in Homebridge, but don’t know a way to do it in home assistant?

works with my iPhone id and the sensor IDs

It seems like your Docker container has its own network 172.18.0.X. It’s not enough to expose only HTTP port, the container should be in your main network 192.168.0.X. I’m not so good in Docker, so I don’t know how to setup network in such way.

Sorry, I’t impossible with this integration. You can grab measurements from https://measurements.mobile-alerts.eu/ if you have Phone ID.

Thanks Alex,

The container does have access to the local network, but I only map the HTTP port - do you happen to know which other ports I need to map? Or if I can just override the scanning phase altogether and configure the IP of the gateway instead?

Unfortunately, the protocol of gateway is based on UDP and broadcast messages. Unless your host is not in a LAN, you can’t change gateway’s settings.

Hmm, I tried configuring the integration once again and checked the logs, and I can see these (see the first lines too):

2023-01-18 14:35:59.076 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] MobileAlertsConfigFlowHandler mobile_alerts

2023-01-18 14:35:59.076 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] async_step_dhcp DhcpServiceInfo(ip='192.168.1.119', hostname='la crosse technology ltd', macaddress='001d8c0e2f0f')

2023-01-18 14:52:40.301 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] async_step_multiple_gateways ip_address 172.18.0.2

2023-01-18 14:52:42.307 DEBUG (MainThread) [custom_components.mobile_alerts.config_flow] Gateways discovered length 0

The ip address it found first (192.168.1.119) is correct. It seems to be able to discover the device, it’s odd it later logs the internal IP and 0 gateways…

Hi,

I just installed the plugin and it seems to work quite well with my mobile alerts sensors.
If I understood it correctly, the plugin changes the proxy within the mobile alerts bridge, so updates get sent to to homeassistant. If I leave the cloud forward on, homeassistant will forward the data to the mobile alerts sensor cloud.

I would suggest to make this more visisble during the setup process, users need to understand, that if home assistant goes offline (for whatever reason) or maybe even changes its ip-address then mobile alerts data will not get forwarded anymore to the cloud.

Also I would appreciate an option to undo to the changes to the proxy-setting with the press of a button.

thanks for spending the time and making a great plugin for HA!
Dark-Sider

Is there an example how to do that? Any help is appreciated.

@PlusPlus-ua: After updating HA to 2023.3 it seems my WeatherHub lost its ability to upload the data to cloud through HA. Inside HA the weather data is updating just fine.
All I have in the logs is the error below. Any ways to troubleshoot further?

Logger: mobilealerts.gateway
Source: runner.py:179
First occurred: 5. maaliskuuta 2023 klo 22.36.19 (414 occurrences)
Last logged: 08.59.32

Error resending request to cloud: <InvalidURL /gateway/put>

I’m fairly sure I have seen some similar errors before as well but within last 6 months the updates have still worked just fine (minus one occasion when the Cloud-setting was clicked off)

Hi, I can confirm the issue. Will check it a bit later.

1 Like

Hi Alex, thanks for this integration, works very well for me.

I am struggling with the rain sensor part on MA. I currently found no way to use this sensor in a history sheet.
I am using also the Z-Rain Popp sensor. Z-rain Popp use a “Rain Rate per Hour” (x mm/h), this is a very easy idea to implement this with the counter in HA.

Any Ideas for me how to use this in a Chart? Also a trigger sensor like rain fall starts, or a heavy rain trigger would be a good Idea to me.

Thanks

Hi Kurt,

Thank you for your kind words.

The current version just reports data which the rain sensor sends to the cloud without any processing. Improvements are already in progress. I’ve renamed the current “Rain” sensor into “Accumulated rain” in order to right describe its nature. I’ve implemented a new “Rain” sensor, which exposes “current level of rain in mm”, and a new binary sensor “Is raining”. Right now, the dashboard of my rain sensor looks like this:
rain
I’m not sure if it has a sense to implement hourly rain rate, but it’s not that difficult.

Anyway, I’d like to debug it on my installation and with real rain :cloud_with_rain: :slight_smile:

2 Likes

Very good step-wise instruction. As a noob myself I find it also hard to get it right without a lot of try and error. I installed HA only because of this plug-in/integration. Since I already have a Raspberry PI set-up for other stuff (home server, owncloud) I decided on the core installation. After all the hassle with HA installation I found out that plug-ins are not supported by the core-installation type of installation. After almost giving up I downloaded HACS from homeassistant account (after source bin/activate command by running wget -O - https://get.hacs.xyz | bash -. After that HACS appeared in integrations and everything worked like a charm- and I got the sensor values!

If someone is currious the idea of my installation is to:

  1. Read the temperature data from one of the sensors TFA sensors I have
  2. Store it in HA
  3. Read the temperature value by a remotely located ESP-32
  4. Control a digital potentiometer by ESP-32 to the same resistance as a thermistor would give at the same temperature
  5. Heat pump that warms up our house sees the digital potentiometer as a normal temperature sensor and can adjust heating to match the temperature set-point.

In this way I can avoid drilling lots of holes and running cables. Also, few sensors can be used and lowest of them can be chosen to be ralayed to the heat pump.

Antti,

I had the same problem.
I opened the Weatherhub App on my smartphone and went to the network settings. I pressed restart and then I could add a device in home assistant.

Hi Alex,

are those new sensors already available?

Now I set it up and at first it looked like everything is working fine. But I discovered that the data update is very inconsistent. It works fine for a while updating the values every 7 min both in HA and in the WeatheHub app, then the signal disappear for a while, sometimes for half an hour, sometimes for more. Then it appears again without me doing anything. See few screenshots from HA and the app. It is off now for 5 hours, last time updated 3 pm, now it is 8 pm. I moved the base station close to the WeatherHub, reset the WeatherHub but it seems to not solve the issue. I am using 31.4007.02 kit that includes the WeatherHub, a base and 3 sensors. Appreciate help with troubleshooting. Is it the base that stops sending the data? Is it the WeatherHub that stops receiving it or sending further? Or is it HA that fails to read and forward it. I haven’t used the WeatherHub much before integration with the HA so am not sure if it worked ok before. First step is to reset it to send to the cloud directly and see if the problem persists? How do I do that?


Hello @PlusPlus-ua , thank you for the HA integration of mobile alerts.
After I added the gateway in HA, my iOS app stopped fetching data from Mobile-Alerts. The network configuration was probably changed as a result.

How can I fix this?

VG

It doesn’t look like that to me.
kép
I have a MA10650 (Welcome to Technotrade Import-Export GmbH) device. This is just a trickle. Compared to this, the panel looks different. I just put it on and it hasn’t rained yet :slight_smile:
But it certainly doesn’t measure temperature.
In addition, you can also use the MA10660 Welcome to Technotrade Import-Export GmbH wind meter here, just note that it also sends direction data “N W E …”