This approach has been working well for several weeks. However, i recently added a couple more sensors, and now nothing works. The addition may be unrelated. The RF bridge still registers all the codes, according to the console. The only changes to HA were the added codes to demux, and the added entities to the configuration.yaml. VS editor does not show any errors. There is nothing about it in the log. The RF bridge still show up on HA, and in mosquito.
Yeah, I tried that. But I cannot be sure that there wasn’t a missed keystroke somewhere else. AFAIK, there are no saved edits to retrieve (using Visual Studio Code).
EDIT: Staring at it some more, and found the problem. I ‘fat-fingered’ an erron in the python script—if that is possible from a keyboard. I fixed it, and it works again.
Thanks for paying attention. Sometimes that is all one needs.
been using this python script to receive data from a tasmotized sonoff RF for some door sensors (with retain flag on) and 433 wall remotes (retain flag off).
However, everytime Home Assistant restarts, 4 of the door sensor states will be stuck to ON even though it wasn’t ON before the restart. Anyone having the same problem? It only happens to some sensors even though they’re all the same Kerui door sensor configured exactly the same. The other 7 sensors are retaining the correct values as per before the restart.
It happens every restart and I have to manually open/close the door or set state via HA Developer Tools so it shows the correct state on frontend. Driving me nuts!
Hi all, I have been using this script for months without problems.
Now, after upgrading to Python 3.9, when the script is called i receive in the log file the error Error executing script. Unexpected error for call_service at pos 2: Unknown slice type: <ast.Name object at 0x9a548460>
I isolated that the error is produced by the row: service_data = {'topic':'home/{}'.format(d[p][0]), 'payload':'{}'.format(d[p][1]), 'qos':0, 'retain':'{}'.format(d[p][2])}
Then it must be python 3.9 (which is included in Home Assistant 0.117 no, it’s not, it’s 3.8.6) that causes the issue. I don’t have access to version 3.9, but your example works in 3.6.
Home Assistant 0.117.X doesn’t use python 3.9, it uses python 3.8.6.
According to the releases notes for 0.117, the development team is currently working on ensuring compatibility with 3.9 (but it’s not implemented in 0.117).
We are currently working on ensuring Python 3.9 is fully supported and tested.
So if people are experiencing problems with rfbridge_demux.py in 0.117, it’s unrelated to python 3.9. In fact, version 116.X used python 3.8.5, just one patch release prior to 0.117’s use of 3.8.6.