Did HA just give up on MySensors?
-
Ive been running HA for about a year now. Around July(ish) I noticed Mysensors just suddenly seemed to only work with nodes that were registered prior. None of my new sensors or switches are discovered and many of my sensors have gone dead. Any thoughts or fixes?
-
@Dbagioni I don't think that is the case. MySensors is a relatively popular integration, and fits the philosophy of Home Assistant. Also, I just rebuilt from scratch my Home Assistant server (Intel NUC) and it is operating better than my old (5 Years) installation. Very smooth, no problem rebuild. One persons observations.
-
@Dbagioni Interesting. I'm having similar symptoms, but I can still connect new nodes.
I found that if a node somehow disappears from the Overview, it may still be in the persistent file. In HA, using "Studio Code Server", one will see an entry "mysensors123423e3q132" (or something like that. the first line will be
"0": {
and a few lines down a closing
}
which is the information for the gateway.
Look for your node: "node_id": { My experience has been if it is not found, one can add a node with that node_idBut if you do find it and the node is not one of the devices in under the my sensors integration (Settings→Devices & Services→MySensors/5 devices→SoilMoistSensor node_id), get ready to jump through some hoops.
Here's what I do. I have an Arduino with a radio already wired. First, I program address 0 of the EEPROM with the errant node_id. See addressUnit.ino below. Then I load the MySensors example SoilMoistSensor onto the Arduino. and run it. At this point, I can see the node in HA under the mysensors integration as SoilMoistSensor node_id. (This node is going to be deleted, but before this is to be done, one must reprogram the Arduino so the it doesn't recreate the node. addressUnit.ino would be a good program to use to over write the SoilMoistSensor program.) Ok, now Click on it. Right below Device info you'll see DELETE in red. Click on that. For me this also removes the code from the persistent file. Then a new device with node_id can be created.
You can try, but I have not been successful at deleting the code in the persistent file. It seems that there is a persistent, persistent file which repopulates the persistent file.
addressUnit.ino
#define Ver 1.0 #include <EEPROM.h> // ------------------------------------------------------------------------------------clearSerialBuffer void clearSerialBuffer(){ while(Serial.available()){ Serial.read(); delay(50); } } // ------------------------------------------------------------------------------------header void header(){ uint8_t EEpromInt = EEPROM.read(0); Serial.print(F("Current value at address (0) is ")); Serial.println(EEpromInt); clearSerialBuffer(); Serial.print(F("Enter a an unsigned integer >0 and <254: ")); } // ------------------------------------------------------------------------------------setup void setup() { Serial.begin(115200); Serial.print(F("\n\rAddress As uint8_t ver ")); Serial.println(Ver); clearSerialBuffer(); header(); } // ------------------------------------------------------------------------------------loop void loop() { if (Serial.available()){ long inInt = Serial.parseInt(); if (inInt <= 0 || inInt >=254){ Serial.print(F(" I don't like '")); Serial.print(inInt); Serial.println(F("'")); } else { EEPROM.write(0,uint8_t(inInt)); } header(); } }
This is what I posted on HA Discord under "installation"
HA with MySensors integration (MQTT). I am trying to completely redo the integration. The current integration works, but I am unable to have nodes as part of the gateway. I hoping that starting over from scratch might work. 1st I stop the MySgw. then I delete the integration. This does not delete the persistent data; using Studio Code Server, I delete MySensors data. Next I delete the MySensors topics from the MQTT broker. Finally, I reboot Home Assistant. (In terminal execute reboot) when the reboot is complete, I re-integrate MySensors, ensuring that the version, "in" topics and "out" topics are identical to the MySgw. Then I restart the gateway. The data is getting the MQTT broker, but not to HA. Of course I backed up before doing this and when I do the full restore, all is working as it was before. I expect I should be able to start from scratch. What am I doing wrong?
When you ask your question, you have to remember that these programs are maintained by volunteers like you and me. The more complicated the change, the longer it will take to have a working change in place.
If this is problem for you, then you should look at Universal-Devices Polisy. It's a good device and holds a lot of promise and is much better supported.
For me, I'm holding my breath. Hopefully someone at HA or MySensors knows the trick.
-
My set up is via a Serial gateway. MySensors nodes/gateway are running V2.3, but my HA only is listing version as 1.4, not sure if that could be part of my issue. Im going to try shutting down the gateway, uninstalling the intergration and then going form there. Presently Im only seeing traffic from one sensor.
-
@OldSurferDude
The complete wipe seems to have worked. I also changed the version on HA's integration to 2.3 to match the MySensors library I use on the sketches.
Thanks for the workaround.
Suggested Topics
-
Hi,
Home Assistant • • diltech