Just in case, I’ve modified the /etc/hosts in my Lubuntu, trying to redirect TechLife DNS requests’
Here is how it looks the etc/hosts
cloud.qh-tek.com 127.0.0.1
cloud.hq-tek.com 127.0.0.1
I also changed /etc/NetworkManager/dnsmasq.d/hosts.conf like this:
address=/cloud.qh-tek.com/10.0.1.11
address=/cloud.hq-tek.com/10.0.1.11
I’ve got the mosquitto_pub file installing mosquitto with sudo snap install mosquitto and copy it from /snap/mosquitto/269/usr/bin
Then, I tried to change the python script, first I didn’t understand the syntax of the BSSD (the access point I did with a wifi USB) inside the phyton file, but now I think it’s like this:
bssid = bytearray([0x11, 0x11, 0x11, 0x11, 0x11, 0x11]) ...if it's 11:11:11:11:11
And when I connect my laptop to the bulb… I’ve got an answer!
python3 TechLifePro_Setup.py
received data: b'HW:\x01\xf1MAC:XXXXXXXXXX'
So I replaced the MAC in the example above, pasted into configuration.yaml in Home Assistant, and restarted… but it doesn’t work. ![]()
Maybe the redirection that I tried on hosts and dnsmasq is wrong. Or the mosquitto_pub file that I got in the snap installation is not the right one .
Any ideas? I guess the error is in the redirection or in mosquitto_pub.
Update 1: When I manually turn on the bulb, I get this in the MQTT brocker inside Home Assistant:
1587996758: New connection from 10.0.60.xx on port 1883.
[INFO] found testuser on Home Assistant
1587996758: New client connected from 10.0.60.xx as clientid[Bulb’s MAC] (p2, c1, k30, u’testuser’).
So, it’s recognized by HA, but somehow, it doesn’t work
Update 2:
When I run TechLife.sh on the command line I’ve got this:
syntax error near element elif’ líne: elif [ "$2" = "off" ]; then