Homer-Sim
(Homer Sim)
October 24, 2018, 6:12pm
1
Hello,
I successfully flashed a set of Gosung power plus with Tasmota.
I want
to switch the plug On and offI
to display current power consumption => WORKING
later: a rule which is sending some notification if washing machine is finished
I am struggling with the switch topic.
This is my items declaration (all numbers are working)
/* WLAN */
Switch Dose_WaMa_Switch "Waschmaschine" <switch> (gKE_Naehen) { mqtt=">[mymosquitto:Dose-WaMa/relay/0:command:OFF:0], >[mymosquitto:Dose-WaMa/relay/0:command:ON:1], <[mymosquitto:Dose-WaMa/status:state:default]" }
Number Dose_WaMa_Power "Leistung [%.0f W]" <owntemperature> (gKE_Naehen) { mqtt="<[mymosquitto:Dose-WaMa/power:state:default]" }
Number Dose_WaMa_Voltage "Spannung [%.0f V]" <owntemperature> (gKE_Naehen) { mqtt="<[mymosquitto:Dose-WaMa/voltage:state:default]" }
Number Dose_WaMa_Energy "Verbrauch [%.3f kWh]" <owntemperature> (gKE_Naehen) { mqtt="<[mymosquitto:Dose-WaMa/energy:state:default]" }
Number Dose_WaMa_Current "Stromstärke [%.3f A]" <owntemperature> (gKE_Naehen) { mqtt="<[mymosquitto:Dose-WaMa/current:state:default]" }
Do you know where I am having a mistake?
Thanks
Here is my working items for the Gosund Power Plug
Number Gosund_RSSI “Gosund: RSSI [%d %%]” (gRSSI)
{ mqtt="<[broker:tele/sonoff-16CE26/STATE:state:JSONPATH($.Wifi.RSSI)]" }
Switch Gosund “Powermonitor2” (BA,gGosund)
{ mqtt=">[broker:cmnd/sonoff-16CE26/POWER:command:*:default],
<[broker:stat/sonoff-16CE26/POWER:state:default]" }
Number Gosund_Energy_Power “Power aktuell [%.1f W]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Power)]" }
Number Gosund_Energy_Total “Power Total [%.2f kWh]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Total)]" }
Number Gosund_Energy_Yesterday “Power Gestern [%.2f kWh]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Yesterday)]" }
Number Gosund_Energy_Today “Power Heute [%.2f kWh]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Today)]" }
//Number Gosund_Energy_Period “Periode [%.2f]” (BA)
// { mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Period)]" }
Number Gosund_Energy_Factor “Power Factor [%.2f ]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Factor)]" }
Number Gosund_Energy_Voltage “Power Volt [%.1f V]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Voltage)]" }
Number Gosund_Energy_Current “Power Strom [%.3f A]” (BA,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/SENSOR:state:JSONPATH($.ENERGY.Current)]" }
String Gosund_Up “Power Messinterval (Uptime): [%s]” (gUptime,gGosund)
{ mqtt="<[broker:tele/sonoff-16CE26/STATE:state:JSONPATH($.Uptime)]" }
Homer-Sim
(Homer Sim)
October 24, 2018, 7:20pm
3
I tried the switch part similar:
Switch Gosund "Powermonitor2" (gKE_Naehen) { mqtt=">[mymosquitto:cmnd/Dose-WaMa/POWER:command:*:default], <[mymosquitto:stat/Dose-WaMa/POWER:state:default]" }
no success.
Where is this setting come from (where in Tasmota?) sonoff-16CE26
In my mqtt client all entries are in lower cases. Is yours (POWER,ENERGY etc) written like this to your mqtt broker?
Thanks
vzorglub
(Vincent Regaud)
October 24, 2018, 10:52pm
4
Are you sure you used tasmota? And not another ESP utility?
Because tasmota publishes json strings for energy use and has a very specific syntax for commands (cmnd)
1 Like
Homer-Sim
(Homer Sim)
October 25, 2018, 5:13am
5
OMG, you are so right.
I played with several different bin and with Tasmota it worked then I tried to use ESPurna … and this is the current system.
I am so sorry, I will try to google for this issue to find a solution.
Sorry again
vzorglub
(Vincent Regaud)
October 25, 2018, 9:01am
6
Some other users are using ESPurna,
Can you post your config once you are all set-up, please?
1 Like
Homer-Sim
(Homer Sim)
October 26, 2018, 5:26pm
7
As to be expected your post in this threat is the solution:
Me neither,
What do you mean?
With the item as it is just above, when you action the switch on your UI, you will see a message ON or OFF in the topic casa/planta/baja/persiana/patio/relay/0/set
in MQTTfx
But there is an error in your inbound binding, the topic is :/casa/planta/baja/persiana/patio/relay/0 and should be :/casa/planta/baja/persiana/patio/relay/0/state
So your item should be:
Switch BlindOfficeUp "Oficina subir" { mqtt=">[mosquitto:/casa/planta/baja/persiana/patio/relay/0/set…