Habridge Error - undefined with status: Server Error - 500

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
marcelo
Posts: 1
Joined: Thursday 13 February 2025 12:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Habridge Error - undefined with status: Server Error - 500

Post by marcelo »

Hello everyone,

Version: 2024.7 /(build16461)
Platform: Raspberry Domoticz
Plugin/Hardware: Ha-Bridge Version 5.4.1RC1

Description:

After the last beta update, no new devices can be queried in the HA Bridge.

When you click on the Domoticz Devices button, the following message appears:
GET DOMOTICZ DEVICES ERROR: undefined with status: Server Error - 500


The following appears in the HA Bridge logs:

02-13-2025 13:25:23.057 DEBUG doHttpRequest with url <<<http://192.168.xx.xx:8080/json.htm?type ... &used=true>>>, verb: null, contentType: null, body <<<null>>> com.bwssystems.HABridge.plugins.http.HTTPHandler

02-13-2025 13:25:23.057 DEBUG header index 0 name: <<<Authorization>>>, value: <<<Basic bWFyY2VsOm9iZWxpWCExODE0>>> com.bwssystems.HABridge.plugins.http.HTTPHandler

02-13-2025 13:25:23.057 DEBUG Making outbound call in doHttpRequest: <<<GET http://192.168.xx.xx:8080/json.htm?type ... &used=true HTTP/1.1>>> com.bwssystems.HABridge.plugins.http.HTTPHandler

02-13-2025 13:25:23.064 DEBUG GET execute (0) on URL responded: 404 com.bwssystems.HABridge.plugins.http.HTTPHandler

02-13-2025 13:25:23.065 WARN HTTP response code was not an expected successful response of between 200 - 299, the code was: HTTP/1.1 404 Not Found with the content of <<<>>> com.bwssystems.HABridge.plugins.http.HTTPHandler

02-13-2025 13:25:23.065 DEBUG GET devices DomoticzApiResponse - data: com.bwssystems.HABridge.plugins.domoticz.DomoticzHandler


In the previous stable version, it worked without errors.
The existing devices in the HABRIDGE are still there and work. It's just that no new devices are found and displayed.

I'm asking for help.

Best greetings, Marcel
User avatar
waltervl
Posts: 5736
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Habridge Error - undefined with status: Server Error - 500

Post by waltervl »

So this is probably an issue in ha- bridge. The more than a year announced deprecated Domoticz API calls are now really removed and not working in Domoticz. Please inform the ha-bridge author to change the code and use the correct API calls.
See also the Domoticz wiki to see what has changed. https://wiki.domoticz.com/Domoticz_API/ ... and_newer)
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Gingerpale
Posts: 22
Joined: Wednesday 13 January 2016 16:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Habridge Error - undefined with status: Server Error - 500

Post by Gingerpale »

Anybody succeeded in fixing it?
I found out when downloading and inspecting https://github.com/bwssytems/ha-bridge/ ... -5.4.1.jar you can find that com\bwssystems\HABridge\plugins\domoticz\DomoticzHandler.class contains the depreciated

Code: Select all

/json.htm?type=
which forms e.g.

Code: Select all

 /json.htm?type=devices
. This should be changed to /json.htm?type=command&param=getdevices


See also the src at: https://github.com/bwssytems/ha-bridge/ ... ndler.java

Original java code:

Code: Select all

public class DomoticzHandler {
    private static final Logger log = LoggerFactory.getLogger(DomoticzHandler.class);
    private static final String GET_REQUEST = "/json.htm?type=";
    private static final String DEVICES_TYPE = "devices";
    private static final String SCENES_TYPE = "scenes";
    private static final String FILTER_USED = "&used=true";
    private NamedIP domoticzAddress;
Proposed updated java code:

Code: Select all

public class DomoticzHandler {
    private static final Logger log = LoggerFactory.getLogger(DomoticzHandler.class);
    private static final String GET_REQUEST = "json.htm?type=command&param=";
    private static final String DEVICES_TYPE = "getdevices";
    private static final String SCENES_TYPE = "getscenes";
    private static final String FILTER_USED = "&used=true";
    private NamedIP domoticzAddress;
Anybody can help to update the code so we get the correct DomoticzHandler.class compiled into .jar so we can try it out?
Rpi4B,RFX433e,PiFace2, LCD, Hue bridge, Alexa (+TTS), HA-Bridge, Sonoff NSPanel, Sonoff RF (+IR) bridge, Nefit CV, Tasmota/MQTT, Enphase Solar, Smartmeter, Alarm I/F, H13726B Weather Station, CM180 Energy meter, Sonoff, KaKu, Tuya, Gledopto, AriLux,...
Gingerpale
Posts: 22
Joined: Wednesday 13 January 2016 16:11
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Habridge Error - undefined with status: Server Error - 500

Post by Gingerpale »

As I got no response here, I figured out how to compile (using maven) a new ha-bridge .jar based on the source code of bwssystems with my above mentioned changes implemented and now everything works again!
Rpi4B,RFX433e,PiFace2, LCD, Hue bridge, Alexa (+TTS), HA-Bridge, Sonoff NSPanel, Sonoff RF (+IR) bridge, Nefit CV, Tasmota/MQTT, Enphase Solar, Smartmeter, Alarm I/F, H13726B Weather Station, CM180 Energy meter, Sonoff, KaKu, Tuya, Gledopto, AriLux,...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest