Comments (28)
Let me check tomorrow how I can capture the syntax MQTTAnalyzer sends to the mosqitto server plugin on my HassOS Rasperry Pi. Sorry, I am no developer thus have to spend some more time to get what I need 😉
from homeassistant-goecharger-mqtt.
I never would not trust you ;-)
So if I get you right, I just manipulated the current state output but not the chargers settings itself, right? Bear with me... ;-)
from homeassistant-goecharger-mqtt.
Just got the answer to the issue I posted: goecharger/go-eCharger-API-v2#116 (comment)
These cardIndex
values (trx
>0
) will be accepted with the new beta firmware available soon.
from homeassistant-goecharger-mqtt.
The trx
value is available as sensor only at the moment. Could you provide some examples values which can be passed to the trx
topic? As workaround you could use the goecharger_mqtt.set_config_key
service to the any values on any topic: https://github.com/syssi/homeassistant-goecharger-mqtt/#service-goecharger_mqttset_config_key
from homeassistant-goecharger-mqtt.
Thank you for your quick reply @syssi! 😊
Tried to do it with that script and already played around with the syntax but nothing happened.
sequence:
- service: goecharger_mqtt.set_config_key
data:
serial_number: "xxxxxx"
key: "trx"
value: "2"
from homeassistant-goecharger-mqtt.
Due to the api documentation https://github.com/goecharger/go-eCharger-API-v2/blob/main/apikeys-en.md you can pass the following values:
null: no ID set
0: charging without ID
1-10: charging with ID
from homeassistant-goecharger-mqtt.
I did the same using the services
tab of the developer tools: http://your-homeassistant-host:8122/developer-tools/service
service: goecharger_mqtt.set_config_key
data:
serial_number: "072246"
key: trx
value: 2
If I monitor the MQTT traffic using mosquitto_sub -v -t '/go-eCharger/#'
I can see something like this:
$ mosquitto_sub -v -t '/go-eCharger/#'
/go-eCharger/072246/trx/set 1
/go-eCharger/072246/trx/result starting transaction for 1 is not allowed 1
from homeassistant-goecharger-mqtt.
I've prepare a pull request to introduce a select entity in future:
https://github.com/syssi/homeassistant-goecharger-mqtt/pull/69/files
You will be able to select one of the values using a drop-down.
from homeassistant-goecharger-mqtt.
Can you try it without 'set' and just use the value itself? Something like /xxxxxx/trx/2 or trx=2
I tried with MQTTAnalyzer to set the value and don't know the syntax that it passes but it works when I don't choose 'set'.
from homeassistant-goecharger-mqtt.
If I don't use /set
the charger doesn't accept the command:
/go-eCharger/072246/trx 0 # no repsonse
/go-eCharger/072246/trx 1 # no response
/go-eCharger/072246/trx 2 # no response
/go-eCharger/072246/trx/set null
/go-eCharger/072246/trx/result there is currently no transaction null
/go-eCharger/072246/trx/set 0
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx 0
/go-eCharger/072246/trx/set 1
/go-eCharger/072246/trx/result starting transaction for 1 is not allowed 1
/go-eCharger/072246/trx/set 0
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx/set null
/go-eCharger/072246/trx/result success
/go-eCharger/072246/trx null
from homeassistant-goecharger-mqtt.
I've prepared a new release. If you update the custom component using HACS there should popup a new select entity called "Transaction". This can be used to send trx
instructions between null and 9.
from homeassistant-goecharger-mqtt.
I've prepared a new release. If you update the custom component using HACS there should popup a new select entity called "Transaction". This can be used to send
trx
instructions between null and 9.
Wow! Thank you for that quick update. You were faster than I typed my last post. Just installed and checked if it works. Unfortunately it still fails. I'll check how to get the working syntax from MQTTAnalyzer tomorrow.
from homeassistant-goecharger-mqtt.
If you are using the latest firmware I'm pretty sure the new feature is working as intended. Please try to monitor the feedback of your charger using MQTTAnalyzer tomorrow. I guess your expectations are wrong. ;-)
from homeassistant-goecharger-mqtt.
The chargers are running 055.0 🤔
from homeassistant-goecharger-mqtt.
I use the same firmware version 055.0
.
from homeassistant-goecharger-mqtt.
Okay, mosquitto_sub captures
/go-eCharger/xxxxxx/trx 2
when I use MQTTAnalyzer to set trx and your integration immediately shows that value in Lovelace.
from homeassistant-goecharger-mqtt.
Next thing I tried successfully:
Run the service 'MQTT:Publish' in developer tools with topic '/go-eCharger/xxxxxx/trx' and payload '2'
So there must be anything with the integration that's different. I wish I could do more but we must be close to the solution.
Result
from homeassistant-goecharger-mqtt.
Trust me. You have to use the /set
topic to instruct your charger to execute the command. The /trx
topic without suffix is used to return the current state. The current state is displayed at the custom component. You aren't allowed to manipulate the feedback topic directly. This won't affect the charger settings
from homeassistant-goecharger-mqtt.
Or in other words: the documentation of the go-eCharger API is (still) not correct regarding trx. I had a quick chat with their support a couple of weeks ago and they replied that trx
only accepts values null
and 0
to date and they want to discuss this question with their developers since the documentation is different.
from homeassistant-goecharger-mqtt.
Just opened an issue there (sorry - in german)
goecharger/go-eCharger-API-v2#116
from homeassistant-goecharger-mqtt.
You are in the right track! The charger accepts null
and 0
at the moment. In this case the transaction
sensor changes to the new value. If you select/set/send a value >0 the command gets rejected and the state of the transaction sensor doesn't change.
from homeassistant-goecharger-mqtt.
If this is working, would it be possible to add trx
to the Config key select box?
from homeassistant-goecharger-mqtt.
Done: https://github.com/syssi/homeassistant-goecharger-mqtt/releases/tag/0.15.1
Please update your custom component to the latest release.
from homeassistant-goecharger-mqtt.
Great @syssi, thany you so much. I keep you updated if it works with the upcoming beta firmware as soon as I get it.
from homeassistant-goecharger-mqtt.
You are welcome!
from homeassistant-goecharger-mqtt.
Yesterday go-e released the new firmware 055.2 beta with the above mentioned updates and it works as expected. Only the select entity has some strange behaviour. See my screen capture below. If I select Card 1
it jumps to Card 0
, sometimes the corresponding trx
value [cardIndex+1
] doesn't change at all. Do you have an idea why? The service goecharger_mqtt.set_config_key
works fine :-)
Edit: I have been too quick. goecharger_mqtt.set_config_key
also does not work as expected. Any entered number leads to a value entered number -1
but since this behaviour even occurs with the local http API it seems to be a bug in the charger firmware. I already posted that in my issue goecharger/go-eCharger-API-v2#116
homeassistant-goecharger-mqtt_trx-selector.mp4
from homeassistant-goecharger-mqtt.
I will have a look but it will take some time.
from homeassistant-goecharger-mqtt.
You are on the right track. This issue must be addressed on firmware level. As soon as input and output values are in sync this implementation should work properly.
from homeassistant-goecharger-mqtt.
Related Issues (20)
- pAkku, pGrid, pPv sensors shown as "unavailable" HOT 2
- Error in Homeassistant since update 2024.01 Deprecation of STATE_CLASS_MEASUREMENT and STATE_CLASS_TOTAL_INCREASING HOT 3
- Entities not populating - what are correct settings? HOT 4
- Is it possible to manually set the load balancing priority in HA? HOT 6
- ValueError with `ocu` HOT 1
- All entities-data unavailable, but visible in MQTT-Explorer HOT 3
- Remove required serial number from topic configuration HOT 2
- No credentials for broker connection HOT 3
- Entity sensor.go_echarger_XXXXXX_wh has state class total_increasing, but its state is not strictly increasing HOT 1
- Working with Gemini flex? HOT 2
- Separate current meter needed? HOT 2
- hashtag in password -connection failed HOT 2
- Updating state for sensor.go_echarger_0XXXXXX_nrg_8 took 0.671 seconds HOT 9
- How to stop/start charging HOT 2
- Warnings in HomeAssistant update 2024.5.4 # 0.23.0 HOT 1
- charger connected but no data in HA HOT 3
- Load balancing
- Services not working in current release (0.24.x) HOT 5
- sensors not updated HOT 1
- Not Charging because of minimun pause duration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-goecharger-mqtt.