Sonoff;mqtt;openhab

Thanks Udo, with your help and finding a few documents from David Graeff I solved my issue and understanding of MQTT. To help others who see this post, to save the many hours I struggled, I wrote up a document, (hopefully no errors) that explains my accomplishments. I think it can help newbies.

Pi Model 3 B+, 32 gig Sd card, Openhabian; accessing via Windows 10

New build: onto my Pi SD card using BalenaEtcher and current Pi Image.

  1. Fresh load onto my Pi SD card using BalenaEtcher and current Pi Image.
  2. SSH > Sudo - openhabian-config upgrade to milestone (41) 2nd option “testing build”. Then reboot!
  3. SSH > Sudo – openhabian-config Update then upgrade then Log Viewer then Mosquito (no password)
  4. Back-up image #1
  5. Web access - Select Standard build
  6. System config + Simple Mode set.
  7. Install & configure Zwave binding.
  8. Setup Zwave things discovered 1-12 Things already on Z wave stick from a previous load.
    Naming convention: (Area_Location, Item, Item location) = (Bath_ Light_Ceiling)
    Select Channels, all in simple mode.
  9. Installed MQTT Binding, then MQTT setup: Inbox > “+” > MQTT Thing Binding > Add Manually > MQTT Broker > ‘Add PI IP address’ .
    Checked Sonoff-Tasmota App, device > console it’s connected! :slight_smile:
  10. Back-up image! #2
  11. Create and link MQTT to Sonoff device.
    Inbox > “+” > MQTT Binding > Add Manually > Generic MQTT Thing > Bridge Selection > Name: Sonoff_Dual_1 > Save.
    Create a Channel, Things > Sonoff_Dual_1 > ‘Channel +’ > Chanel Type: On/Off switch > Channel id: Sonoff_Dual_1_1 > Label: Heater_Sw1 > MQTT State: stat/sonoff/power1 > cmnd/sonoff/power1. Tested in PaperUI > Control, yeah!
    Another Channel, Things > Sonoff_Dual_1 > ‘Channel +’ > Chanel Type: On/Off switch > Channel id: Sonoff_Dual_1_2 > Label: Sw2 > MQTT State: stat/sonoff/power2 > cmnd/sonoff/power2. Tested in PaperUI > Control, yeah! (NOTE: Pay attention to upper/lower case, it counts)
    Accomplished this hurddle!

Now to use VC and hard code Things. Items, Sitemaps, Rules and Config files for security.

Then will move to Boot from SD and data on USB! On goes the challenges.

You also basically coud make an image of the SD, restore that image on a USB SSD and you would not need the SD card at all.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md