Having an issue with calling a HA service from MSR
-
Hi,
Running the latest MSR latest-24152-3455578a with the latest HA 2024.6.1. When trying to call a service I get the following in the MSR logs. Is this a version mismatch? I am not seeing anything in the HA logs.
[latest-24152]2024-06-11T10:29:56.162Z <Rule:INFO> rule-Monitor-DHW (rule-lsvq5k3x in Central Heating) started [latest-24152]2024-06-11T10:29:58.625Z <HassController:WARN> HassController#hass unknown service opentherm_gw.set_hot_water_setpoint in x_hass.call_service action on Thermostat#hass>climate_living_room_otgw [latest-24152]2024-06-11T10:29:58.626Z <HassController:INFO> HassController#hass: sending payload for x_hass.call_service on Thermostat#hass>climate_living_room_otgw action: [Object]{ "type": "call_service", "service_data": { "gateway_id": "living_room_otgw", "temperature": 65 }, "domain": "opentherm_gw", "service": "set_hot_water_setpoint", "target": { "entity_id": "climate.living_room_otgw" } } [latest-24152]2024-06-11T10:29:58.627Z <HassController:ERR> HassController#hass request 1718101798626<6/11/2024, 12:29:58 PM> (call_service) failed: [Object]{ "id": 1718101798626, "type": "result", "success": false, "error": { "code": "invalid_format", "message": "extra keys not allowed @ data['entity_id']" } } [latest-24152]2024-06-11T10:29:58.627Z <HassController:WARN> HassController#hass action x_hass.call_service([Object]{ "service": "opentherm_gw.set_hot_water_setpoint", "data": "{ \"gateway_id\": \"living_room_otgw\", \"temperature\": 65 }" }) on Thermostat#hass>climate_living_room_otgw failed!
Cheers Rene
-
The "unknown service" message arises because Home Assistant didn't enumerate the service when HassController asked, or because the service isn't implemented (in Home Assistant) for the entity you are trying to call it on. In this case, I think the latter is more likely; read on.
In looking at the documentation for this service, it appears to take a gateway ID and not an entity ID in a
target
field. In the implementation of this integration, the gateway is the owner of several entities (binary sensor, climate, etc.), but there is no entity representing the gateway itself. Many integrations provide this, but this one does not. And apparently the integration also isn't done like many others where it recognizes that certain service calls made to child entities can and are handled by the parent gateway.In other words, you can't call that service on the child entities. It's global to the integration.
So, you will need to use the
x_hass_system.call_service
call on the controller's system entity, applying the gateway id and temperature as data, per the service documentation. Leave thetarget
field empty, and provide thegateway_id
andtemperature
in the service data, as the documentation asserts.Rule of thumb: any time you are attempting a service call on an entity and Reactor is logging an
unknown service
message, you are approaching the service/entity/integration incorrectly and trying to do something that the Home Assistant entity doesn't support. -
This post is deleted!
-
T toggledbits locked this topic on