Hi samsonbox,
thank you for your reply.
In general I don't know how the dynamic approach works.
I haven't tried this approach yet, but now, thanks to you, I will be able to test it and publish the results.
Thank you so much.
In some minutes I hope to publish the results
New 2.1.5 release
Re: New 2.1.5 release
Hi again!
I'm trying the dynamic approach but still something is not right...
This is my code:
When I associate the device to my Widom gateway I can't see the 3 channels on the gateway interface...
I really don't understand how this approach could works.
Maybe I need to add something like zunoSendReport() ?
Thank you in advance for your help
I'm trying the dynamic approach but still something is not right...
This is my code:
Code: Select all
#define MAP_TO_ZEROCHANNEL 0x80
ZUNO_ENABLE(WITH_CC_SENSOR_MULTILEVEL);
ZUNO_DYNAMIC_CHANNELS(3);
unsigned int counterIngressi = 0;
unsigned int counterUscite = 0;
unsigned int counterPresenze = 0;
void setup() {
// DEFINIZIONE DELLA GESTIONE DINAMICA DEI CANALI
ZUNO_START_CONFIG();
ZUNO_SET_ZWCHANNEL(1| MAP_TO_ZEROCHANNEL); // <- this channel will be provided via 1 & 0 channels
ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
ZUNO_SET_ZWCHANNEL(2);
ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
ZUNO_SET_ZWCHANNEL(3);
ZUNO_ADD_CHANNEL(ZUNO_SENSOR_MULTILEVEL_CHANNEL_NUMBER, ZUNO_SENSOR_MULTILEVEL_TYPE_GENERAL_PURPOSE_VALUE, SENSOR_MULTILEVEL_PROPERTIES_COMBINER( SENSOR_MULTILEVEL_SCALE_LOCAL, SENSOR_MULTILEVEL_SIZE_FOUR_BYTES, SENSOR_MULTILEVEL_PRECISION_TWO_DECIMALS));
ZUNO_COMMIT_CONFIG();
//....
Serial.begin(115200);
counterIngressi = 0;
counterUscite = 0;
counterPresenze = 0;
pinMode(20, OUTPUT); // sets the digital pin as output
}
void loop() {
g_channels_data[0].dwParam = counterIngressi;
g_channels_data[1].dwParam = counterUscite;
g_channels_data[2].dwParam = counterPresenze;
bool inNetwork = zunoInNetwork();
if(inNetwork==1) Serial.println("Device in network");
else Serial.println("Device not in network");
if (Serial.available() > 0) {
// read the incoming byte:
counterIngressi = Serial.parseInt();
counterUscite = Serial.parseInt();
counterPresenze = Serial.parseInt();
if(Serial.read()=='\n') {
digitalWrite(20,HIGH);
delay(500);
digitalWrite(20,LOW);
Serial.println(counterIngressi);
Serial.println(counterUscite);
Serial.println(counterPresenze);
}
}
delay(1000);
}
word getterIngressi() {
return counterIngressi;
}
word getterUscite() {
return counterUscite;
}
word getterPresenze() {
return counterPresenze;
}
I really don't understand how this approach could works.
Maybe I need to add something like zunoSendReport() ?
Thank you in advance for your help
Re: New 2.1.5 release
This is works fine in 2.1.5 update. Try to exclude your zuno and then include. If it won't work try other zuno.samsonbox wrote: ↑16 Jul 2019 22:55I have a problem with thewith the loop I callCode: Select all
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_FREQUENTLY_AWAKE);
but the device does not wake up any more. The Battery and wake_up command class is also missing on the contoller side. But in react on any commands.Code: Select all
zunoSetBeamCountWU(10); zunoSendDeviceToSleep();
Also wake_up command class can be only in always sleeping device.
Here are the interview results for your code.
- Attachments
-
- flirs.png (40.45 KiB) Viewed 13606 times
Last edited by rkv on 19 Jul 2019 14:21, edited 1 time in total.
Re: New 2.1.5 release
I had the same problem. Including the Z-Uno in normal (operation) mode instead of including in rescue mode solved it.
Re: New 2.1.5 release
Sure, in rescue mode the Z-Uno is not running your sketch
Re: New 2.1.5 release
Nowit works fine. But first i had to perform a "Erase NVM: All" once during one upload. It seems like the Device holds some data in the NVM, thant causes this stange behaviour. So what is essentially stored in the "User Space"- and "System Space" NVM?This is works fine in 2.1.5 update. Try to exclude your zuno and then include. If it won't work try other zuno.
Also wake_up command class can be only in always sleeping device.
Re: New 2.1.5 release
A lot of specific Z-Wave data including your network info and internal SDK configurations. After upgrade from old versions sometimes you need to erase it
Re: New 2.1.5 release
Well, now I'm able to upload sketches at least in 50% of cases.
However, ZUNO_DISABLE(SERVICE_LEDS) doesn't work anymore. Still have this damned blinking green LED
However, ZUNO_DISABLE(SERVICE_LEDS) doesn't work anymore. Still have this damned blinking green LED
Re: New 2.1.5 release
Please try to re-install the package (delete Z-Uno folders/files in stageing and package)
Re: New 2.1.5 release
Still blinking, even with an empty sketch:
I'm using the USA frequency and no security.
Code: Select all
ZUNO_SETUP_SLEEPING_MODE(ZUNO_SLEEPING_MODE_ALWAYS_AWAKE);
ZUNO_SETUP_DEBUG_MODE(DEBUG_ON);
ZUNO_DYNAMIC_CHANNELS(32);
ZUNO_ENABLE(WITH_CC_SWITCH_MULTILEVEL);
ZUNO_DISABLE(SERVICE_LEDS);
void setup() {
}
void loop() {
}