I am looking for a small cheap status indicator to work with Domoticz (either 433, hue or API). This could be a small led light, an e-ink label, or anything else that will work
I want to know the status of a bunch (4) of windows. If they're closed or open. In my imagination, I see 4 red LEDs that turn on when the status of a switch in Domoticz is set to 'on", meaning the sensor sees that this window is open, and 4 green LEDs that turn on when the status of that switch is OFF.
But of course, there are many other solutions I guess, or actually hope. Does anyone know a small cheap status indicator that works with my Domoticz?
Small cheap status indicator
Moderator: leecollings
-
- Posts: 2
- Joined: Wednesday 01 November 2023 3:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Small cheap status indicator
If your Raspberry Pi is in the location you also want to show the LEDs, then the cheapest option is connecting a few LEDs and resistors to the Raspberry Pi and controlling them via GPIO. Schema and tutorials available on-line.
And then read to Wiki to learn how to control them from Domoticz.
And then read to Wiki to learn how to control them from Domoticz.
-
- Posts: 504
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Small cheap status indicator
Choose ESP 8266 or ESP 32, fit it in a small case, drill holes in it for the LEDs to peep through and there you go.
Domoticz communicates with your ESP which lights up the LEDs.
Here is an example for blinking LEDs to indicate power return to the net using an ESP2866
In Domoticz you have to create a (dummy) switch which switches the ESP8222.
The command is given to an ESP8266 running ESPEasy.
You can create your status indicator in a similar way.
Domoticz communicates with your ESP which lights up the LEDs.
Here is an example for blinking LEDs to indicate power return to the net using an ESP2866
Code: Select all
-- Teruglevering
-- assumptions:
-- the setpoint is set by a dummy device (not a selector type)
-- http://192.168.2.110:8383/json.htm?type=devices&rid=15
local LED_gebruik = 'LED gebruik' -- switch device D7 GPIO 13
local LED_opbrengst = 'LED opbrengst' -- switch device D6 GPIO 12
local P1 = 'Power' -- P1 reading
--local LOGGING = true
return {
active = true,
on =
{
timer =
{
'every minute', -- between 20 minutes after sunrise and 20 minutes before sunset'
},
},
logging = {
--LOG_INFO, domoticz.LOG_MODULE_EXEC_INFO, domoticz.LOG_DEBUG or domoticz.LOG_ERROR
level = domoticz.LOG_ERROR, domoticz.LOG_INFO, -- domoticz.LOG_DEBUG for debug, to domoticz.LOG_ERROR when all OK
marker = "Teruglevering"
},
-- between 30 minutes after sunrise and 20 minutes before sunset'
--LOG level: This is the log level you want for this script. Can be domoticz.LOG_INFO, domoticz.LOG_MODULE_EXEC_INFO, domoticz.LOG_DEBUG or domoticz.LOG_ERROR
--marker: A string that is prefixed before each log message. That way you can easily create a filter in the Domoticz log to see just these messages.
execute = function(dz)
-- domoticz.utils.dumpTable(item.json) -- dumpTable laat alle waarden zien, mooi voor debugging
-- collect all input data
local power_usage = dz.devices(P1).usage -- usage kan plus en min zijn
local power_delivery = dz.devices(P1).usageDelivered
-- info only on log level = LOG_DEBUG
dz.log('Gebruik : ' .. power_usage, dz.LOG_DEBUG)
dz.log('Teruglevering : ' .. power_delivery, dz.LOG_DEBUG)
if (power_delivery >= 2000) then
-- groene led aan
dz.devices(LED_opbrengst).switchOn()
dz.devices(LED_gebruik).switchOff()
elseif (power_delivery < 2000) and power_delivery > 10 then
-- groene led en rode led aan
dz.devices(LED_opbrengst).switchOn()
dz.devices(LED_gebruik).switchOn() --
elseif (power_delivery <= 10) then
-- rode led aan
dz.devices(LED_gebruik).switchOn() --
dz.devices(LED_opbrengst).switchOff()
end
end
}
-- einde Teruglevering
The command is given to an ESP8266 running ESPEasy.
You can create your status indicator in a similar way.
Bugs bug me.
Who is online
Users browsing this forum: No registered users and 1 guest