Anyway to stop the Arduino from doing anything when the radio fails? I am using an actuator and the problem is if radio fails whatever command was sent to the actuator will continue. This is a problem as I have set a value for it to stop, if it doesn't stop it will break my window or the actuator. But when the radio fails it stops running the code, is there a way to stop the Arduino or just send a stop command to my relay when the radio fails?
Posts made by CJ Cassarino
-
Stop all actions if radio failed
-
RE: MQTT Dimmer
Looking for an answer on this too? Did you happen to figure this out?
-
RE: Multi-button relay switch without debounce
Yea thats what I thought, and I see it. Ill check this out thanks
-
RE: Trouble sending message to Relay from Openhab
Well, in that case, it seems you are missing the receiving part of the code. This is directly from the example for the actuator and it works for me... It goes at the end of the code after the void loop.
// process incoming message void receive(const MyMessage &message) { if (message.type == V_LIGHT) { if (message.sensor < noRelays) { // check if message is valid for relays..... previous line [[[ if (message.sensor <=noRelays){ ]]] Relays[message.sensor].relayState = message.getBool(); digitalWrite(Relays[message.sensor].relayPin, Relays[message.sensor].relayState ? RELAY_ON : RELAY_OFF); // and set relays accordingly saveState( message.sensor, Relays[message.sensor].relayState ); // save sensor state in EEPROM (location == sensor number) Serial.print("Incoming change for sensor:"); Serial.print(message.sensor); Serial.print(", New status: "); Serial.print(message.getBool()); if(message.getBool() == 0) Serial.println(" = OFF"); else(Serial.println(" = ON")); } } }
-
RE: Multi-button relay switch without debounce
I have bounce2... Ill try redownloading it
-
RE: Multi-button relay switch without debounce
I get this error "'class Bounce' has no member named 'fell'"
-
RE: Multi-button relay switch without debounce
Because I am controlling an actuator with the ability for manual controls with a button. I want 1 button when held down to open it and another button when held down to close. With debounce I have to click it to open, click it again to turn of relay, then click the other button to retract, and then click to turn of relay.
-
RE: Trouble sending message to Relay from Openhab
I think you are missing in your arduino code the process for sending the relay information to OpenHAB. Try using this:
send(msg.set(state?false:true), true); // Send new state and request ack back
Also I can't see the entire item file but you may be missing or incorrectly settting your MQTT binding. This is mine for reference:
Switch OpenWindow "Extend Actuator" <rollershutter> (gH) {mqtt=">[mymosquitto:mysensors-in/5/0/1/0/2:command:ON:1],>[mymosquitto:mysensors-in/5/0/1/0/2:command:OFF:0]"}
-
Multi-button relay switch without debounce
I am trying to figure out how to have multiple relays (2 in my case) with a button to trip the relays but without the debounce. I want the relay to only be active while the switch is being pushed. Could anyone help me with this?
-
RE: Cannot get my sitemap to show humidity reading
Ok I got it working, not sure what I did But I changed my items and followed a few other guides but in all its working now.
-
RE: Cannot get my sitemap to show humidity reading
@27maximilian Sorry for the late response, I can only work on this at special times because I use all the Ethernet cords in my apartment. I am using the mqtt client gateway. And where can I find the events.log? I attached the serial print of my node and mqtt.fx
Edit: I don't think my openHAB is working at all. The temperature value is not changing even though it is changing in the SerialMonitor and mqtt.fx
-
RE: Cannot get my sitemap to show humidity reading
Yes I can see with Mqtt that both values are being posted in there topics, and I copied those same topic headings to be used in the sitemap. It's just the sitemap doesn't actually display the value.
I will setup my nodes again to get you those logs.
-
Cannot get my sitemap to show humidity reading
To preface this, I am very new to OpenHAB. I am trying to use it for my senior project as it costs us nothing and being able to view the finished project on all devices.
I got a bunch started and am working on the actual sitemap and items setup. The tutorials I have gone through have for the most part worked and I am now trying to get a basic sensor setup, because once that is done I will hopefully be able to just add the rest of my nodes and start messing with rules. Right now I am working with a temperature humidity node with a DHT11. I have my sitemap showing my temperature readings but for humidity it just shows -%. I do not understand why because they are basically identical.
This is what I have in my items:
Number Temp1 "Temperature [%.1f C]" <temperature> (Room,Temperature) { mqtt="<[broker:mygateway1-out/9/1/1/0/0:state:default]" } Number Hum1 "Humidity [%.1f %%]" <temperature> (Room,Humidity) { mqtt="<[broker:mygateway1-out/9/1/1/0/1:state:default]"}
And my sitemap:
Frame { Group item=Room label="Room Information" icon="bedroom" { Text item=Temp1 Text item=Hum1 } }
The temperature works fine I don't understand why humidity doesn't work. I got the mqtt binding from MQTT.fx from what shows up after the Arduino sends the information.