Closed pixidixi88 closed 5 years ago
You need to add four config objects for the 4 different thermostat for it to work. You might have something like this
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},
"description": "",
"accessories": [
{
"accessory": "Thermostat Room 1",
"name": "Pi Thermostat Room 1",
"fanRelayPin": 21,
"heatRelayPin": 22,
"coolRelayPin": 23,
"temperatureSensorPin": 24,
"minimumOnOffTime": 120000,
"blowerTurnOffTime": 80000,
"startDelay": 10000,
"temperatureCheckInterval": 10000
},
{
"accessory": "Thermostat Room 2",
"name": "Pi Thermostat Room 2",
"fanRelayPin": 25,
"heatRelayPin": 26,
"coolRelayPin": 27,
"temperatureSensorPin": 28,
"minimumOnOffTime": 120000,
"blowerTurnOffTime": 80000,
"startDelay": 10000,
"temperatureCheckInterval": 10000
},
... Other two rooms similar to above. You just have to make sure your Pins are unit on raspberry Pi to relay boards
],
"platforms": []
}
Hi, Thank you for your help but still it doesn't work. I have got such error:
Error: The requested accessory 'Thermostat Room 1' was not registered by any plugin. at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:64:13) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:286:42) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:87:38) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:45:10) at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)
Sorry I think I had the config wrong. Change all of the accessory to Thermostat
but make the name unique.
But then I have situation which I described on the beginning, so lets base on your above config sample It will be visible in app 2 different "devices" temperature will be read from two sensors (pin: 24 and 28) but only one valve (relay) will be operated this which is defined for "Pi Thermostat Room 1" - pin 22. Pin 26 "Pi Thermostat Room 1" will not be operated at all.
Yes you can specify one pin to read from for temperature of Raspberry Pi.
Only first accessory works properly. Second and third only temperature is read from sensor but valves are not switched.
I tried to use it to control floor heating in my house. I have a 4 rooms and I would like to get 4 thermostats. I have a 4 relay board and 4 DHT sensors. When I added into config file 4 thermostat accessories with different names temperature is reading properly. From each sensor is different temperature. Relay board doesn't work OK because only one relay is steering for all 4 thermostats despite the fact that in config file are different relay pins. Could you help me how to solve it?