Category Archives: Stuff

Anything else

Mi Flora, Home ASSISTANT and MQTT Gateway

I’ve recently got an ESP32 and decided to try and use it as an MQTT gateway for my hassio installation. It’s running on esx on a NUC and no matter what I do I can’t get bluetooth to work, so I gave up and bought this little controller.

Instructions to install it are here – https://docs.openmqttgateway.com/ It took a bit of fiddling with some io errors. If using adrduino ide you might have to make some changes such as setting the board partition to be minimal SPIFFS.

After installation connect to it via it’s AP, give it your wifi information and MQTT broker and you should see things appear. The MiFlora will show under something like home/OpenMQTTGateway/BTtoMQTT/MACADDRESS

Once it’s there, it’s fairly simple to set up the sensor within HA. But here’s my code for the lazy:

  • #replace MAC with your actuall mac address!
  • platform: mqtt
    state_topic: 'home/OpenMQTTGateway/BTtoMQTT/MAC
    name: "plant_temperature"
    unit_of_measurement: '°C'
    value_template: '{{ value_json.tem | is_defined }}'
  • platform: mqtt
    state_topic: 'home/OpenMQTTGateway/BTtoMQTT/MAC'
    name: "plant_moisture"
    unit_of_measurement: '%'
    value_template: '{{ value_json.moi | is_defined }}'
  • platform: mqtt
    state_topic: 'home/OpenMQTTGateway/BTtoMQTT/MAC'
    name: "plant_battery"
    unit_of_measurement: '%'
    value_template: '{{ value_json.bat | is_defined }}'
  • platform: mqtt
    state_topic: 'home/OpenMQTTGateway/BTtoMQTT/MAC'
    name: "plant_fertiliser"
    unit_of_measurement: '%'
    value_template: '{{ value_json.fer | is_defined }}'
  • platform: mqtt
    state_topic: 'home/OpenMQTTGateway/BTtoMQTT/MAC'
    name: "plant_light"
    unit_of_measurement: 'lux'
    value_template: '{{ value_json.lux | is_defined }}'

Hassio and ESXi

I’ve been messing with homeassistant for a while on the raspberry pi 3, it worked fine, but after a while and many automatons and connections, it began to become slow. I swapped out the sd card for a usb ssd which helped, but that was only a temporary fix. Eventually I got around to buying a cheap intel NUC. It’s a lot quicker. I stuck esxi on it as there’s a free version, and I want to consolidate my growing Pi collection.

Hasio works pretty well on the nuc, its a lot quicker than the pi. However the default disk size is ridiculous. 6gb. It wasn’t long before I ran out of space and had to increase it. This took a ridiculously long time to figure out. I tried to access the underlying OS, as HA runs in a docker container so I cant give it more space from that. After several days of messing around with SSH keys I gave up. I eventaully found a port that said to do this:

  • Expand the VMDK
  • Boot from GParted ISO (I had to change my bios to “bios” not “uefi” for it to work)
  • Expand the partition
  • Disconnect the iso, start HA

That was it.

Home Assistant and Raspberry Pi Cam

The documentation to install this is somewhat lacking. Assuming you are running Home Assistant as user “homeassistant”, you’ll need to do this:

Connect the camera and enable it as detailed here – https://www.raspberrypi.org/learning/getting-started-with-picamera/worksheet/ don’t reboot it yet.

update the firmware: sudo rpi-update

reboot

give the homeassistant user permissions to read the device by adding them to the “video” group – sudo usermod -a -G video homeassistant

You’ll need to restart home assistant to pick up the group changes

 

 

 

 

 

Meike MK-910 Nikon Quick Review

I bough the Meike MK-910 fro Ebay recently. I did have the MK900 but found it odd in some ways. It appeared to not fire the flash every so often. It would fire the TTL but then nothing. Seemed it was confused with the metering I believe. Forcing the camera (a d7100) out of auto-iso seems to make it work.

 

Anyway, the 910 does none of these things. It’s much better. The HSS Works well too. It works as a remote in Manual mode which I believe people had issues with on the MK-900. Not used it a great deal however, but all in all I’m pretty pleased. They seemed to have fixed the battery drain the 900 had too. This one doesnt instanlty drop to two bars the moment you put batteries in!