Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topic name generation fails for DHW zone #2

Open
elguiri opened this issue Sep 16, 2018 · 1 comment
Open

Topic name generation fails for DHW zone #2

elguiri opened this issue Sep 16, 2018 · 1 comment

Comments

@elguiri
Copy link

elguiri commented Sep 16, 2018

Hi Stephan @svrooij

Thanks for your efforts on the project. I just installed it today and have noticed a slight anomaly in the automatic mqtt topic name generation specifically for the DHW (hot water) zone (which I believe is a special case in the evohome system because it cannot be renamed by the user).

The topics created are:

evohome/status/thermostat/
evohome/status/thermostat//temp

That is, it looks like the DHW zone takes a zero length string as its name.

The status JSON for evohome/status/thermostat/ is:

{"val":51.03,"state":{"units":"Celsius","indoorTemperature":51.03,"allowedModes":["DHWOn","DHWOff"],"minHeatSetpoint":5,"maxHeatSetpoint":30,"changeableValues":{"mode":"DHWOn","status":"Scheduled"}},"lc":1537123696132}

Thanks

@elguiri
Copy link
Author

elguiri commented Sep 18, 2018

I did a quick fix in the bridge.js file:

if (device.thermostat) {
    let name = device.name.toLowerCase();
    name = name.length == 0 ? "dhw" : name;

In my case (but not for everybody), I then went one step further and converted the thermostat name to camel case because I prefer not to see spaces in the mqtt topic:

const camelCase = require('camelcase');
...
if (device.thermostat) {
    let name = device.name.toLowerCase();
    name = name.length == 0 ? "dhw" : camelCase(name);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant