Announcement

Collapse
No announcement yet.

arduino plugin and sonoff

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • petez69
    replied
    Screen capture of a simple RGB device in the Arduino plugin
    Attached Files

    Leave a comment:


  • Michael McSharry
    replied
    question.

    Leave a comment:


  • petez69
    replied
    Sorry Michael

    is this a question or a statement ?

    Leave a comment:


  • Michael McSharry
    replied
    What has Greg done to select the desired color. Seems like clicking on a point in a color space visual is pretty easy and the tweaking the R, G or B numerically for fine tuning.

    Leave a comment:


  • Michael McSharry
    replied
    I did application-specific changes to Tasmota.
    1. Garage door control. Uses two inputs door open discrete and door closed discrete and assumes the power command will switch relay to push the door button. Added a web interface to specify how long it takes for door to open or close and changes status to have open, closed and indeterminate states.

    2. Water counter such as interfacing a tipping bucket or flow meter. Added periodic reporting for changed vs. unchanged time intervals. Added web interface to reset counter ad midnight if desired to get daily totals.

    3. Irrigation controller to turn on relays at a specified interval for a specified time as well as being slaved to a logic that exists in a smarter controller such as HS/mcsSprinklers.

    These are all described in the Appendix of mcsMQTT documentation.

    The intent was not to change Tasmota but to add application rather than hardware-specific enhancements. I did it with 5.9.1 Tasmota and redid the irrigation for 6a Tasmota. I have another line where I am trying port Tasmota to ESP32 for LoRa. I have the basics done but now need to take advantage of the two CPUs that are in ESP32.

    Leave a comment:


  • petez69
    replied
    Originally posted by Michael McSharry View Post
    Pete, can you expand on the RGB device? Did Greg make a custom plugin device rather than using the RGB color picker provided by HS3?
    HI Michael

    No as you say he has the colour picker, once you create 3 PWM devices on the Arduino you get the "do you want to create an RGB" device. I do like what Greig has done in the plugin as its easier to select the required colour than to reference it with a 6 digit hex number.

    On the other hand I'm loving the tasmota firmware and your plugin. I see posts about you customising tasmota, in a nutshell what did you change ? I've got a bunch of Basic and POW units happily chatting away.

    I have a spare Arduino Mega on my network to use for the Lighting PWM in my staircase and kitchen underbench lighting....I could go tasmota but I'm thinking the Arduino plugin way would be nicer.

    Cheers

    Leave a comment:


  • Michael McSharry
    replied
    Pete, can you expand on the RGB device? Did Greg make a custom plugin device rather than using the RGB color picker provided by HS3?

    Leave a comment:


  • petez69
    replied
    Cris

    AS a followup, again this is before I upgraded the arduino plugin....I flashed a WEMOS device with Tasmota firmware and configured it as "Magic Home". That gives me all the PWM control over the RGB strip.

    Pete

    Leave a comment:


  • petez69
    replied
    Cris

    You get full state information from the mcsmqtt plugin to homeseer. Example is I have a sonoff basic on my Verandah with one output, 1 button input, am2301 temp and humidity sensor.

    The 1 button input toggles the output relay state. Its not a press button, its a rocker switch. When I change state of the switch, it will toggle the relay output (this is local to the tasmota firmware). It also sends a mqtt message to the broker which the homeseer plugin receives. Meaning any status change on the sonoff device gets sent to the broker and you simply subscribe to that channel.

    Effectively you can switch the device both locally and via homeseer and have full state tracking....If the device looses the network and reconnects, it will send an update to Homeseer and update the state.

    Best thing is to load tasmota onto a sonoff and then go to the sonoff console on the device and watch the traffic. You can customise a lot as to how often you send out updates etc (tele)

    I have 3 basic sonoff units and 2xPOW using tasmota and mqtt.

    I have just upgraded the arduino plugin and my Mega boards to latest BETA, I was thinking of using tasmota on led strips under hand rails in my stairwell but I am preferring to go with the Mega/Arduino plugin setup. Arduino plugin lets you create an RGB device, exactly what I wanted. Tasmota does it too but I jsut like the way Greig has implemented

    Pete

    Leave a comment:


  • Pete
    replied
    With MCS plugin do I have a feedback on HS3? Change status my device?

    Yes utilizing Mosquitto and the mcsMQTT plugin.

    With Mosquitto you will have status and two way communication to the Sonoff device.

    Here is a console view with the Sonoff in the garage (car port). Not all connected at this time and just testing.

    18:17:23 MQT: /GarageDoor2/SENSOR = {"Time":"2018-07-23T18:17:23", "Switch1":"On", "Switch2":"On", "DS18x20":{"DS1":{"Type":"DS18B20", "Address":"280D7E5B04000049", "Temperature":95.2}},

    The mcsMQTT plugin runs fine in Windows or Linux Homeseer 3 lite, standard or Pro.

    Where can I find the Michael's modded Sonoff Tasmota firmware?

    It is one bin file for the Sonoff basic WiFi and the Sonoff 4ch Pro R2.

    mcsTasMota firmware June, 2018

    Here have HS3 Lite (Zee2) running on a Pine64 ARM CPU with 2Gb of RAM doing Ubuntu 16.04 64 bit server. It is the same as running on the RPi 2-3 Stretch (32 bit).

    One RPi in the attic is used for ZNet like device in attic, Node Red OWFS 1-wire temperature/humidity sensors, NOAA SDR radio for satellite downloads.

    Another RPi in the basement is also doing Node Red OWFS 1-wire combo sensors. Another RPidoes Lightning detection.

    and running HS3 Pro on another computer iSeries Haswell chipset with 16Gb of RAM running Ubuntu 16.04 64 bit and doing aux Oracle Virtual boxes running Windows Homeseer stuff.

    It's been a few years now here that I purchased a few Arduino's with sensor kits. Never did play with them much though until I started to tinker with the Sonoff stuff.

    Much easier cuz everything is all included in one little Sonoff device.
    Last edited by Pete; July 23rd, 2018, 12:33 PM.

    Leave a comment:


  • khriss75
    replied
    Originally posted by Pete View Post
    Yes here just utiilize the USB port on the laptop (USB 3.0 ==> 900mA) to provide 5VDC and 3.3VDC to the FTDI USB to serial converter.

    That said too disconnected the 120VAC mains to the SonOff device while the board is open so as not to get an electrical shock.

    12VDC would be easier to deal with.
    Oh yesss, sure, 220V (in my case) is disconnected!

    I would like to find a 3D printer drawing to make a small cover for the temperature sensor.

    Once the firmware is installed via JTAG then you can switch to upgrading firmware via OTA via the Sonoff-Tasmota (MCS) firmware.
    You're encouraging me to try the MQTT/MCS plugin.
    A question: if I push a button1 on sonoff, relay1 toggle status and for example switch to ON. With MCS plugin do I have a feedback on HS3? Change status my device?

    I already installed Tasmota firmware but in your previous message you say "These are utilizing Michael's modded Sonoff Tasmota firmware"
    Where can I find the Michael's modded Sonoff Tasmota firmware?
    I don't know if is better tray to write my firmware and use sonoff with Greig's Arduino plugin or move on MCS/MQTT plugin.
    Do you think will be possible to use the second solution with HS3 linux version on raspberry?

    Leave a comment:


  • Pete
    replied
    Yes here just utiilize the USB port on the laptop (USB 3.0 ==> 900mA) to provide 5VDC and 3.3VDC to the FTDI USB to serial converter.

    That said too disconnected the 120VAC mains to the SonOff device while the board is open so as not to get an electrical shock.

    12VDC would be easier to deal with.

    I would like to find a 3D printer drawing to make a small cover for the temperature sensor.

    Once the firmware is installed via JTAG then you can switch to upgrading firmware via OTA via the Sonoff-Tasmota (MCS) firmware.

    Leave a comment:


  • khriss75
    replied
    Thank you Pete for all precious information.

    My first flash, was done with an 12V external power.
    I haven't connected the 3.3V pin and flash was ok.
    I have read this information from a blog... "...if your FTDI usb-serial converter can't provide a lot power, you can connect external power and disconnect 3.3V pin..." For me worked.

    Leave a comment:


  • Pete
    replied
    Here have modded two Sonoff WiFi Basic modules.

    I am amazed what you can do with these devices.

    These are utilizing Michael's modded Sonoff Tasmota firmware.

    Cut traces for 120VAC relay making it a low voltage relay.

    Removed DS18B20 sensor pins, drilled tiny hole on cover and passed 3 wires to main SonOff board for a DS18B20 temperature sensor gluded on the top case.

    Inside have wired 2 3.3VDC pins, 1 5.0VDC pin, 2 Ground pins, GPIO 1,3,4 and 14.

    You can switch power source from 120VAC to 12VDC easy enough if you want to switch.

    Might glue a tiny PIR or microwave sensor and 6 terminals to cover.

    [ATTACH]70118[/ATTACH]
    Last edited by Pete; July 23rd, 2018, 11:26 AM.

    Leave a comment:


  • Pete
    replied
    Press BUTTON1 when powering up for a second or two.

    Write you sketch or bin file to your SonOff.

    Could be that a I can't re-enable flash mode again?

    Just unpower your Sonoff and start again. It will work or not work. I have small LEDs on the USB programmer that flash when programming the flash.

    Make sure too that you do not have your Sonoff 4ch Pro R2 powered on (5-24VDC). For flashing you only need to power up via 3.3VDC.

    It does not matter to the Arduino / Sonoff bootloader that you have set your GPIO0 as input on your sketch relating to flashing the Arduino.

    Make sure you are utilizing your 3.3VDC pin and not your 5.0VDC pin on your USB programmer.

    [ATTACH]70106[/ATTACH]
    Last edited by Pete; July 22nd, 2018, 06:21 PM.

    Leave a comment:

Working...
X