💬 Relay
-
-
@mfalkvidd when updating the example sketch you could maybe consider my version of the relay sketch which offers some nice additions: https://forum.mysensors.org/topic/6638/multiple-relays-motion-sketch-fully-customizable-optional-timer-manual-override
-
@mfalkvidd when updating the example sketch you could maybe consider my version of the relay sketch which offers some nice additions: https://forum.mysensors.org/topic/6638/multiple-relays-motion-sketch-fully-customizable-optional-timer-manual-override
@HenryWhite my mind is divided when it comes to that type of sketch. Yes, it has a lot of functionality. Yes, it is probably what people need anyway. But the examples are meant to be used by someone who is just getting into diy home automation. Someone new should be able to understand as much of the sketch as possible. There should be as little as possible to trubleshoot. If the sketch is complex, most people's initial reaction will be that there is something wrong with the code, when in reality almost all newbie problems are power or wiring-related. Keeping the sketch simple helps, at lest a bit.
-
@HenryWhite my mind is divided when it comes to that type of sketch. Yes, it has a lot of functionality. Yes, it is probably what people need anyway. But the examples are meant to be used by someone who is just getting into diy home automation. Someone new should be able to understand as much of the sketch as possible. There should be as little as possible to trubleshoot. If the sketch is complex, most people's initial reaction will be that there is something wrong with the code, when in reality almost all newbie problems are power or wiring-related. Keeping the sketch simple helps, at lest a bit.
@mfalkvidd You are right but may be should there be for each sensor or actuator first the most basic sketch but also at the end of the page a complete version with all functionalities and granted to work by the mysensors team.
Of course for the complicated sketch version a big warning in red letters that this is not recommended for newbies would help...
-
@mfalkvidd You are right but may be should there be for each sensor or actuator first the most basic sketch but also at the end of the page a complete version with all functionalities and granted to work by the mysensors team.
Of course for the complicated sketch version a big warning in red letters that this is not recommended for newbies would help...
After testing some functionalities of nodemanager, i was wondering if already somebody was working on making a GUI for nodemanager which would allow to build one's sketch completely from a graphical interface (at least the most common and basic functionalities) : i thing the great work that resulted in Nodemanager has so well structured the various functions needed that it has already paved the way for creating such a graphical interface.
-
I would agree that more advanced sketches 'should' be included on the same page. Keep all the info in one resource place. Provided it is clearly marked as an advanced project it might help people looking for similar functionality or just interested in learning more about programming....
-
wow! fantastic! ... the github link readme warns that it's not yet fully ready but the interface is already impressive!
I still have the same question i had for nodemanager though : for measuring another battery than the one that feeds Vcc obviously another pin is needed, however why not propose as well the option of measuring such pin voltage but with Vcc as the reference rather than the internal 1.1V which most of the time makes necessary a voltage divider ? Actually i did the modification in nodemanager.cpp to use DEFAULT (~3.3V) rather than INTERNAL (1.1V) reference for a 3.3 pro mini and i can get the expected battery level without any voltage divider.Another unrelated question i have is : could there be any way to adapt the idea of the readVcc method (which is to measure the internal 1.1V against the Vcc reference to get Vcc) but using any voltage applied to a pin as the reference to again measure the internal 1.1 against it ? This would allow the masurement of any voltage greater than 1.1 without voltage divider while the usual method would be applied for measuring any voltage lower than 1.1 ... what did i miss that makes this impossible ?
-
wow! fantastic! ... the github link readme warns that it's not yet fully ready but the interface is already impressive!
I still have the same question i had for nodemanager though : for measuring another battery than the one that feeds Vcc obviously another pin is needed, however why not propose as well the option of measuring such pin voltage but with Vcc as the reference rather than the internal 1.1V which most of the time makes necessary a voltage divider ? Actually i did the modification in nodemanager.cpp to use DEFAULT (~3.3V) rather than INTERNAL (1.1V) reference for a 3.3 pro mini and i can get the expected battery level without any voltage divider.Another unrelated question i have is : could there be any way to adapt the idea of the readVcc method (which is to measure the internal 1.1V against the Vcc reference to get Vcc) but using any voltage applied to a pin as the reference to again measure the internal 1.1 against it ? This would allow the masurement of any voltage greater than 1.1 without voltage divider while the usual method would be applied for measuring any voltage lower than 1.1 ... what did i miss that makes this impossible ?
i also just realized that there is a special AREF pin intended for what i was thinking about ... but it's not available on the mini pro.
My measurements using Vcc as Ref have been indeed very fluctuating, however what i get was highly sufficient to monitor the battery feeding a 3.3v step up regulator to the arduino and help anticipate failure
-
I would like to clarify operation of the sketch, where more than 1 sensors input are used along with more than 1 relay actuator. in one node
- Does node need unique child ID for each sensor input AND relay output?
- If that is the case how child ID is assigned to relay actuators in the above examples?
-
This is a nice sketch and it is very universal for relays. Now
m looking for a similar sketch for digital inputs such as buttons i.e.. I would like to join both. The problem: I want to use a mega for reading status of a lot of digital outputs (min.20) of another ISP. It is only High or Low. Only when the level changes, I want the mega send a message to the gateway. I tried this "for" loop, but it didnt help. There are too many informations sent to the gateway. I imagine a solution, where only a change at the pin will create an information, that is sent to the gateway.
Here my test, which didnt run:
void loop()
{for (int sensor=16, pin=BIN_1; sensor<=NUMBER_OF_BIN; sensor++, pin++)
{
int BUTT;
int BUTTOLD;
BUTT =digitalRead(pin);
if (BUTT != BUTTOLD && BUTT !=0){
MyMessage msg(sensor, V_TRIPPED);
send(msg.set(BUTT ? "1" : "0"));
}
BUTTOLD = BUTT;
wait (900);
}
}
Has anybody an idea or a hint for me? -
why i can't compile for arduino pro mini on other boards i can upload