Search found 18 matches
- Friday 27 January 2017 17:18
- Forum: Other questions and discussions
- Topic: Required fields to change a user variable from JSON
- Replies: 0
- Views: 466
Required fields to change a user variable from JSON
Hi, The documentation of the JSON interface states that the name of the variable is required when updating the value of the variable. I have seen examples that also use the idx, and posts that hint that both are necessary. My tests show that only the name is required (and the new value of course ...
- Friday 21 October 2016 11:09
- Forum: PHP and all others
- Topic: Array of strings and their indexing in lua
- Replies: 3
- Views: 2774
Re: Array of strings and their indexing in lua
I does indeed! I think I missed it because I started reading from index 0, not being sure what the first index would be, and the script failed (trying to create a string from nil, never reaching index 1.
Thanks for that!
Fred
Thanks for that!
Fred
- Thursday 20 October 2016 22:50
- Forum: PHP and all others
- Topic: Array of strings and their indexing in lua
- Replies: 3
- Views: 2774
Array of strings and their indexing in lua
All, I'm rather new to lua, but not too programming. To loop through heating zones in trying to put their names in an array that I can then iterate over to do something for each of them. Not knowing the syntax I read lua.org to try to learn the language. So i try something like: local names ...
- Thursday 13 October 2016 19:28
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
The problem is that I suspect there will be cases when one may want to have such a script that is run when domoticz starts, not necessarily when the Pi reboots. I don't know if this is possible, but would be nice.
- Thursday 13 October 2016 12:26
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: native HTTPS / SSL support in Domoticz
- Replies: 28
- Views: 28469
Re: native HTTPS / SSL support in Domoticz
Sorry, got it. There was also an advance link on the same page that allows me to accept the certificate. Solved.
- Wednesday 12 October 2016 20:47
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: native HTTPS / SSL support in Domoticz
- Replies: 28
- Views: 28469
Re: native HTTPS / SSL support in Domoticz
Sorry to resurrect this, but I'm having issues with https support. The relevant part of /etc/init.d/domoticz.sh has: DAEMON_ARGS="-daemon" #DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE" DAEMON_ARGS="$DAEMON_ARGS -www 8080" DAEMON_ARGS="$DAEMON_ARGS -sslwww 443" This is confirmed by ...
- Monday 10 October 2016 19:16
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
I guess I could have a script running when starting and going through all valves, but I really don't like that because that script will need to know about all valves. I suspect setting them on if they already are on should work, but I have not tried. Can an event be triggered by the start of ...
- Monday 10 October 2016 18:05
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
That is more or less what I do, but I do it on a per zone basis, when an event is triggered about the zone (change in temperature or boost requested). In other words, I was trying to get my script not do anything with the other zones than the one for which an event was triggered. My logic works ...
- Monday 10 October 2016 13:31
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
No worries! Let me explain a bit more. My underfloor heating has a number of actuators: 1 valve per zone, plus 1 pump and 1 valve for the whole manifold. Whenever heat is requested for any of the zones (either temperature too low or a boost is requested) then the corresponding zone valve is opened ...
- Monday 10 October 2016 12:39
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
In fact, I had not realised that my problem was not because of the user variable not matching the current state, but that my switches that control GPIOs on the Pi are remembered to be on (if they were) but the matching GPIOs are not set to on at startup, leading to inconsistency! Indeed, being able ...
- Monday 10 October 2016 10:16
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
So for the record, two answers to the above. $STATUS on line 19 must be surrounded by quotes, to make it a string so that the comparison works, and all the quotes have to be double quotes. I also removed an exit otherwise the scripts only tries once, even if that failed. Finally, the variable STATUS ...
- Sunday 09 October 2016 18:43
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
Thanks for that. Doesn't quite work though. After obvious modifications (IP address, variable name, etc.), running it complains: ./atreboot.sh ./atreboot.sh: line 19: [: =: unary operator expected Also, I'm not sure what the type should be. Is that an index in an array of choices? Would zero be the ...
- Friday 07 October 2016 21:53
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Re: Setting user variable on startup
Yes, that is what I mean. But can a domoticz user variable be changed from a shell script? I can't see that anywhere.
- Friday 07 October 2016 15:45
- Forum: PHP and all others
- Topic: Setting user variable on startup
- Replies: 17
- Views: 3954
Setting user variable on startup
Hi all, I have a user variable that counts how many underfloor heating zone valves are activated so that the pump and main valve are shut when the last zone valve is closed. It all works well, until the system is rebooted (my domoticz runs on a RPI3). Indeed, the vlue of the user variable is kept ...
- Tuesday 27 September 2016 20:05
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: MyDomoticz - Testers wanted!
- Replies: 627
- Views: 127618
Re: Testers wanted!
Right click? That brings up the contextual menu of my browser. Left clicking just brings me back to the green man. Left click should do. Try it a couple of times. And if that works, the following question is: Do you have login page authentication enabled? I have tried clicking many times and I ...
- Tuesday 27 September 2016 11:24
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: MyDomoticz - Testers wanted!
- Replies: 627
- Views: 127618
Re: Testers wanted!
Right click? That brings up the contextual menu of my browser. Left clicking just brings me back to the green man.
- Monday 26 September 2016 11:01
- Forum: Installation, Compiling, Permissions, Security and Starting
- Topic: MyDomoticz - Testers wanted!
- Replies: 627
- Views: 127618
Re: Testers wanted!
Trying mydomoticz, which sounds like a great idea. I have registered and got an instance ID. When I login on mydomoticz, it clearly gives me something, but only the "green man". Clicking on any of the links just returns me to that page (apart from the settings page). Just a bit of feedback and ...
- Sunday 18 September 2016 9:52
- Forum: Switches and Scenes
- Topic: Change multiple switch state with json call
- Replies: 3
- Views: 1451
Re: Change multiple switch state with json call
I have a similar question. One of my devices (an ESP-12) regularly sends two pieces of information (temperature and voltage) to domoticz, both each time. I only just realised that often only one gets to domoticz. So I was wondering if I could merge the two in one JSON call.