Will do .
[Release] HubDuino v1.1.4 - Hubitat to Arduino / ESP8266 / ESP32 / ThingShield Integration (ST_Anything)
Thought for an added feature. Perhaps you could add a small program to sense power outage and restoration. I've seen folks ask about this in other topics. Would think it would be simple for the µP to know when it restarts.
There would be no way to know that the power has been lost though because the microprocessor can't send a signal if it's lost power. So, you could only know when power was restored. This would not be a reliable means of power monitoring. However, using a power backed up Hubduino contact sensor connected to a relay's coil side. The other side of the relay is connected to an old DC wall wart. The contact sensor read open when power fails.
Not sure I understand your reasoning. I have a Shingled zigbee bulb, when I have a loss of power, at power restoration shit bulb defaults to ON. If I received a signal ..... say 1 minute after power was restored I could check the state of my Shingled. I'm told the Hue may also have such an issue.
So, you could only know when power was restored.
Of course that is when I need the information. Sending a power is off signal when the power is off would be useless in my system, not sure about others. I guess if your hub and router were on a UPS it might be OK.
Because a power monitor, to be effective, would not just tell you when power was restored but also when it was lost. Which an ESP board cannot do. It cannot send a message when it doesn't have power.
I respectfully disagree. For my needs knowing when the power went off is not required. I only need to know that it was off so I can reset those devices that don't survive a power interruption elegantly.
As I said, my Hub is not on a UPS so knowing the power went off would be useless to the hub and I have no devices that depend on the length of outage (albeit those sub second loses).
It would be interesting to know your use case where such a power monitor, as you suggest, would be useful.
No info from the DHTs in the serial monitor. So I need to look at my sketch then
The easiest way to know that your Hubitat hub has restarted (e.g. after a power outage event) is to use the hub’s built in systemStart event. See simple RM example below.
I use this to get a Pushover notification each time my hub starts up. You could use this event to make sure your lights are set to the correct state after a power on event.
A HubDuino device could send a special event when it is powered on. However, your home network and Hubitat hub are probably going to take a much longer time to finish powering on compared to a small HubDuino board. Therefore the “HubDuino Power On Event” would probably be missed unless your Hubitat hub and all all network gear (e.g. WiFi Router) are all on UPS. And, that UPS would have to last longer than the power outage (which it probably would in most cases.)
My hub is on a UPS and using a rpi I am monitoring it and sending a pushover when I go on battery and when I get power back I get notified then too.
@ogiewon Thank you for pointing that out I've been seeing a number of question in this topic in other threads I didn't even stop to consider Hubitat would have an internal function. Besides I'm more a hardware guy so my mind seems to go there first.
Issue resolved, mistake my end
I've gotten some more zigbee plugs (peanuts) and with the help of a couple rule, a couple virtual devices and Device WatchDog, I have all my boards set up to autoreset if they drop off the network for more than an hour. And the checks happen every 2 hours. So, that should solve that problem once and for all.
In file included from \arduino-1.8.8\libraries\ST_Anything\EX_Servo.cpp:36:0:
\arduino-1.8.8\libraries\ST_Anything\EX_Servo.h:42:19: fatal error: Servo.h: No such file or directory
I just cloned the github and sill am unable to find servo.h
I also have a problem with eithernet.h I had to add a 2 after it.
Am I doing something wrong?
Sounds like you’re having issues with copying the correct folders into your ...\Arduino\libraries folder. You should not not to change or edit any files if you have your Arduino IDE environment setup correctly.
I cleared everthing out of libraries and cloned libraries from github clone into that folder. I cleared sketches out and cloned that over aswell. Looks like ethernet was changed to ethernet2.
So, is it working now? What version of the Arduino IDE are you using? I have the versions listed in the ReadMe that I have tested successfully.
I just cleared everything again. Cloned everything back with out changing anything.
arduino-1.8.8\libraries\SmartThingsEthernetW5100/SmartThingsEthernetW5100.h:20:22: fatal error: Ethernet.h: No such file or directory
compilation terminated. )
I was able to get by that by changing ethernet.h to ethernet2.h in smartthingsethernetw5100.h
I was unable to get by the servo.h error. I am unable to find servo.h even in the github.
Servo.h is part of the standard Arduino IDE installation, as is Ethernet.h.
You’ve still got a problem. Have you selected the Arduino MEGA 2560 within the Arduino IDE’s Board Manager?
Ethernet2.h is only for the W5500 shield. Trust me, no code changes are necessary to the example sketches to get them to compile.
Also, after copying the files into your C:\users\’your user name’\documents\Arduino\libraries and \Sketches folders, you have restart the Arduino IDE to pick up the changes.
I am using the Multiples_EthernetW5100_UNO sketch.
I just tried the mega sketch. It does not error on the ethernet.h but still erros on servo.h
That’s not what I asked... The Arduino IDE has a menu to select the board you’re building the code for, not the sketch.