@alowhum: Its the original code. Nothing changed. I've only made some tests with my version...
Posts made by artipi
-
RE: 💬 Power Meter Pulse Sensor
-
RE: 💬 Power Meter Pulse Sensor
Ah, this explains many things. Thank you, now its working:)!
-
RE: 💬 Power Meter Pulse Sensor
Hello, i'm stuck with this sensor, because no Interrupt is really working. I've cut down the code to this:
/** * The MySensors Arduino library handles the wireless radio link and protocol * between your home built sensors/actuators and HA controller of choice. * The sensors forms a self healing radio network with optional repeaters. Each * repeater and gateway builds a routing tables in EEPROM which keeps track of the * network topology allowing messages to be routed to nodes. * * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> * Copyright (C) 2013-2015 Sensnology AB * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors * * Documentation: http://www.mysensors.org * Support Forum: http://forum.mysensors.org * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * ******************************* * * REVISION HISTORY * Version 1.0 - Henrik Ekblad * * DESCRIPTION * This sketch provides an example how to implement a LM393 PCB * Use this sensor to measure kWh and Watt of your house meter * You need to set the correct pulsefactor of your meter (blinks per kWh). * The sensor starts by fetching current kWh value from gateway. * Reports both kWh and Watt back to gateway. * * Unfortunately millis() won't increment when the Arduino is in * sleepmode. So we cannot make this sensor sleep if we also want * to calculate/report watt value. * http://www.mysensors.org/build/pulse_power */ // Enable debug prints #define MY_DEBUG // Enable and select radio type attached //#define MY_RADIO_NRF24 //#define MY_RADIO_NRF5_ESB //#define MY_RADIO_RFM69 //#define MY_RADIO_RFM95 //#include <MySensors.h> #define DIGITAL_INPUT_SENSOR 2 // The digital input you attached your light sensor. (Only 2 and 3 generates interrupt!) #define PULSE_FACTOR 500 // Number of blinks per of your meter #define SLEEP_MODE false // Watt value can only be reported when sleep mode is false. #define MAX_WATT 1000000 // Max watt value to report. This filters outliers. #define CHILD_ID 10 // Id of the sensor child uint32_t SEND_FREQUENCY = 15000; // Minimum time between send (in milliseconds). We don't want to spam the gateway. double ppwh = ((double)PULSE_FACTOR)/1000; // Pulses per watt hour bool pcReceived = true; volatile uint32_t pulseCount = 0; volatile uint32_t lastBlink = 0; volatile uint32_t watt = 0; uint32_t oldPulseCount = 0; uint32_t oldWatt = 0; double oldkWh; uint32_t lastSend; //MyMessage wattMsg(CHILD_ID,V_WATT); //MyMessage kWhMsg(CHILD_ID,V_KWH); //MyMessage pcMsg(CHILD_ID,V_VAR1); void setup() { Serial.begin(9600); Serial.println("Start setup"); // Fetch last known pulse count value from gw //request(CHILD_ID, V_VAR1); // Use the internal pullup to be able to hook up this sketch directly to an energy meter with S0 output // If no pullup is used, the reported usage will be too high because of the floating pin pinMode(DIGITAL_INPUT_SENSOR,INPUT_PULLUP); attachInterrupt(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), onPulse, RISING); lastSend=millis(); Serial.println("Start setup: last sent: "); pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW); } void presentation() { // Send the sketch version information to the gateway and Controller //sendSketchInfo("Energy Meter", "1.3"); // Register this device as power sensor //present(CHILD_ID, S_POWER); } void loop() { } void onPulse() { Serial.println("onPulse:"); digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW delay(1000); pulseCount++; Serial.println("pulseCount:"); }
The Problem ist, that only on Start the interrupt ist working once, but no LED blinks.
Can someone help?
Thanks.
-
RE: 💬 Roller Shutter Node
Hello, nice Node! How to order a NRF Version? If i click buy, i have no choice.
-
RE: Securing Windows
@Yveaux Thanks, sounds logic and easy!:) Will try it.
-
RE: Securing Windows
@gohan Ok, you think of adding code on the node side? (pro mini) But it should only start the buzzer, if the message failed to send. Otherwise the message would go to the controller(domoticz) an then i can decide to start the buzzer or not on the node (depending on armed or not). -> is that possible?
-
Securing Windows
Hello,
i am planning to secure the windows in our planned House. I've found some Window sensors here in forum and on openhardware.io, but the most of them do not have a buzzer. -> Why? Are their only for seeing the status of the window?
I need a reliable sensor. So if some part (nrf, gateway, ...) is not working there should still be the buzzer fallback that will start screeming.
Do someone have suggestions? Or maybe a combination with a glass break sensor or something else?
I would be happy about some suggestions.
Thanks,
Arthur
-
RE: 💬 Door/Window Sensor
Hello @Takero,
thanks for your nice work!
How long does the battery hold? is the consumption still at 19uA?
-
RE: 💬 Door/Windows AAA
Hi,
thank you for your nice work!
What/how would be the simplest way to add a speaker/buzzer to your board? -> For the case then no message could be sent to the gateway to buzzer should start.
-
RE: 💬 MDMSNode "Lighting" Rev 1.1
Nice Work! When you plan to publish the PCB design?
-
RE: An Esp8266 Nextion Scene controller??
Thanks,
i try to make a small Wall scene controller that sends the commands to Domoticz over mqtt.
I ordered now the Nextion Display an thinking now to buy a WeMos D1 Mini Pro. Is that the right way? -
RE: An Esp8266 Nextion Scene controller??
As i see, i can also take some of this ESP-Boards right?
https://www.aliexpress.com/item/1pcs-lot-NodeMcu-Lua-WIFI-Internet-of-Things-development-board-based-ESP8266-esp-12e-for-arduino/32775934156.html?spm=2114.01010208.8.10.eix0zH -
RE: An Esp8266 Nextion Scene controller??
Hi @alexsh1 ,
did you finished your Enhanced Version? As i understood correctly the ESP8266 Board is used to send messages/touch commands over wifi - mqtt to a controller right? How it is programmed to send over mqtt?
So if i have this ESP - Board i do not need a arduino right?
Another question: Is it possible to run this board with a arduino pro mini or uno and nrf radio to send messages to my controller?
Thanks
-
RE: Scene controller?
That looks very interesting! Can i connect a arduino pro mini or uno? Found only examples with mega.
And will it run on a battery? -> Probably not really. -
RE: 💬 Touch Display Scene Controller
Hello,
how long will the battery hold? Any tests?
-
RE: Scene controller?
Hi,
i am also interested in a Wall LCD TouchController, but smaller (max. 2"). Do you found/ implemented something like that?
-
RE: In wall LCD Switch/Scene controller for MySensors
Hi @sundberg84,
thanks for your nice work! I'm currently searching for a similar project but with a touchscreen implementation:).
Do you plan this in the near future?
Or do you know similar touch projects from other sources? -
RE: Another simple (No SMT) relay actuator
Hi, dpressle. Thanks for your work?
One Question. Can i connect a normal light switch to it? So that i can turn on the lights with the switch and this node? -
RE: In wall light switch node - Custom PCB
Nice, will be waiting for your relay node!
-
RE: In wall light switch node - Custom PCB
@Samuel235 - Thanks for the fast reaction:).
Ok, now i understand your switch node.
I think i need something with a 12V Relay. So i can send a command (ON/OFF) to a relay node that will act like my light switch. -
RE: In wall light switch node - Custom PCB
Hi Samuel,
thanks for your great work.
I'm currently starting with my first steps in Home Automation.
I'm trying to control our lights in our flat. Our light switches are push switches with 12V. (dont know the right Translation to English. In German its called "Taster" - with no ON/OFF state, just a Push)Is this board useable for my switches? So can i connect the 12V to your board somehow and send the 12V "press button" to the main Fuse Box?
Thank you,
Arthur.
-
RE: MQTT from RasPi MySensors GW to remote Domoticz
Thank you. With beta everything is now working fine!:)
-
RE: MQTT from RasPi MySensors GW to remote Domoticz
Hi,
same issue. Any solutions???
-
RE: Raspberry PI + MQTT Gateway + Domoticz -> Connection refused
Just another question:
How to test incomming messages to broker from msgw??
-
RE: Raspberry PI + MQTT Gateway + Domoticz -> Connection refused
Thanks very much! Mosquitto was the solution!:)
-
Raspberry PI + MQTT Gateway + Domoticz -> Connection refused
Hello to all,
i am happy to be here! This is great Platform, thanks for that:)
To my Problem:
I have installed a Raspberry with Domoticz and followed the Instructions on : https://www.mysensors.org/build/raspberry
to create my Gateway.
My Steps:git clone https://github.com/mysensors/MySensors.git --branch master cd MySensors ./configure --my-gateway=mqtt --my-controller-ip-address=127.0.0.1 --my-mqtt-publish-topic-prefix=mysensors-out --my-mqtt-subscribe-topic-prefix=mysensors-in --my-mqtt-client-id=mygateway1 make sudo ./bin/mysgw -d
And after that i am getting this Errors:
pi@raspberrypi:~ $ cd MySensors/ pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw -d mysgw: Starting gateway... mysgw: Protocol version - 2.1.1 mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1 mysgw: TSF:LRT:OK mysgw: TSM:INIT mysgw: TSF:WUR:MS=0 mysgw: TSM:INIT:TSP OK mysgw: TSM:INIT:GW MODE mysgw: TSM:READY:ID=0,PAR=0,DIS=0 mysgw: MCO:REG:NOT NEEDED mysgw: MCO:BGN:STP mysgw: MCO:BGN:INIT OK,TSP=1 mysgw: Attempting MQTT connection... mysgw: connect: Connection refused mysgw: failed to connect mysgw: Attempting MQTT connection... mysgw: connect: Connection refused mysgw: failed to connect mysgw: Attempting MQTT connection... mysgw: connect: Connection refused mysgw: failed to connect
Can someone help me?
Thanks, Arthur.