MQTT OUTPUT TO DOMOTICZ #197
Replies: 36 comments 108 replies
-
Is the idx unique across messages or does it need to be the same for all
messages that are the same?
…On Thu, 27 Jan 2022, 4:24 am Chacha0007, ***@***.***> wrote:
Try to modify the mqtt output format, domoticz needs an IDX for each
output line
{ "idx" : 1, "nvalue" : 0, "svalue" : "25.0" }
help me plz
—
Reply to this email directly, view it on GitHub
<#197>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNUE425EPQI45YEK4QDUYAGZRANCNFSM5M3KNZVA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Does it need to be the same idx the next time that data is sent?
…On Thu, 27 Jan 2022, 8:20 am Chacha0007, ***@***.***> wrote:
hi thank you for your quick response, unique idx for each line
"idx 832" mpp_get_status_grid_voltage/state, Message: 0.0
"idx 833" mpp_get_status_output_power/state, Message: 0
.....
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNVFR4POCJ5OZMGN6Y3UYBCPBANCNFSM5M3KNZVA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi, I tried with -o hass_mqtt in domoticz and got some errors |
Beta Was this translation helpful? Give feedback.
-
that makes sense,the hass output module only has an unique id for the autodiscover message, not the value message |
Beta Was this translation helpful? Give feedback.
-
debug2022-01-28 10:52:13.871 MQTT Discovery: 6d 70 70 5f 67 65 74 5f 73 74 61 74 75 73 5f 6d 61 78 5f 74 mpp_get_status_max_t |
Beta Was this translation helpful? Give feedback.
-
take out the [] and :1883 eg
mosquitto_pub -h 192.168.8.100 -t
'domoticz/sensor/mpp_None_grid_voltage/state' -m '{"idx": "383",
"unique_id": "mpp_None_grid_voltage", "nvalue": "0", "svalue": "66" }'
…On Sun, 30 Jan 2022 at 10:01, TheCat ***@***.***> wrote:
***@***.***:~ $ mosquitto_pub -h [192.168.8.100:1883] -t
'domoticz/sensor/mpp_None_grid_voltage/state' -m '{"idx": "383",
"unique_id": "mpp_None_grid_voltage", "nvalue": "0", "svalue": "66" }'
Unable to connect (Lookup error.).
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNWDGQQNUHWMJJB7DV3UYRITJANCNFSM5M3KNZVA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Does anything show in the domestic log?
…On Mon, 31 Jan 2022, 11:26 pm TheCat, ***@***.***> wrote:
3 devices are not created but seen by domoticz
domoticz/sensor/mpp_None_positive_battery_voltage
domoticz/sensor/mpp_None_negative_battery_voltage
domoticz/sensor/mpp_None_battery_capacity
[image: marche]
<https://user-images.githubusercontent.com/98473397/151776443-ce7d3ee0-a250-49de-bc47-ed5cd1901628.png>
Thank you very much for your work
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNRSAC6CJJF2LTIV5FLUYZPWLANCNFSM5M3KNZVA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You need the systemd module for python. See
https://github.com/jblance/mpp-solar/blob/83a9b531e5f6c4f33a4fcd2f89ec48a608e9ca13/docs/service-README.md
…On Tue, 1 Feb 2022, 6:36 am TheCat, ***@***.***> wrote:
I have a problem with systemd.daemon would you have an idea please
sorry for disturbing you
raspberrypi:~ $ sudo mpp-solar -C mpp-solar.conf --daemon
Traceback (most recent call last):
File "/usr/local/bin/mpp-solar", line 11, in
load_entry_point('mppsolar', 'console_scripts', 'mpp-solar')()
File "/home/pi/src/mppsolar/mppsolar/*init*.py", line 215, in main
import systemd.daemon
ModuleNotFoundError: No module named 'systemd'
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNRY7LY2JYJJCXDM5ULUY3CA3ANCNFSM5M3KNZVA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
if you wish, the subject "homeassistant" could be changed to "domoticz" |
Beta Was this translation helpful? Give feedback.
-
The auto discovery needs a separate topic prefix
…On Wed, 2 Feb 2022, 11:00 am TheCat, ***@***.***> wrote:
if you wish, the subject "homeassistant" could be changed to "domoticz"
[image: mqttautodisco]
<https://user-images.githubusercontent.com/98473397/152058462-69441f57-1469-43a5-8d90-0f52cdded7ef.png>
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNTJQUNFH35BID6HIR3UZBJZNANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I've separated the autodiscovery config and value update to see if that
will work
need to
-clear the sensors
- run once with o `-o domoticz_autodiscover`
-run multiple times with `-o domoticz_mqtt`
the other parameters must be identical for all runs
…On Wed, 2 Feb 2022 at 11:06, TheCat ***@***.***> wrote:
Okay thanks for the information
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNROYWD4MCNKWCI3GIDUZBKOTANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Oops. Fixed
…On Wed, 2 Feb 2022, 11:49 am TheCat, ***@***.***> wrote:
AttributeError: module 'mppsolar.outputs.domoticz_autodiscover' has no
attribute 'domoticz_autodiscover'
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNUDIQSPRADRXLBDY4LUZBPOHANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Lack the Battery?
…On Wed, 2 Feb 2022, 11:58 am TheCat, ***@***.***> wrote:
create the devices but lack the battery
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNQZV463WT3UOOA4BCTUZBQQHANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Are the other 19 getting values set?
…On Wed, 2 Feb 2022, 12:34 pm TheCat, ***@***.***> wrote:
devices created but remain inactive in an old version
#197 (comment)
<#197 (comment)>
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNSNVS6RZ42IBQCXCPLUZBUXJANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
can you use mosquitto_sub to capture the message raw
…On Thu, 3 Feb 2022 at 09:16, TheCat ***@***.***> wrote:
if i send the status with mqttexplorer the sensor works
[image: test mqtt]
<https://user-images.githubusercontent.com/98473397/152230207-4d17238e-f899-498e-9482-cd5fecfe3a5a.png>
[image: test mqtt2]
<https://user-images.githubusercontent.com/98473397/152230347-6b6f7820-da91-43e9-9219-e831f93a8ae2.png>
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNT47XDNQGMZUDLSEM3UZGGLHANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
also the definition for that sensor is the old one - so we're working
across setups i think
…On Thu, 3 Feb 2022 at 09:22, TheCat ***@***.***> wrote:
Yes I will try
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNSWN6C7RCXRZLAHJVLUZGHA7ANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
add -v to mosquitto_sub to get more info
make sure to run the autodiscover output once then the standard
domoticz_mqtt output
…On Thu, 3 Feb 2022 at 09:28, TheCat ***@***.***> wrote:
test with latest version
***@***.***:~ $ mosquitto_sub -h localhost -t # -d
Client mosqsub|18331-raspberry sending CONNECT
Client mosqsub|18331-raspberry received CONNACK (0)
Client mosqsub|18331-raspberry sending SUBSCRIBE (Mid: 1, Topic: #, QoS: 0)
Client mosqsub|18331-raspberry received SUBACK
Subscribed (mid: 1): 0
Client mosqsub|18331-raspberry sending PINGREQ
Client mosqsub|18331-raspberry received PINGRESP
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_grid_voltage/state', ... (3 bytes))
0.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_output_power/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_grid_frequency/state', ... (3 bytes))
0.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_output_current/state', ... (3 bytes))
0.7
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_ac_output_voltage_r/state', ... (5 bytes))
229.9
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_ac_output_power_r/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_ac_output_frequency/state', ... (4 bytes))
49.9
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_ac_output_current_r/state', ... (3 bytes))
0.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_output_load_percent/state', ... (1 bytes))
3
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pbus_voltage/state', ... (5 bytes))
381.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_sbus_voltage/state', ... (5 bytes))
381.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_positive_battery_voltage/state', ... (4 bytes))
52.9
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_negative_battery_voltage/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_battery_capacity/state', ... (2 bytes))
76
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv1_input_power/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv2_input_power/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv3_input_power/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv1_input_voltage/state', ... (3 bytes))
7.5
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv2_input_voltage/state', ... (3 bytes))
3.4
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_pv3_input_voltage/state', ... (1 bytes))
0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_max_temperature/state', ... (4 bytes))
35.0
Client mosqsub|18331-raspberry received PUBLISH (d0, q0, r0, m0,
'domoticz/sensor/mpp_QPIGS_status_todo/state', ... (10 bytes))
D---110001
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNRIA4HURTVX52I2YVTUZGHV7ANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I'll make some adjustments to the config output model for you to try
tomorrow
…On Thu, 3 Feb 2022, 10:39 am TheCat, ***@***.***> wrote:
19/22 CREATE is still missing all 3 battery devices
you are right if sensor must have different expectations
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNRAQIHFZ5BLAH7OT7DUZGQCJANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Interesting, also get a battery icon ??
Does adding unit work for the other sensors
…On Thu, 3 Feb 2022, 11:16 am TheCat, ***@***.***> wrote:
[image: a]
<https://user-images.githubusercontent.com/98473397/152246629-c2fd9b90-d4f7-4132-839d-1ce6ad4c25e2.png>
[image: b]
<https://user-images.githubusercontent.com/98473397/152246636-1bfc3dd6-2b63-4561-8104-265381a7c0f9.png>
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNSE34IT462KVQPBC4DUZGULHANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ok. Should be a fairly easy fix.
…On Thu, 3 Feb 2022, 11:40 am TheCat, ***@***.***> wrote:
the battery value is the same for the battery icon
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNVZ5EZERJEBQVRSGQTUZGXFRANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
if made a change that adds units to A, V, W, % value messages
should help, but may break other sensors...
…On Thu, 3 Feb 2022 at 11:58, TheCat ***@***.***> wrote:
a letter or a symbol after the value and everything works
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNTR5XCLZWKQG2MLBBTUZGZJ7ANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Great. And it is stored as a number?
…On Fri, 4 Feb 2022, 9:48 am TheCat, ***@***.***> wrote:
no, everything works correctly with "v" after the value
[image: a]
<https://user-images.githubusercontent.com/98473397/152426072-01872eb5-4ef9-431b-8da0-8bb540e4aa3c.png>
—
Reply to this email directly, view it on GitHub
<#197 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNWFPSXYWFXVPRWEKN3UZLSYLANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
works very well |
Beta Was this translation helpful? Give feedback.
-
Great. Glad that it worked
…On Fri, 4 Feb 2022, 11:16 am TheCat, ***@***.***> wrote:
works very well
thank you so much for this new feature
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNVZKR5UOVF4QMPRPY3UZL5FRANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
to make the daemon work I placed mpp-solar.service file in starts perfectly now |
Beta Was this translation helpful? Give feedback.
-
Great
I'll add a "retain" setting to the auto discovery message so the config
lasts over reboots. But this will mean changes to the sensors may be more
tricky
The disappearing after reboot is why I have the config message sent each
time for the home assistant output
…On Sat, 5 Feb 2022, 11:54 am TheCat, ***@***.***> wrote:
to make the daemon work I placed the system file in
/usr/lib/systemd/system/mpp-solar.service
starts perfectly now
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNVBB7WD2DADS6ZIQFLUZRKLZANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
hello, works perfectly on reboot |
Beta Was this translation helpful? Give feedback.
-
That's weird. I'll leave it there in case it's needed
…On Sun, 6 Feb 2022, 6:33 am TheCat, ***@***.***> wrote:
hello, works perfectly on reboot
I think the domoticz_autodiscover.py output can be deleted ;-)
a big thank-you @jblance <https://github.com/jblance>
https://github.com/Chacha0007/mpp-solar/blob/45d0e588e0d2c354bdb455b2259fc5a9fa684eb1/mppsolar/outputs/domoticz_mqtt.py
<http://url>
—
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVKNTRN2A5PLALYNOX5WLUZVNPVANCNFSM5M3KNZVA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Try to modify the mqtt output format, domoticz needs an IDX for each output line
{ "idx" : 1, "nvalue" : 0, "svalue" : "25.0" }
help me plz
Beta Was this translation helpful? Give feedback.
All reactions