-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Hive SLR1 #8184
Comments
@steveuk23 Thanks for emailing me, but as explained to you i much prefer to try and help you here for the benefit of everyone else. Hope you can understand :) Can you please try the following, as per the documentation:
Paste the following code const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;
const definition = {
zigbeeModel: ['SLR1'],
model: 'SLR1',
vendor: 'Hive',
description: 'Heating thermostat',
fromZigbee: [fz.thermostat_att_report, fz.thermostat_weekly_schedule_rsp],
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_system_mode, tz.thermostat_running_state,
tz.thermostat_occupied_heating_setpoint, tz.thermostat_control_sequence_of_operation, tz.thermostat_weekly_schedule,
tz.thermostat_clear_weekly_schedule, tz.thermostat_temperature_setpoint_hold, tz.thermostat_temperature_setpoint_hold_duration],
exposes: [exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 1).withLocalTemperature()
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withPiHeatingDemand()],
meta: {disableDefaultResponse: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(5);
const binds = ['genBasic', 'genIdentify', 'genAlarms', 'genTime', 'hvacThermostat'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.thermostatTemperature(endpoint, {min: 0, max: constants.repInterval.HOUR, change: 1});
await reporting.thermostatRunningState(endpoint);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
await reporting.thermostatTemperatureSetpointHold(endpoint);
await reporting.thermostatTemperatureSetpointHoldDuration(endpoint);
},
};
module.exports = definition;
Let me know how it goes, if things do not work, can you please paste your logs in here. Rob |
No i understand what you mean about doing it through here for others :)
is that correct ?
|
@steveuk23 Yes the configuration.yaml bit is correct. Just to clarify:
|
@robertalexa Yes it starts back up no problems. i have about 30 zigbee devices working no problems. |
It would say 501 bad gateway while the addon properly starts. Give is a minute and it should load. From the code i gave you, try removing this line and try again
With regards to the Edge addon, to my knowledge you can keep both of them installed, as long as one of them is stopped. You can always backup you device data before swapping the addons. My personal opinion on this is to stay on the stable release, this was you don't risk things breaking as they are still in development stage (the reason why the stable one gets released once every beginning of a month). And should you need to test things out, either swap to edge (which personally i don't do) or have a completely separate instance away from your "production" HA. Buy a second cheap adapter and either run it straight on you laptop or in a virtual box if you want to run it in HA environment. Let me know how the above goes |
@robertalexa That did it. |
@robertalexa
|
@steveuk23 hey. I am currently not at home anymore to look at code but for now i would suggest you stay away from ha. While testing stick with the z2m frontend and run all the commands from there. Click on your device then exposes and chekc what is there. In a different tab open up your logs and keep an eye on them. Start running commands from physical thermostat and see what the logs output and also if the frontend reflecta the change. If you get an error make a note of the action you did and then restart the addon. There is a chance that once you get an error it could be a fatal one and nothing will work after it. So always restart it between an error and trying different commands. Also open the documentation and have a look at slr1b and what commands you can send via mqtt, you can try sending thise commands yourself and aee what you get. You have a go at that and document as much as possible, keep everything posted here and i will contribute when i get around my computer. If we nail this down i can submit a pull request and get this device supported for everyone |
Thanks for that. |
Hi @robertalexa
and then on the refresh icon next to each option i get this error
And lastly i'm getting this error randomly appearing in the log
Hopefully you can make sense of this as it's beyond me |
Hi @steveuk23 Did you revert all the files you have manully modified on your own? What I am trying to say - apart from the external converter, are you sure there is no other code that you have either added or removed while trying to support this device on your own? Rob |
@robertalexa |
Could you please go here https://www.zigbee2mqtt.io/information/debug.html That will turn on the debuging for zigbee herdsman and hopefully will give us some more clues. Could you please have another play like you did above and post back logs, making sure they are long enough to include the command and everything that was written as a result of it. (hopefully that makes sense) Please do so for system_mode, the little refresh icons (might be worth you spliting these logs by each command in your reply so it is easy to follow). Also, should you see the "Failed to configure" error come up again, try to paste it here again with more logging. I had a look at other zigbee software solutions and it seems that no one has the SLT1 receiver supported, now i do not know if it is because the device is "basic" or no one actually worked with it. Also Hive is not publishing any specs for their devices so the only solution is to sniff the traffic between the receiver and the hub to learn exactly what is what. But lets see where that takes us, maybe we can get to the bottom of it, maybe not. @Koenkk and @sjorge any thoughts, you guys are a hell lot more familiar with the codebase than i am. |
@robertalexa |
occupied_heating setpoint refresh
local_temperature refresh
system_mode refresh
running_state refresh
|
system_mode TURNED OFF
system_mode AUTO PRESSED
system_mode HEAT PRESSED
|
This is the only thing i can see that works
occupied_heating_setpoint slider to to min 7
|
@steveuk23 Can you please replace That should take care of the constants error, idk if this would mess up with the rest but try to refresh 1 single thing like the local_temp and see if you get the same error message. If you do, no need to post new logs. Post them only if there is something new happening. With regards to the system_mode, it feels like the commands are successful, so things should be happening? You could try setting it to heat, then from the thermostat set it to a high temperature, listen for your boiler, wait for it to ignite basically. Then set system_mode to off. Theoretically the boiler should stop? As to the other error, that is a bit unexpected. Without some manual debugging not sure if i can figure it out. Have a look at my above suggestion first and maybe in the meantime Koen or Jorge have a look too. |
@robertalexa The receivers not actually connected to the boiler at the moment i didn't want to connect it until i had it working so it's just connected to a plug. |
Morning @steveuk23 :) Glad to hear about system_mode With regards to local temperature, the thermostat is the one that will measure it and compare it to the temperature that you set, the receiver (SLR1) will just "do the work", but yes, it might appear confusing for the receiver to report the temperature and the thermostat to only act as a remote. In short, the thermostat reports the local temp to the receiver and the receiver "declares/exposes" it basically. Your URL text is correct but the actual link is broken - but i read the thread and yes I expect it to be something along those lines, thus me asking if for sure you have not removed any other code. Technically all the endpoints should be available. Can you please replace this line That might be what is causing this. Give it a try and please let me know how it went. Thanks, |
Sorry morning @robertalexa i wasn't sure which time zone you was in ha ha |
@steveuk23 that makes absolutely no sense. When you replace that line do you get an error in the log? If by you can't access the dashboard as in you get 502 Bad Gateway, remember you have to give it a minute for the addon to properly start. Also make sure that you have copied and pasted correctly and not created any syntax errors. As to code removed, that is very hard for me to advise, you are the only one that knows what files you edited :) |
@robertalexa
|
Thanks for the logs. Try changing that line again and on top of that also replace this line with this It's my bad for that. I forgot i didn't include the legacy in my original code. I have tried this in my z2m instance and it boots up correctly. Let me know how it goes. |
@robertalexa |
Hi @steveuk23 I am glad it is now working. So yeah, it basically operates like the SLR1b so it will be an easy fix. My bad for the problem caused by the "legacy". I should have just used it in the code. pi_heating_demand will technically show how much the valve should be open and it is decided based on the difference between local_temperature and occupied_heating_setpoint. In principle this should update itself once an hour, based on the reporting settings. I do not know however if this actually works or not. Can you please set your temperature to the highest, and leave it running for say an hour or 2 and see if pi_heating_demand gets updated? That will give us a definitive answer. As mentioned to you before, i have the SLR1b but never found the time to try and get it set up in my z2m, but I plan to do it really soon, and also fix everything that is missing, cause there are some missing features in z2m. When i get around it, will you please be willing to do some testing for me, as everything new that i will do to the slr1b i will do to slr1, so that people like you benefit from it too. I am also inclined to try to "blindly" improve the SLR2 and SLR2b and i think i can find a couple of people to test for me. On this topic, could you please tell me something? What is the lowest and highest temperature that you can set on the SLR1 using the physical thermostat? Cause i bet it is different than what you can do in the Frontend. With regards to the device image, I will add the image when i submit my PR to support your device (which i will do as soon as we both agree things behave as they should, so maybe even today.) Can you confirm if your receiver looks like this? https://www.zigbee2mqtt.io/devices/SLR1b.html As to the heating schedule, i would personally not do it through the device itself. This is exactly what i have chosen to do for my TRVs. That is also because on the TRVs, if you take out the batteries and put them back in the schedule gets lost. I wouldn't be surprised if the same happens to the thermostat. Instead, I simply change the desired temperature using Node-Red flows. I think system_mode auto actually uses the internal scheduler. Off is obviously off and heat is manual control. So basically I would do Off when you want it off, and "heat" for everything else. Then using node red you decide if it is OFF at night, HEAT 18C when you are away and HEAT 22C when you are home :) But I would test what is the behaviour of OFF, i would expect it to set the temperature around 6 degrees, that is to have frost protection. If it doesn't do that, then i would just stick to HEAT instead and manually setting the temp to 9C Sorry for the long post, hopefully this answers your questions. If you clarify the things above for me then i can go ahead and submit the PR and get your device officially supported. |
@steveuk23 Try replacing 3600 with 600 and reload the addon. That would change the reporting of heating demand from hourly to only 10 minutes, which would be better anyway. See if that value gets populated. |
Your sensor will not belong to a device. You will be able to see them only by going Configuration -> Entities. So you simply need to delete all your custom ones and rely on the native entities that belong to the device. This way the communication between HA and Z2M works automatically, sending and receiving information. |
For anyone still watching this issue, I have now submitted a PR to update the documentation for SLR1, SLR1b, SLR2 and SLR2b. Koenkk/zigbee2mqtt.io#891 Once the PR gets merged in you will be able to see how to control all the device features, in one compact form. Once again, thank you all for contributing and helping me help you. Hope you are excited to get this working nicely before the winter :) |
@steveuk23 @robertalexa absolute legends, got an SLR1 with a SLT3, using OpenHab3.1 instead of HomeAssist but nevertheless managed to get configured and set up :)
this is saved as SLR1.js under /opt/zigbee2mqtt/data and i put this code below in the configuration.yaml
before the hyphen there should be 2 spaces sorry for some reason i cant qoute in a box it just shows as a bullet point when i try to put a hyphen so had to assign it as code so it would show the hyphen but its took away the initial 2 spaces before the hyphen |
@Super-JoConnell thanks for the kind words. Why are you using an external converter though? As of the latest z2m release, the device is supported out of the box :) |
thats good to know @robertalexa :-), was about a week ago that i downloaded z2m and found this and started to configure my system before it was officially supported out the box lol, was having issues with openhab and been spending alot of time trying to get that sorted and now finally got it all working and thought to thank you guys, you think it would be better for me to update z2m or just leave it the way i've configured it ? |
To avoid future issue i would suggest you remove the external converter from your config and update z2m. It should be super straight forward |
Just came in here to say that I've been using the SLR1 alongside the SLT3b out-the-box for a couple of days now with 0 issues and instant out-the-box setup, so thanks to everyone involved for such great work! |
I am glad everything is going well for you. I have also set it up at my end when this became officially supported (i have done the support in a test environment) and have not seen anything wrong so far. Rest assured if i find sth, or if anyone else does, tag me, i will have a look at it. If you are doing the pr for pairing mode, if you dont mind, you could do it for slr1, srl1b, slr2, slr2b and the remotes. I am pretty sure the all pair in the same way to your setup. Once again, thanks to everyone that got involved with all these devices. It was great working with you guys |
Hi guys hope you are well @robertalexa @peterguy04
|
@steveuk23 I do not know if I fully understand your problem, I also don't know yet if it is a problem or not, but I will try to share some suggestions and hopefully you will get an answer: The reporting for local temperature should happen after a minimum of 0.05 degrees difference. So for example, your thermostat on the wall might be different from z2m by theoretically maximum of 0.05 degrees, which in essence, it is negligible. For testing purposes, i would say check the temperature only in Z2M, this way we can understand where the "problem" is. So i would suggest you forget about HA until you know if there is a problem with z2m. In my case, I have not had any issues with the device ever since the official support date. Reminder that the local temperature is provided by the remote on the wall, and not the receiver on the boiler. Is your remote next to a window that is open, a door, a draughty area, above a radiator, basically anything that could fluctuate your temperature. I would suggest you place it on your desk for a while as that should be a neutral area and see if you get this variation. Also, do you by any chance still use the external converter? Or do you have the device twice in z2m database file? If the device behaves correctly in z2m, move your investigation to HA, but check the data in Configuration -> Devices -> Your_climate_device rather than lovelace dashboard. If that is also fine, then you investigate Lovelace. |
Also, can you please confirm what version of z2m and HA are u using? |
@robertalexa |
Z2m is 1.18.1-1 |
No it would not explain it. Remote talks to the receiver about local temperature, z2m already set the occupied_heating_setpoint. From that point on, the boiler decides on its own when to start and stop. Based on what you say, the temperature on the remote remains constant, so it should not get the boiler to start. But i might have an idea: When you press a button on the remote, does it take a long time to load? Does it say "No Signal" sometimes? I experienced similar-ish behaviour when the remote paired and connected straight to the coordinator. But I have re-paired both the receiver and remote while taking the remote next to a router device far away from the coordinator (could even be the receiver itself). I suspect your remote has crappy signal, and might be disconnecting. I would suggest if you do a re-pair of both of them, first unpair them, make sure there are no traces of them in the database file, make sure you have removed the external converter, make sure you are using the latest version of HA and Z2M (those template warnings should not be happening in the latest version, there have been fixes done). |
Thanks I'll try all that tonight when I get home. |
It is very possible. Is it possible that the receiver has like a default value for local_temperature, just like the SLR2 has a default fake one for the water endpoint. But i can't say that with 100% certainty. But there have been many improvements in z2m in the recent updates, so that would be my first approach if i were you. Update everything, make sure you don't have an external converter that might interfere (or might be outdated), and re-pair the devices from scratch. Then you know you are working with "stable" software, which we know behaves correctly for others. |
@robertalexa
|
My Zigbee2mqtt for isn't inside the config file like yours. |
@robertalexa |
Absolutely no idea Steve unfortunately. For the sake of the testing, try to move the remote closer to the receiver, just to see if there is a signal problem between them. In y case I am using the SLT3 and I have not noticed any issues, but to be completely honest I rarely had my heating on since setting it up. I will keep my eyes peeled if i see anything similar. The alternative is to pair it with the old thermostat, again, just for testing sake, to see if the numbers are sticking. Another thing i can think of is old firmware on the devices, but that can only be fixed by pairing them to the Hive hub and hopeing for an update. Although I think you can call Hive and ask them to push the latest firmware remotely. Sorry I can't be of much use with this. Tried setting your log level to debug and keep your eyes on the log to see when and how that value changes. Maybe that would indicate sth |
@robertalexa |
Could you help add support for SLR1d? Thanks |
@quantum-fc101 this got added in Koenkk/zigbee-herdsman-converters#8105 a couple of days ago. Update: not having reporting in there really screwed me up 😂 For what it's worth, you can query stuff like target and local temperatures on both the thermostat and the thermostat controller, but there's nothing in any package on here that sets up reporting. Should that be flagged as a separate issue @Koenkk ? https://typefish.co.uk/post/764184068686528512/thoughts-over-hive-smart-thermostats |
Hi @Koenkk @robertalexa
I'm trying to add a Unsupported device to zigbee2mqtt (i use the edge addon btw)
The device is listed as SLR1 and i was hoping it was basically the same as the SLR1b that is supported.
i found this hive.js and edited it to suit my device and added the below to my zigbee2mqtt configuration.yaml
But every time i restart the add on it fails to reload until i delete the line again,
I'm not great with all this so am just guessing as i go along but have read about
adding it to devices.js but not sure how or where that file is.
My hive.js code is like below
The text was updated successfully, but these errors were encountered: