Skip to content
  • 0 Votes
    4 Posts
    51 Views
    F
    @ZenBlizzard in case you are measuring the output with a multimeter, you will get an averaged level, since AC current waveform should be sinusoidal and overlapped with the Vcc/2->2.56V in your case. To measure the current you need a decently high sampling and some math. #define SENSITIVITY 66 // mV/A const float readings = 5; const float alpha = 2.0 / (2 * readings + 1); for (ifor = 0; ifor < 250; ifor++) { // Voltage voltageSampleRead = analogRead(V) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ voltageSampleSum = voltageSampleSum + sq(voltageSampleRead); /* accumulate total analog values for each sample readings*/ voltageSampleOffsetSum = voltageSampleOffsetSum + voltageSampleRead; // Current currentSampleRead = analogRead(I) * vccRead / 1023 - vccRead / 2; /* read the sample value including offset value*/ currentSampleSum = currentSampleSum + currentSampleRead * currentSampleRead; /* accumulate total analog values for each sample readings*/ currentSampleOffsetSum = currentSampleOffsetSum + currentSampleRead; wait(1); } voltageMean = voltageSampleSum / ifor; /* calculate average value of all sample readings taken*/ voltageOffset = voltageSampleOffsetSum / ifor; reading = (sqrt(voltageMean) - voltageOffset) * 230.0 / 1.0; // read voltage / reported voltage. voltage = round_to_dp(alpha * reading + (1 - alpha) * voltage,1); Serial.println(voltage); if (voltage < 25) voltage = 0; currentMean = currentSampleSum / ifor; /* calculate average value of all sample readings taken*/ currentOffset = currentSampleOffsetSum / ifor; reading = (sqrt(currentMean) - currentOffset) / SENSITIVITY * 1000 - currentZeroOffset; // subtract no load current. if (reading < 0) reading = 0; current = round_to_dp( alpha * reading + (1 - alpha) * current,2);
  • 1 Votes
    34 Posts
    1k Views
    N
    I'm having the same / a simular issue of temperature related readings, but at a different temperature level (for me it must be > 14 degree). I massure the dew point as well (temperature = orange, dew point = yellow). It looks to be more related to water in the air than only to temperature. @zboblamont have you been finally been able to find a solution? [image: 1743164554174-6760565c-914c-4608-be1a-6d10d0640e08-ac609c25-78e7-49de-8302-0166a041bff2-resized.png]
  • Email notifications received twice

    General Discussion
    3
    1
    1 Votes
    3 Posts
    62 Views
    ZenBlizzardZ
    It looks like duplicate email notifications may be linked to system settings or preferences. Have you noticed if the issue happens after specific actions or changes? Investigating your notification settings might shed some light
  • 0 Votes
    10 Posts
    86 Views
    bgunnarbB
    Well, my network with two handfulls of nodes in three different locations is still live and kicking! I agree that there does not seem to be a lot happening in the community. I'm running 2.4.0- alpha since this gives support for MQTT over TLS. Just managed today to create one more MQTT GW after reading a lot about support for ESP8266. You know, these things you do once per year and have to learn new each time. MySensors is the cheapest way I have found to create small sensor nodes etc. But now slowly running out of my supply of hardware. Well, time will tell...
  • PJON and Minicore not working

    Development
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • JSN-SR04T-V3.0 Coax cable extended

    Troubleshooting
    2
    0 Votes
    2 Posts
    27 Views
    B
    Update and problem fixed! For everybody that will encouter this, the problem was at the sensor side because of the folder of the sensor! We created some metal brackets for it and they where exactly the same diameter. The fact that the mount squeezed the sensor made it return the lowest value. Just needed to adjust the hole and everything was ok!
  • ESPnow as transport layer

    Feature Requests
    3
    1 Votes
    3 Posts
    27 Views
    MasMatM
    I never noticed the 20 device cap. That won't do. What I am thinking of now, is to use EspHome and just dedicate a router to handle just that network - so kinda creating an IoT network without internet access and as standalone as possible. Using static IPs should make the response better too. Thanks for looking into this.
  • Ghost Child

    Troubleshooting
    12
    1
    0 Votes
    12 Posts
    84 Views
    OldSurferDudeO
    I want to thank @FcNanoLed. I had long thought about a serial gateway. This would be a way to add I/O to a linux computer. In the process of trying to help, I built up a linux machine running virtual box. In the virtual machine I ran Home Assistant The not well documented part of that was to connect the USB port of the computer to the virtual machine (settings-->USB-->USB Device Filters) (note that one can buy a refurbished PC for about the same price as an equivalently configured RPi) So thanks for the inspiration!
  • Home Assistant/MySensors quirks

    Development
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • 1 Votes
    5 Posts
    63 Views
    ZenBlizzardZ
    When connecting an accelerometer to your PC, consider its communication protocol (I2C or SPI) and the appropriate interface device, like a microcontroller (e.g., Arduino). You may also need additional hardware for voltage adjustment or signal conditioning, depending on the sensor’s specifications.
  • Door chime

    My Project
    2
    0 Votes
    2 Posts
    43 Views
    OldSurferDudeO
    @Paul-Scarbro There are multitude of solution, but since we are in MySensors Land, let's do a MySensors solution. You'll quickly see that doing that adds a lot of overhead. We'll use an Arduino Nano or RF Nano if you're going to go whole hog. It can be run from 3.3V or 5V DC, not AC. The reed switch would be connected to an input of the Nano and one of the outputs would drive a relay. The relay would drive the chime. Your C++ program would be something like: #define inputButton 2; // connect reed switch here #define outputRelay 4; // connect relay to this pin see MySensors Relay example #define RELAY_ON 1 // GPIO value to write to turn on attached relay #define RELAY_OFF 0 // GPIO value to write to turn off attached relay void setup() { pinmode(inputButton,INPUT); pinmode(outputRelay,OUTPUT); // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: if (digitalRead(inputButton) == 0) { digitalWrite(outputRelay,RELAY_ON); wait(2000); // wait 2 seconds digitalWrite(outputRelay,RELAY_OFF); // now wait for door to close while(digitalRead(inputButton) == 0) ; //does nothing until reed switch opens } } There are some subtleties that I may have glossed over, but this is the gist. By looking at the MySensors Relay example, you'll see how to integrate this into a MySensors environment. That's where you'd want to get the RF Nano. I've made the assumption you're familiar with the Arduino IDE and you've looked into the MySensors environment.
  • MQTT-Help me understand about the MQTT Gateway.

    Development
    11
    0 Votes
    11 Posts
    86 Views
    OldSurferDudeO
    @dpcons MQTT sounds intimidating and looks imitimidating when you see all of the options available. Here's the scenario: You want to send a message. That's the -m option followed by a space and the message between " " the location, topic, is a tree, -t option, separated by forward slash / eg. MyRootTopic/MyTopicsSub/MyTopicSubSub It's as easy as that if your broker, the MQTT service (program) is on the same computer as the sending program. Usually it's not. Specifiy the location, the host, of the broker with the -h option followed by the host name or IP address The retain option, -r is important but explaining it is beyone the scope of this message Receiving, subscribing, to a topic is just the same, but you wouldn't have the -m message If you subscribe from the command line, the subscribe function waits indefinitely for messages published to the subscribed topic (unless you use the -C option) ^C to terminate the command. A tamotized device with the MQTT configured will create a number of topics on the broker. Home Assistant will see this automatically, if you have the Tasmota and MQTT Integrations installed. The MySensors MQTT gateway takes care of MQTT communication for a MySensors device. Again the MySensors and MQTT integrations. I use both. -OSD
  • PJON on RS485

    Feature Requests
    4
    0 Votes
    4 Posts
    69 Views
    ZenBlizzardZ
    25/25 Програма ChatGPT сказала: It seems like you're exploring the use of PJON with RS485. While RS485 is natively supported in MySensors, using PJON for collision handling can offer some interesting advantages, especially in environments where communication reliability is critical. PJON's collision management may be useful in bus systems like RS485, but it's worth considering whether the added complexity is necessary.
  • ESP32 Wired (no WiFi)

    Feature Requests
    4
    0 Votes
    4 Posts
    51 Views
    ZenBlizzardZ
    It seems that using an Ethernet PHY (like LAN8720) with the ESP32 in a MySensors setup requires a bit of extra configuration, including initializing the PHY using the ETH.h library and disabling the default Wi-Fi initialization. Interestingly, this setup allows for dual IP addresses, with one for the Ethernet connection and another for Wi-Fi, which can be useful in certain applications.
  • NODs stop responding, but ping works.

    Troubleshooting
    1
    0 Votes
    1 Posts
    21 Views
    No one has replied
  • Meet in Malmö, Summer 2016?

    General Discussion
    95
    2 Votes
    95 Posts
    150k Views
    TheoLT
    Maybe next summer the 10 years after party? I would still like to meet all of you guys in real person
  • Getting system time from the controller

    Troubleshooting
    13
    0 Votes
    13 Posts
    81 Views
    dpconsD
    @mfalkvidd Thanks, I'll try that.
  • Adding Listen only device to my system.

    Development
    5
    0 Votes
    5 Posts
    42 Views
    dpconsD
    @mfalkvidd Thanks for the info!
  • Compiling Sensor code using BME280 and ESP8266

    Troubleshooting
    3
    0 Votes
    3 Posts
    27 Views
    dpconsD
    Thanks for looking. What arduino ide version are you using and what version of mysensors?
  • 0 Votes
    23 Posts
    6k Views
    MasMatM
    Old topic, I know. Did anything ever come of this? I'm also thinking it would be easy & cheap to get the espnow working as a transport layer. I found this: https://www.mysensors.org/apidocs-beta/classESPNOW.html But it goes above my head and abilities when it comes to code.

16

Online

11.7k

Users

11.2k

Topics

113.1k

Posts