Thank you for hint, inside the provided link page I found another one: https://github.com/mysensors/Arduino/pull/317 and there I understand the issue was solved in the available development version, so I download it, install and it works now!
Mihai
@Mihai
Best posts made by Mihai
-
RE: MySensors 1.6 availability?
-
MySensors and Home Assistant - using MQTT
I have successfully built and tested MySensors 1.5 and 2.0.0 beta with Home Assistant using MQTT with slightly modified sketches , few more words here: http://forum.mysensors.org/topic/2747/home-automation-multi-sensor-nodes.
The node ID was declared manually for each node.
The topics description was not very clear from the beginning, but finally I got them and now several examples of many sensors types are included in the configuration.yaml file.
I did not succeed to make them to work together using the Serial Gateway, but MQTT is just fine (may be better from some points of view). -
RE: Home Automation - multi-sensor nodes
My project is in running phase, I posted detailed description of functions, code and pictures on Openhardware site here: https://www.openhardware.io/view/55.
-
RE: Multiple sensor node freeze
It's strange, but activate the debug option the freezing just go off, but the debug should be off during the "commercial" usage. I have checked most of advice's and more than that I already add capacitors to the NFR24 (100uF + 100nF) and also to relay shield (100uF) and Arduino Nano (100uF +220nF) even if they are not explicitly requested, but I was thinking they may help.
My problem may be related to the power supply and also to the Arduino Nano, may be also the message re-arrangement helps also.
After some testing time I plan to publish my project (most of code is always published on GitHub and links available on MySensors and HomeAssistant).
Thank you for advice's, any help is always very welcome! -
RE: Handling ACK from MySensors
@martinhjelmare
Thanks for the idea, I have to check about the wait function, how it works with few messages waiting to be sended again.
The template in HA may work with ACK, I will try them. -
Home Automation - multi-sensor nodes
My Home Automation project use My Sensors 1.5 and Home-Assistant, communicating via MQTT.
I plan to install in each room several sensors (Gas/Smoke, PIR, Water leak, Temperature, Humidity) and Relays (2 to 4, local control also using IR remote).
While the project is still beta, I would like to share with you what I have achieved until now, mainly the code for gateway and nodes. The code is here: https://github.com/Mihai258/HomeAssistant-MySensors-MQTT , it contains the standard gateway from MySensor site and modified nodes to use one or several sensors, a lot of combinations are presented. A configuration file for Home-Assistant is also presented, it helps to understand how to manage the messages from MySensors.
The gateway contains Arduino UNO + Ethernet shield + NRF24, the nodes contains Arduino Nano + NRF24 + sensors.
I have tested my nodes and they works fine on the table. I will come back with more information and details, but it will take some time to get all components and to build the whole system. I also plan to move to MySensors 1.6 (my tests are on-going here). -
RE: Multiple sensor node freeze
@parachutesj Inserting just Delay() into the code doesn't help always, while it may insert some other troubles, but trying to send messages with some other line code between next sending help a little bit.
My error messages was revealed after a lot of testing and stress of the nodes.
I am waiting for the MySensors library improving, I saw a lot of work there, so I will keep the actual config, minimize the testing nights for now. Of course I am hard resetting nodes from time to time, when they fail to respond. The gateway seems to works fine. -
RE: MySensors 1.6 availability?
Thanks, I already succeed to test the MQTT Gateway 1.6 and it seems to work (subscribe ok to mosquitto, send and receive some commands), but still looking for the Serial API related to 1.6 for better understanding how to program HomeAssistant to work together.
-
RE: Home Automation - multi-sensor nodes
I have updated my project to use MySensors 2.0.0 beta from development branch with the following main changes:
- MQTT broker is external, you may use mosquitto for example;
- the Gateway allow sensors; examples included with several sensors on the gateway
- Arduino Mega may be used for the Gateway and/or nodes; in the Gateway sketch I have mention the connections for NRF24
- multi-sensor nodes examples.
I have tested all of them and they are worked.
The project is presented here: https://github.com/Mihai258/MySensors2-HomeAssistant-MQTT
@maxtox: my expertise level in IoT is not so high for your project, I am still learning in this area.
-
RE: Gateway and Mega 2560
I have tested Arduino UNO + Ethernet shield for theMQTT Gateway and they work just fine together. But if you are considering for the future to install several sensors on the Gateway (will be possible in the next release, now available on the development branch) you may run out of memory and must go for Mega.
I succeed to use UNO with few sensors, and they fit, but if you need more sensors or temperature with DS18B20 they don't fit.
If you do not plan to add any sensor on the Gateway, the number of nodes will not affect the Gateway, so no need for Mega in this case.
Latest posts made by Mihai
-
RE: Home Automation - multi-sensor nodes
@foad62
Sorry for late reply... If you use MQTT Gateway you need an MQTT broker. I was using mosquitto as a broker. At HA site they mention it at MQTT component page: https://home-assistant.io/components/mqtt/ but now they also have one internal broker available, so they are many available possibilities. -
RE: MQTT Gateway retained flag
I did not work too much with github and still find it somehow a little bit annoying for me, but I was trying to do this.
I also have updated the new inserted constant as you advice.The new definition should be moved to the MyConfig.h , but now it was easier to modify only one file.
My tests were done on MQTT Gateway made by Arduino Uno (clone) + Ethernet shield 5100 and it works very nice.
-
MQTT Gateway retained flag
I succeed to add the retained flag for the MQTT Gateway.
To access this flag, I have inserted few modification into the file MyGatewayTransportMQTTClient.cpp
The whole code and instructions for use are here: https://github.com/Mihai258/MySensors_MQTT_retained/tree/master -
RE: 💬 Building a Raspberry Pi Gateway
@eyesoft
As far as I understand, MySensors relay on PubSubClient for MQTT and it does not allow to publish messages with QOS=1 or 2, only 0.
Retain is different that QOS, it offers the possibility to recover the state for a device that loose connection for a while (e.g. after a restart). I find it very usefull. For example I have to restart the controller. When come back I got all states to their real values if retain=true. Otherwise they goes to the default, usually 0.
I have now 6 nodes, each with several sensors and relays. -
RE: 💬 Building a Raspberry Pi Gateway
@eyesoft
Thank you for the answer, I am happy to get a confirmation about sensors works on a Pi Gateway. Since at least one of my sensor is analogue, I still have to add an Arduino board to the gateway, I plan to connect it via USB.
I have tested and get very good results with Home Assistant controller running on a Pi where I add sensors directly on Pi and to an Arduino (USB to Pi).
The Ethernet Gateway do not use IRQ: https://www.mysensors.org/build/ethernet_gateway
Nor the nodes: https://www.mysensors.org/build/connect_radio Even if the wire is connected at Arduino pin 2, is mentioned: Note: The IRQ is currently not used by the MySensors library so it can be left un-connected
If you know how to connect and manage this IRQ on Arduino sketch, please let me know.
I have built this some time ago and works without the IRQ connected. Now I have updated the MySensors to 2.1.0 , IRQ is still unconnected and works the same. As far as I see, it is used for the Pi Gateway. I plan to migrate to this configuration of Pi Gateway, but I would like to get more info before change my working system:- this IRQ improve the reliability? (sometimes I have encountered problems due the load of NRF24 network with many messages)
- I would like to set retain=true for the MQTT Gateway, this will improve the reliability.
I already addressed the last question somwhere else, still waiting for more info if somebody know.
Thank you
-
RE: What kind of capacitor is need for the NRF24L01+
I used two capacitors in parallel with big capacities, just to be sure here is no problem with power: electrolytic of 100uF + ceramic 470nF, presented here: https://www.openhardware.io/view/55 in the third picture.
For a smaller module, I think you can add a ceramic of 100nF to filter higher frequencies and a tantal or even electrolytic of 10uF, if you choose lowest voltage for them they should be smaller. -
RE: Multiple Gateways for redundancy
@dbemowsk
If it is used as an alarm system, not only for intruders, but for smoke detection, water leak etc you must count on its reliability close to 100%.
Also as mfalkvidd mention, you may not want to stay outside automated closed door... -
RE: 💬 Building a Raspberry Pi Gateway
The Pi MQTT Gateway with IRQ connected may handle better the messages into a loaded network than Ethernet MQTT Gateway where IRQ is not used? (with NRF24)
Also I would like to know if I can use the other pins of RPi to connect some digital sensors directly there. -
RE: Radio network questions
@hek
Please let me know if in v.2.1.0 the ACK is enabled by default for NRF24 or if we may enable/disable it (where?).
Also I am interesting about the retain flag management from the gateway toward the mqtt broker: is it possible to manage it? How?
Thank you