Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Format of MQTT Schedule plugin commands?
#11
I am very happy to report that the formatting you provided me for sending commands worked wonderfully - for testing, I used variants of this string:

mosquitto_pub -d -h localhost -p 1883 -t sip-schedule -m '{"S01":0, "S02":5, "S03":0, "S04":5, "S05":0, "S06":0, "S07":0, "S08":0}'

Being able to send the payload as a message makes this solution very flexible for use with an Arduino platform moisture meter - I'll keep you posted!

Thanks again,
Ryan
Reply
#12
I am using this method to control my sprinklers using OpenHAB. You probably have already worked this out, but if you need to stop a sprinkler from running then send a command to either change to another sprinkler (or new set of sprinklers), or just post a 1 second command to the operating sprinkler.

so if I want to turn all my sprinklers off, I post- [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Since my first relay is actually not used this turns everything off. There is no reason that you could not just do:

ONĀ  [0, 0, 0, 0, 0, 0, 0, 600, 0, 0, 0, 0, 0, 0, 0, 0]
OFF [0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0]

since it is not really that urgent to have it shut down.

In my case I have a page which configures the stations, and then posts (example)
[0, 300, 300, 90, 90, 60, 0, 0, 300, 300, 60, 0, 0, 0, 0, 0]

And a "STOP ALL" button that posts
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]


Later I will possibly tinker with using OpenHAB to set programs - but I am not really interested in reinventing the wheel. SIP does that fine.
Reply
#13
(2019 Aug 14, 01:24 AM)Ryan Wrote: I am very happy to report that the formatting you provided me for sending commands worked wonderfully - for testing, I used variants of this string:

mosquitto_pub -d -h localhost -p 1883 -t sip-schedule -m '{"S01":0, "S02":5, "S03":0, "S04":5, "S05":0, "S06":0, "S07":0, "S08":0}'

Being able to send the payload as a message makes this solution very flexible for use with an Arduino platform moisture meter - I'll keep you posted!

Thanks again,
Ryan


hi !

any of you have tried mqtt connected to home assistant?
@ryan , @stifler or @dan ?

thanks!
Reply


Forum Jump:


Users browsing this thread: 12 Guest(s)