def iot_event(props={})
      if props.is_a?(String) # SQL Statement
        props = {sql: props}
        topic_props = {topic_rule_payload: props}
      elsif props.key?(:topic_rule_payload) # full properties structure
        topic_props = props
      else # just the topic_rule_payload
        topic_props = {topic_rule_payload: props}
      end

      declare_iot_topic(topic_props)
    end
def iot_event(props={})
      if props.is_a?(String) # SQL Statement
        props = {sql: props}
        topic_props = {topic_rule_payload: props}
      elsif props.key?(:topic_rule_payload) # full properties structure
        topic_props = props
      else # just the topic_rule_payload
        topic_props = {topic_rule_payload: props}
      end

      declare_iot_topic(topic_props)
    end
The user must at least pass in an SQL statement