Rest error on 2024.5.xx

From version 2024.5.1 I get Rest error fetching data.

Version 2024.4.xx works correct.

I need suggestions please.

Thanks

Can you post the REST sensor and the logs showing the error?

rest:
  - resource: "http://192.168.1.200/data.jsn"
    scan_interval: 5
    sensor:
      - name: "ELWAXX_Power"
        unique_id: "elwaxx_power"
        value_template: "{{ value_json.power }}"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement

      - name: "ELWAXX_TEMP"
        unique_id: "elwaxx_temp"
        value_template: "{{ value_json.temp1 / 10 }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement

      - name: "ELWAXX_Target"
        unique_id: "elwaxx_target"
        value_template: "{{ value_json.ww1target / 10 }}"
        unit_of_measurement: "°C"
        device_class: temperature
        state_class: measurement

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:127
integration: RESTful (documentation, issues)
First occurred: 06:58:09 (30 occurrences)
Last logged: 07:45:43

Error fetching data: http://192.168.1.200/data.jsn failed with All connection attempts failed
Error fetching data: http://192.168.1.200/data.jsn failed with Server disconnected without sending a response.

Logger: homeassistant.components.rest.data
Source: components/rest/data.py:127
integration: RESTful (documentation, issues)
First occurred: 07:47:56 (1 occurrences)
Last logged: 07:47:56

Error fetching data: http://192.168.1.200/data.jsn failed with All connection attempts failed

P.S. the http://192.168.1.200/data.jsn send data correct.

The only thing that sticks out to me is the data.jsn, but aside from that, I’m not really seeing anything. Is that on the same subnet as HA? You said it sends the data correctly, but how did you test it?

Direct the url on brownser. It works perfect till version 2024.4XX. And I have another system here, where I connect it to test it and it works.

I believe something is new on version 2024.5.XX somewhere ( but I don’t know where ) and give that errors on Rest.

The data.jsn as it show on direct Url

	
device	"AC ELWA-E"
fwversion	"00206.02"
status	3
power	0
boostpower	0
temp1	525
ww1target	665
boostactive	0
legboostnext	"off"
loctime	"05:20:03"
unixtime	1716002403
ctrlstate	"No Control"
blockactive	0
meter1_id	null
meter1_ip	"null"
meter2_id	null
meter2_ip	"null"
meter3_id	null
meter3_ip	"null"
meter4_id	null
meter4_ip	"null"
meter5_id	null
meter5_ip	"null"
meter6_id	null
meter6_ip	"null"
meter_ss	null
meter_ssid	"null"
surplus	null
m0sum	null
m0l1	null
m0l2	null
m0l3	null
m0bat	null
m1sum	null
m1l1	null
m1l2	null
m1l3	null
m1devstate	null
m2sum	null
m2l1	null
m2l2	null
m2l3	null
m2soc	null
m2state	null
m2devstate	null
m3sum	null
m3l1	null
m3l2	null
m3l3	null
m3soc	null
m3devstate	null
m4sum	null
m4l1	null
m4l2	null
m4l3	null
m4devstate	null
ecarstate	"null"
ecarboostctr	null
mss2	"null"
mss3	"null"
mss4	"null"
mss5	"null"
mss6	"null"
mss7	"null"
mss8	"null"
mss9	"null"
mss10	"null"
mss11	"null"
tempchip	34
cur_ip	"192.168.1.200"
cur_sn	"255.255.255.0"
cur_gw	"192.168.1.1"
cur_dns	"8.8.8.8"
cloudstate	4
debug_ip	"0.0.0.0"

and here the same data.jsn when is active

	
device	"AC ELWA-E"
fwversion	"00206.02"
status	2
power	3000
boostpower	0
temp1	525
ww1target	665
boostactive	0
legboostnext	"off"
loctime	"05:24:05"
unixtime	1716002645
ctrlstate	"HTTP Control"
blockactive	0
meter1_id	null
meter1_ip	"null"
meter2_id	null
meter2_ip	"null"
meter3_id	null
meter3_ip	"null"
meter4_id	null
meter4_ip	"null"
meter5_id	null
meter5_ip	"null"
meter6_id	null
meter6_ip	"null"
meter_ss	null
meter_ssid	"null"
surplus	null
m0sum	null
m0l1	null
m0l2	null
m0l3	null
m0bat	null
m1sum	null
m1l1	null
m1l2	null
m1l3	null
m1devstate	null
m2sum	null
m2l1	null
m2l2	null
m2l3	null
m2soc	null
m2state	null
m2devstate	null
m3sum	null
m3l1	null
m3l2	null
m3l3	null
m3soc	null
m3devstate	null
m4sum	null
m4l1	null
m4l2	null
m4l3	null
m4devstate	null
ecarstate	"null"
ecarboostctr	null
mss2	"null"
mss3	"null"
mss4	"null"
mss5	"null"
mss6	"null"
mss7	"null"
mss8	"null"
mss9	"null"
mss10	"null"
mss11	"null"
tempchip	36
cur_ip	"192.168.1.200"
cur_sn	"255.255.255.0"
cur_gw	"192.168.1.1"
cur_dns	"8.8.8.8"
cloudstate	4
debug_ip	"0.0.0.0"

I remove the ```
state_class: measurement

looks like it works. I will give feedback ASAP
1 Like

Update. After removing the state_class: measurement from the sensors all is working normal.

1 Like

Awesome. Did you file a GitHub issue?

Sorry for the delay. Yes I have add the solution on GitHub.

1 Like