New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation about how to set up MQTT #1
Comments
Hello, You are right, I haven't set properties in the config file for setting ip/user/pwd. Right now it assume that the MQTT server is on the same machine (localhost) with no user/pwd. Line 35 in 2ede907
I'll take some time to make these configurable but meanwhile you can change it directly in the above file. According to the mqtt library documentation:
|
Thanks for the fast reply! So I changed this line no but I still get no mqtt events on my client. I'm not really sure which topic I have to subscribe. The command line window says "acquired event: Toilette | tilt" So in my MQTT client I subscribed to the topic Also I have to say that for noobs it is hard to follow your documentation. (I had to leard things like that I habe to install npm and git first). Maybe you could also post some configuration/automation examples in the ha community. This is the link: Would be nice if also unexperienced users (most hass.io users) are able to use your code. Maybe I can help, seeing the things from the noob site. OT: Also another question. I'm not a 100% sure but I think you show two ways to install? By npm and git. This is also confusing. Which one should we choose? I choose git but for this you also have to have npm installed. So what are the differences? |
This events will be written on "gigaset/Toilette" and not on "/gigaset/Toilette" (without the /). My mistake... Maybe you can also enable some logs on MQTT server so that you can see what's happening. I'm sorry I'm not explicit enough in the documentation but it's not intended to be a tutorial. I'm taking your suggestions and will add a link to the home-assistant community ! git vs. npm: npm is the standard way to install packages and command lines utilities. git is preferable if you have to modify the source code (first because you know where you installed it). As you noticed yourself, as this project is not a "fully integrated project", git is probably better. For both you have to get node installed (npm is coming with node). NB: It seems that we don't have the same gigaset devices. I have nothing that "tilt": maybe you'll have to modify the following line and replace "close" by "tilt". To find the correct values you can open the following url in a browser http://myserver:3000 and click the "event" link (paste the result here if you want me to have a look, but it's pretty simple: it prints the events as Gigaset cloud is returning them, in the code, I'm just changing some values and sending the events to the local MQTT server: have a look at the code, I home it's quite understandable). Line 49 in 2ede907
|
I have three sensor values: open, close and tilt. Also nothing opens at http://myserver:3000 Thank you very much |
then you will have to change the line to:
the
You did replace "myserver" with your real server name right ? Or maybe you already have a process running on port 3000, you can change that in the application config file. |
Thanks I will try that. yes I tried the ip adress from the gigaset elements base and the one of the mqtt broker. Both did not open. |
I'll add some debug information, both for MQTT connection and the web server to help users during the setup. |
btw, do you get that log when launching
|
FYI, I've pushed a new version with
|
I installed in on my main system now (everything before was testing on a test system). I did everything as before and I get the following error when executing Appjs module.js:549 Error: Cannot find module 'console-stamp' Is it me or a problem with the new version? Edit: Maybe I have to add that. This time I used |
I started again with a clean stretch lite image. I had another tool on the same system and I want to install this again. Could this be the problem, so that both tool corrupt each other? This is the tool (plantgateway). It also uses mqtt. https://github.com/ChristianKuehnel/plantgateway Also I would like to know how you set up your sensors in home assistant.
The events are only triggered when something changes right? How do get the right values after a reboot? In this case this values stay unknown until something changes on that sensor right? Maybe it would be better to use restfull-sensors instead of mqtt, because than it is possible to set a refreshrate. Negative here that you generate a lot of data. Thanks! |
You're right, the error comes from the fact I've defined the sensors as you said
I'm not sure if the |
There are no reason they will... I'm using the same MQTT server with various clients: this project but also several ESP8266 (arduino-like) sensors, everything works great. The only difference with your setup is I'm not using any user/password to protect MQTT and maybe it not the same server (I use mosquito).
Right. I think some users proposed a way to restore previous values in HA, I've never tested it.
Yes, this is an other option (I haven't gone that way because I also have movement sensors, they will only fire events), you can find the status of the sensors in the "raw" API http://myserver:3000/api/v1/me/basestations, or use this one http://localhost:3000/sensors where I extracted some useful informations (I've just committed a new version to extract the "open/close" state, line 100 of app.js). You can even initialise HA values with the states and then use the mqtt events... |
Do you have an example for the restful sensor? Not sure about the payload thing. I still have to play arround with the whole thing do understand it and get it as I want. |
Nope, I haven't used them (yet :) most of my setup is mqtt based. Take your time: most of the fun is setting your smart home and learn new things, once it's running... well, it runs. (and tell me about your mqtt problem so I can close the issue :) |
Ok, so
is mandatory. I have the problem now that both "close" and "tilt" send a true value over mqtt. So home assisant see's both as "open". |
So you were able to push gigaset event to mqtt. Good news ! How did you solve your mqtt problem (it might help other users) ? Can you also confirm that you can open the http://myserver:3000/ URL with a browser ?
The test in the following line is literally: if the sensor type is Line 49 in 9409dc2
edit: I've also pushed a new version displaying more information in the log about the acquired event. |
Yes, I received an event over mqtt. My problem was solved with your advice, changing the localhost to the Ip of my broker (mosquitto addon at hass.io).
It looks like the type is ws02. Problem now could appear if the sensors have different type. I have to look that up also. |
Good, I'm just adding the edit: yes, creating a service will solve the issue. When you start a process |
I looked up all my sensors i have ws02 (the ones that tilt) Thank you for your help Could you also tell me what I have to do to load your changes? Is it just: git clone https://github.com/ycardon/gigaset-elements-proxy again? |
You just have to I do also have motion |
When I use git pull I get the message that I have to commit or stash before I merge? What does it mean and what should I do to make it work? Thanks! |
Well this is another long git story. Easier way is to:
|
Thanks, i figured out another way in the meantime. I removed the appjs file and than did "git pull" again, after this it worked. I didn't even have to care abour default.yaml file (it left it alone for some reason). |
this one :
https://github.com/ycardon/gigaset-elements-proxy/blob/master/config/default.yaml
Le ven. 15 mai 2020 à 14:00, stjones-dev <notifications@github.com> a
écrit :
… Hi. Is there any more info you can give for accessing the camera video
locally? The help says details need to be in a config file but which
details, how and what config file? Many thanks
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI7NJLUOSZKFPSITBQMO5LRRUVFXANCNFSM4F6VSQNA>
.
|
Hi,
first of all thank you for sharing this.
I managed to install your gigaset-elements-proxy and I can see the incoming sensor data in the command line.
In you documentation you say
but I cannot receive MQTT events. I'm not very experienced but I think the ServerIP, the user and the password of the MQTT Broker has to be set up somewhere. I can't see anything about this in your documentation.
Could you add this or explain it here how to do that? Is there another config-file for mqtt somewhere?
Would be glad about an answer! Thank you!
The text was updated successfully, but these errors were encountered: