HTTP command send resulting in serious issues in HA!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

HTTP command send resulting in serious issues in HA!

#1 Post by mattlward » 30 Mar 2018, 14:48

So, as some of you may know I was pushing the limits of the MQTT import by using 2 instances of it. Well, that was not what the creators intended and it finally broke. :( I use a few Wemos D1's with displays to provide weather information, 6 key items. Temp, heat index or wind chill, humidity, wind speed, wind gust speed and wind direction. We have severe storms and soon possible tornadoes, so it is very nice to have this available in the house and in our basement.

When I was essentially running an MQTT broadcast off of my HA server everything was great. Fast forward to today and it is far from great. I have started trying to use HTTP to send commands to the ESPEasy main display unit and then I pass it to the other units with ESPEasy P2P. The second part works great, but the first part kills my HA server (RPi2) within a couple of hours.

I am using an automation to call a shell command to pass the data
Automation

Code: Select all

- id: "Broadcast Real Temp HTTP"
  alias: 'Broadcast Real Temp HTTP'
  initial_state: 'off'
  hide_entity: false
  trigger:
    - platform: time
      minutes: '/2'
      seconds: '30'
  action:
    - service: shell_command.wu_temp_http
    
shell_command
wu_temp_http: 'curl http://192.168.1.186/control?cmd=event,RealTemp={{ states.sensor.pws_temp_f.state }}'

After a couple of hours these 6 automations result in my database going offline and the system just starts acting odd.

I will fire up the automations and catch some logs if anyone thinks they may be able to help. The info gets to the Wemos units at first and then over time the Wemost units do not get some of the data some of the time. The load on the main unit does not seem high, but it does seem that the problem could be that the unit is not taking the command.

I am running the latest nightly build on the systems involved. About to the point of downgrading the main unit that RX's the data, so that I can run 2 MQTT instances and then P2P the data to the other units. But, that is a timebomb as well. Something will change in P2P and the old version will not work...

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP command send resulting in serious issues in HA!

#2 Post by TD-er » 30 Mar 2018, 18:54

Yesterday I found something which might explain why the MQTTimport doesn't work well with 2 importers.
It is in a comment in my last PR.
It is a common mistake why a lot of plugins don't work well with multiple instances.

Let's hope I get enough dev time this Easter weekend.
I guess first a quick fix to allow one more and then a proper fix to allow more.
But the MQTTimport is still a kludge, so there really should be a proper fix.

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: HTTP command send resulting in serious issues in HA!

#3 Post by mattlward » 30 Mar 2018, 21:59


TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP command send resulting in serious issues in HA!

#4 Post by TD-er » 31 Mar 2018, 01:56

mattlward wrote: 30 Mar 2018, 21:59 Are you talking about this PR?
https://github.com/letscontrolit/ESPEasy/pull/1203
Yep, this part to be precise:
https://github.com/TD-er/ESPEasy/blob/5 ... no#L23-L26

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: HTTP command send resulting in serious issues in HA!

#5 Post by mattlward » 31 Mar 2018, 17:16

So, are you working to fix it so that 2 MQTT imports will work? For some reason it really kills the HA database to send very many http commands. Causes great pain, I have an issue open over there as well.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: HTTP command send resulting in serious issues in HA!

#6 Post by TD-er » 31 Mar 2018, 20:14

mattlward wrote: 31 Mar 2018, 17:16 So, are you working to fix it so that 2 MQTT imports will work? For some reason it really kills the HA database to send very many http commands. Causes great pain, I have an issue open over there as well.
Yeah, that's what I want to try (no guarantees) and eventually even N imports

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: HTTP command send resulting in serious issues in HA!

#7 Post by mattlward » 31 Mar 2018, 20:43

let me know if you need a tester.. I have HA all set up to do it.

Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests